start new:
tmux
start new with session name:
tmux new -s myname
| import java.util.*; | |
| class LongestSubstringKDistinct { | |
| public static int findLength(String str, int k) { | |
| int windowStart = 0, maxLength = 0; | |
| Map<Character, Integer> charFrequencyMap = new HashMap<>(); | |
| for (int windowEnd = 0; windowEnd < str.length(); windowEnd++) { | |
| char rightChar = str.charAt(windowEnd); | |
| charFrequencyMap.put(rightChar, charFrequencyMap.getOrDefault(rightChar, 0) + 1); | 
| import java.util.stream.*; | |
| import java.util.*; | |
| /* | |
| An attempt to implement quickSort using Java 8 as close as possible to | |
| the elegant Haskell implementation: | |
| quicksort [] = [] | |
| quicksort (x:xs) = | |
| let smallerSorted = quicksort [a | a <- xs, a <= x] | 
| 1. *General Background and Overview* | |
| * [Probabilistic Data Structures for Web Analytics and Data Mining](http://highlyscalable.wordpress.com/2012/05/01/probabilistic-structures-web-analytics-data-mining/) : A great overview of the space of probabilistic data structures and how they are used in approximation algorithm implementation. | |
| * [Models and Issues in Data Stream Systems](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.106.9846) | |
| * [Philippe Flajolet’s contribution to streaming algorithms](https://speakerdeck.com/timonk/philippe-flajolets-contribution-to-streaming-algorithms) : A presentation by Jérémie Lumbroso that visits some of the hostorical perspectives and how it all began with Flajolet | |
| * [Approximate Frequency Counts over Data Streams](http://www.vldb.org/conf/2002/S10P03.pdf) by Gurmeet Singh Manku & Rajeev Motwani : One of the early papers on the subject. | |
| * [Methods for Finding Frequent Items in Data Streams](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.187.9800&rep | 
| cmake_minimum_required(VERSION 3.15) | |
| project(LearnCpp) | |
| set(CMAKE_CXX_STANDARD 17) | |
| set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1z -Wall -Wextra -Werror -pedantic-errors -Wconversion -Wsign-conversion") | |
| add_executable(LearnCpp bitstring.cpp) | 
| #include <iostream> | |
| #include <vector> | |
| using namespace std; | |
| vector<string> store; | |
| void getStrings( string s, int digitsLeft ) | |
| { | |
| if( digitsLeft == 0 ) | 
| Category | Title | URL | |
|---|---|---|---|
| Programming | CS50’s Introduction to Game Development from Harvard University | https://www.class-central.com/course/edx-cs50-s-introduction-to-game-development-11504 | |
| Programming | CS50’s Mobile App Development with React Native from Harvard University | https://www.class-central.com/course/edx-cs50-s-mobile-app-development-with-react-native-11505 | |
| Programming | CS50’s Web Programming with Python and JavaScript from Harvard University | https://www.class-central.com/course/edx-cs50-s-web-programming-with-python-and-javascript-11506 | |
| Programming | Functions, Methods, and Interfaces in Go from University of California, Irvine | https://www.class-central.com/course/coursera-functions-methods-and-interfaces-in-go-12050 | |
| Programming | Concurrency in Go from University of California, Irvine | https://www.class-central.com/course/coursera-concurrency-in-go-12047 | |
| Programming | Getting Started with Go from University of California, Irvine | https://www.class-central.com/course/coursera-getting-started-with-go-1204 | 
| Below are the Big O performance of common functions of different Java Collections. | |
| List | Add | Remove | Get | Contains | Next | Data Structure | |
| ---------------------|------|--------|------|----------|------|--------------- | |
| ArrayList | O(1) | O(n) | O(1) | O(n) | O(1) | Array | |
| LinkedList | O(1) | O(1) | O(n) | O(n) | O(1) | Linked List | |
| CopyOnWriteArrayList | O(n) | O(n) | O(1) | O(n) | O(1) | Array | 
| import java.util.Collections; | |
| import java.util.LinkedList; | |
| import java.util.List; | |
| import java.util.stream.Stream; | |
| import static java.util.Arrays.asList; | |
| import static java.util.stream.Collectors.toList; | |
| public class Tree { | |
| private int value; |