SYMBOL INDEX (22693 symbols across 4765 files) FILE: codes/c/chapter_array_and_linkedlist/array.c function randomAccess (line 10) | int randomAccess(int *nums, int size) { function insert (line 35) | void insert(int *nums, int size, int num, int index) { function removeItem (line 46) | void removeItem(int *nums, int size, int index) { function traverse (line 54) | void traverse(int *nums, int size) { function find (line 63) | int find(int *nums, int size, int target) { function main (line 72) | int main() { FILE: codes/c/chapter_array_and_linkedlist/linked_list.c function insert (line 10) | void insert(ListNode *n0, ListNode *P) { function removeItem (line 18) | void removeItem(ListNode *n0) { function ListNode (line 30) | ListNode *access(ListNode *head, int index) { function find (line 40) | int find(ListNode *head, int target) { function main (line 52) | int main() { FILE: codes/c/chapter_array_and_linkedlist/my_list.c type MyList (line 10) | typedef struct { function MyList (line 20) | MyList *newMyList() { function delMyList (line 30) | void delMyList(MyList *nums) { function size (line 36) | int size(MyList *nums) { function capacity (line 41) | int capacity(MyList *nums) { function get (line 46) | int get(MyList *nums, int index) { function set (line 52) | void set(MyList *nums, int index, int num) { function add (line 58) | void add(MyList *nums, int num) { function insert (line 67) | void insert(MyList *nums, int index, int num) { function removeItem (line 82) | int removeItem(MyList *nums, int index) { function extendCapacity (line 93) | void extendCapacity(MyList *nums) { function main (line 117) | int main() { FILE: codes/c/chapter_backtracking/n_queens.c function backtrack (line 12) | void backtrack(int row, int n, char state[MAX_SIZE][MAX_SIZE], char ***r... function main (line 64) | int main() { FILE: codes/c/chapter_backtracking/permutations_i.c function backtrack (line 13) | void backtrack(int *state, int stateSize, int *choices, int choicesSize,... function main (line 58) | int main() { FILE: codes/c/chapter_backtracking/permutations_ii.c function backtrack (line 13) | void backtrack(int *state, int stateSize, int *choices, int choicesSize,... function main (line 60) | int main() { FILE: codes/c/chapter_backtracking/preorder_traversal_i_compact.c function preOrder (line 16) | void preOrder(TreeNode *root) { function main (line 29) | int main() { FILE: codes/c/chapter_backtracking/preorder_traversal_ii_compact.c function preOrder (line 18) | void preOrder(TreeNode *root) { function main (line 38) | int main() { FILE: codes/c/chapter_backtracking/preorder_traversal_iii_compact.c function preOrder (line 18) | void preOrder(TreeNode *root) { function main (line 39) | int main() { FILE: codes/c/chapter_backtracking/preorder_traversal_iii_template.c function isSolution (line 18) | bool isSolution(void) { function recordSolution (line 23) | void recordSolution(void) { function isValid (line 31) | bool isValid(TreeNode *choice) { function makeChoice (line 36) | void makeChoice(TreeNode *choice) { function undoChoice (line 41) | void undoChoice(void) { function backtrack (line 46) | void backtrack(TreeNode *choices[2]) { function main (line 69) | int main() { FILE: codes/c/chapter_backtracking/subset_sum_i.c function backtrack (line 22) | void backtrack(int target, int *choices, int choicesSize, int start) { function cmp (line 50) | int cmp(const void *a, const void *b) { function subsetSumI (line 55) | void subsetSumI(int *nums, int numsSize, int target) { function main (line 62) | int main() { FILE: codes/c/chapter_backtracking/subset_sum_i_naive.c function backtrack (line 22) | void backtrack(int target, int total, int *choices, int choicesSize) { function subsetSumINaive (line 47) | void subsetSumINaive(int *nums, int numsSize, int target) { function main (line 53) | int main() { FILE: codes/c/chapter_backtracking/subset_sum_ii.c function backtrack (line 22) | void backtrack(int target, int *choices, int choicesSize, int start) { function cmp (line 54) | int cmp(const void *a, const void *b) { function subsetSumII (line 59) | void subsetSumII(int *nums, int numsSize, int target) { function main (line 67) | int main() { FILE: codes/c/chapter_computational_complexity/iteration.c function forLoop (line 10) | int forLoop(int n) { function whileLoop (line 20) | int whileLoop(int n) { function whileLoopII (line 32) | int whileLoopII(int n) { function main (line 63) | int main() { FILE: codes/c/chapter_computational_complexity/recursion.c function recur (line 10) | int recur(int n) { function forLoopRecur (line 21) | int forLoopRecur(int n) { function tailRecur (line 40) | int tailRecur(int n, int res) { function fib (line 49) | int fib(int n) { function main (line 60) | int main() { FILE: codes/c/chapter_computational_complexity/space_complexity.c function func (line 10) | int func() { function constant (line 16) | void constant(int n) { type HashTable (line 34) | typedef struct { function linear (line 41) | void linear(int n) { function linearRecur (line 75) | void linearRecur(int n) { function quadratic (line 83) | void quadratic(int n) { function quadraticRecur (line 102) | int quadraticRecur(int n) { function TreeNode (line 113) | TreeNode *buildTree(int n) { function main (line 123) | int main() { FILE: codes/c/chapter_computational_complexity/time_complexity.c function constant (line 10) | int constant(int n) { function linear (line 21) | int linear(int n) { function arrayTraversal (line 30) | int arrayTraversal(int *nums, int n) { function quadratic (line 40) | int quadratic(int n) { function bubbleSort (line 52) | int bubbleSort(int *nums, int n) { function exponential (line 71) | int exponential(int n) { function expRecur (line 86) | int expRecur(int n) { function logarithmic (line 93) | int logarithmic(int n) { function logRecur (line 103) | int logRecur(int n) { function linearLogRecur (line 110) | int linearLogRecur(int n) { function factorialRecur (line 121) | int factorialRecur(int n) { function main (line 132) | int main(int argc, char *argv[]) { FILE: codes/c/chapter_computational_complexity/worst_best_time_complexity.c function findOne (line 28) | int findOne(int *nums, int n) { function main (line 39) | int main(int argc, char *argv[]) { FILE: codes/c/chapter_divide_and_conquer/binary_search_recur.c function dfs (line 10) | int dfs(int nums[], int target, int i, int j) { function binarySearch (line 30) | int binarySearch(int nums[], int target, int numsSize) { function main (line 37) | int main() { FILE: codes/c/chapter_divide_and_conquer/build_tree.c function TreeNode (line 13) | TreeNode *dfs(int *preorder, int *inorderMap, int i, int l, int r, int s... function TreeNode (line 33) | TreeNode *buildTree(int *preorder, int preorderSize, int *inorder, int i... function main (line 45) | int main() { FILE: codes/c/chapter_divide_and_conquer/hanota.c function move (line 13) | void move(int *src, int *srcSize, int *tar, int *tarSize) { function dfs (line 24) | void dfs(int i, int *src, int *srcSize, int *buf, int *bufSize, int *tar... function solveHanota (line 39) | void solveHanota(int *A, int *ASize, int *B, int *BSize, int *C, int *CS... function main (line 45) | int main() { FILE: codes/c/chapter_dynamic_programming/climbing_stairs_backtrack.c function backtrack (line 10) | void backtrack(int *choices, int state, int n, int *res, int len) { function climbingStairsBacktrack (line 27) | int climbingStairsBacktrack(int n) { function main (line 40) | int main() { FILE: codes/c/chapter_dynamic_programming/climbing_stairs_constraint_dp.c function climbingStairsConstraintDP (line 10) | int climbingStairsConstraintDP(int n) { function main (line 39) | int main() { FILE: codes/c/chapter_dynamic_programming/climbing_stairs_dfs.c function dfs (line 10) | int dfs(int i) { function climbingStairsDFS (line 20) | int climbingStairsDFS(int n) { function main (line 25) | int main() { FILE: codes/c/chapter_dynamic_programming/climbing_stairs_dfs_mem.c function dfs (line 10) | int dfs(int i, int *mem) { function climbingStairsDFSMem (line 25) | int climbingStairsDFSMem(int n) { function main (line 37) | int main() { FILE: codes/c/chapter_dynamic_programming/climbing_stairs_dp.c function climbingStairsDP (line 10) | int climbingStairsDP(int n) { function climbingStairsDPComp (line 28) | int climbingStairsDPComp(int n) { function main (line 41) | int main() { FILE: codes/c/chapter_dynamic_programming/coin_change.c function myMin (line 10) | int myMin(int a, int b) { function coinChangeDP (line 15) | int coinChangeDP(int coins[], int amt, int coinsSize) { function coinChangeDPComp (line 49) | int coinChangeDPComp(int coins[], int amt, int coinsSize) { function main (line 78) | int main() { FILE: codes/c/chapter_dynamic_programming/coin_change_ii.c function coinChangeIIDP (line 10) | int coinChangeIIDP(int coins[], int amt, int coinsSize) { function coinChangeIIDPComp (line 43) | int coinChangeIIDPComp(int coins[], int amt, int coinsSize) { function main (line 67) | int main() { FILE: codes/c/chapter_dynamic_programming/edit_distance.c function myMin (line 10) | int myMin(int a, int b) { function editDistanceDFS (line 15) | int editDistanceDFS(char *s, char *t, int i, int j) { function editDistanceDFSMem (line 37) | int editDistanceDFSMem(char *s, char *t, int memCols, int **mem, int i, ... function editDistanceDP (line 63) | int editDistanceDP(char *s, char *t, int n, int m) { function editDistanceDPComp (line 96) | int editDistanceDPComp(char *s, char *t, int n, int m) { function main (line 127) | int main() { FILE: codes/c/chapter_dynamic_programming/knapsack.c function myMax (line 10) | int myMax(int a, int b) { function knapsackDFS (line 15) | int knapsackDFS(int wgt[], int val[], int i, int c) { function knapsackDFSMem (line 32) | int knapsackDFSMem(int wgt[], int val[], int memCols, int **mem, int i, ... function knapsackDP (line 54) | int knapsackDP(int wgt[], int val[], int cap, int wgtSize) { function knapsackDPComp (line 82) | int knapsackDPComp(int wgt[], int val[], int cap, int wgtSize) { function main (line 103) | int main() { FILE: codes/c/chapter_dynamic_programming/min_cost_climbing_stairs_dp.c function myMin (line 10) | int myMin(int a, int b) { function minCostClimbingStairsDP (line 15) | int minCostClimbingStairsDP(int cost[], int costSize) { function minCostClimbingStairsDPComp (line 35) | int minCostClimbingStairsDPComp(int cost[], int costSize) { function main (line 49) | int main() { FILE: codes/c/chapter_dynamic_programming/min_path_sum.c function myMin (line 13) | int myMin(int a, int b) { function minPathSumDFS (line 18) | int minPathSumDFS(int grid[MAX_SIZE][MAX_SIZE], int i, int j) { function minPathSumDFSMem (line 35) | int minPathSumDFSMem(int grid[MAX_SIZE][MAX_SIZE], int mem[MAX_SIZE][MAX... function minPathSumDP (line 57) | int minPathSumDP(int grid[MAX_SIZE][MAX_SIZE], int n, int m) { function minPathSumDPComp (line 87) | int minPathSumDPComp(int grid[MAX_SIZE][MAX_SIZE], int n, int m) { function main (line 111) | int main() { FILE: codes/c/chapter_dynamic_programming/unbounded_knapsack.c function myMax (line 10) | int myMax(int a, int b) { function unboundedKnapsackDP (line 15) | int unboundedKnapsackDP(int wgt[], int val[], int cap, int wgtSize) { function unboundedKnapsackDPComp (line 43) | int unboundedKnapsackDPComp(int wgt[], int val[], int cap, int wgtSize) { function main (line 66) | int main() { FILE: codes/c/chapter_graph/graph_adjacency_list.c type AdjListNode (line 13) | typedef struct AdjListNode { type GraphAdjList (line 19) | typedef struct { function GraphAdjList (line 25) | GraphAdjList *newGraphAdjList() { function delGraphAdjList (line 38) | void delGraphAdjList(GraphAdjList *graph) { function AdjListNode (line 55) | AdjListNode *findNode(GraphAdjList *graph, Vertex *vet) { function addEdgeHelper (line 65) | void addEdgeHelper(AdjListNode *head, Vertex *vet) { function addEdge (line 74) | void addEdge(GraphAdjList *graph, Vertex *vet1, Vertex *vet2) { function removeEdgeHelper (line 84) | void removeEdgeHelper(AdjListNode *head, Vertex *vet) { function removeEdge (line 101) | void removeEdge(GraphAdjList *graph, Vertex *vet1, Vertex *vet2) { function addVertex (line 111) | void addVertex(GraphAdjList *graph, Vertex *vet) { function removeVertex (line 121) | void removeVertex(GraphAdjList *graph, Vertex *vet) { function printGraph (line 159) | void printGraph(const GraphAdjList *graph) { FILE: codes/c/chapter_graph/graph_adjacency_list_test.c function main (line 10) | int main() { FILE: codes/c/chapter_graph/graph_adjacency_matrix.c type GraphAdjMat (line 13) | typedef struct { function GraphAdjMat (line 20) | GraphAdjMat *newGraphAdjMat() { function delGraphAdjMat (line 32) | void delGraphAdjMat(GraphAdjMat *graph) { function addVertex (line 37) | void addVertex(GraphAdjMat *graph, int val) { function removeVertex (line 52) | void removeVertex(GraphAdjMat *graph, int index) { function addEdge (line 78) | void addEdge(GraphAdjMat *graph, int i, int j) { function removeEdge (line 89) | void removeEdge(GraphAdjMat *graph, int i, int j) { function printGraphAdjMat (line 99) | void printGraphAdjMat(GraphAdjMat *graph) { function main (line 109) | int main() { FILE: codes/c/chapter_graph/graph_bfs.c type Queue (line 13) | typedef struct { function Queue (line 19) | Queue *newQueue() { function isEmpty (line 26) | int isEmpty(Queue *q) { function enqueue (line 31) | void enqueue(Queue *q, Vertex *vet) { function Vertex (line 38) | Vertex *dequeue(Queue *q) { function isVisited (line 46) | int isVisited(Vertex **visited, int size, Vertex *vet) { function graphBFS (line 57) | void graphBFS(GraphAdjList *graph, Vertex *startVet, Vertex **res, int *... function main (line 82) | int main() { FILE: codes/c/chapter_graph/graph_dfs.c function isVisited (line 13) | int isVisited(Vertex **res, int size, Vertex *vet) { function dfs (line 24) | void dfs(GraphAdjList *graph, Vertex **res, int *resSize, Vertex *vet) { function graphDFS (line 41) | void graphDFS(GraphAdjList *graph, Vertex *startVet, Vertex **res, int *... function main (line 46) | int main() { FILE: codes/c/chapter_greedy/coin_change_greedy.c function coinChangeGreedy (line 10) | int coinChangeGreedy(int *coins, int size, int amt) { function main (line 29) | int main() { FILE: codes/c/chapter_greedy/fractional_knapsack.c type Item (line 10) | typedef struct { function sortByValueDensity (line 16) | int sortByValueDensity(const void *a, const void *b) { function fractionalKnapsack (line 23) | float fractionalKnapsack(int wgt[], int val[], int itemCount, int cap) { function main (line 50) | int main(void) { FILE: codes/c/chapter_greedy/max_capacity.c function myMin (line 10) | int myMin(int a, int b) { function myMax (line 14) | int myMax(int a, int b) { function maxCapacity (line 19) | int maxCapacity(int ht[], int htLength) { function main (line 41) | int main(void) { FILE: codes/c/chapter_greedy/max_product_cutting.c function maxProductCutting (line 10) | int maxProductCutting(int n) { function main (line 31) | int main(void) { FILE: codes/c/chapter_hashing/array_hash_map.c type Pair (line 13) | typedef struct { type MapSet (line 19) | typedef struct { type ArrayHashMap (line 25) | typedef struct { function ArrayHashMap (line 30) | ArrayHashMap *newArrayHashMap() { function delArrayHashMap (line 39) | void delArrayHashMap(ArrayHashMap *hmap) { function hashFunc (line 50) | int hashFunc(int key) { function put (line 65) | void put(ArrayHashMap *hmap, const int key, const char *val) { function removeItem (line 76) | void removeItem(ArrayHashMap *hmap, const int key) { function pairSet (line 84) | void pairSet(ArrayHashMap *hmap, MapSet *set) { function keySet (line 108) | void keySet(ArrayHashMap *hmap, MapSet *set) { function valueSet (line 130) | void valueSet(ArrayHashMap *hmap, MapSet *set) { function print (line 152) | void print(ArrayHashMap *hmap) { function main (line 164) | int main() { FILE: codes/c/chapter_hashing/hash_map_chaining.c type Pair (line 15) | typedef struct { type Node (line 21) | typedef struct Node { type HashMapChaining (line 27) | typedef struct { function HashMapChaining (line 36) | HashMapChaining *newHashMapChaining() { function delHashMapChaining (line 50) | void delHashMapChaining(HashMapChaining *hashMap) { function hashFunc (line 65) | int hashFunc(HashMapChaining *hashMap, int key) { function loadFactor (line 70) | double loadFactor(HashMapChaining *hashMap) { function extend (line 92) | void extend(HashMapChaining *hashMap) { function put (line 120) | void put(HashMapChaining *hashMap, int key, const char *val) { function removeItem (line 147) | void removeItem(HashMapChaining *hashMap, int key) { function print (line 171) | void print(HashMapChaining *hashMap) { function main (line 184) | int main() { FILE: codes/c/chapter_hashing/hash_map_open_addressing.c type Pair (line 10) | typedef struct { type HashMapOpenAddressing (line 16) | typedef struct { function HashMapOpenAddressing (line 29) | HashMapOpenAddressing *newHashMapOpenAddressing() { function delHashMapOpenAddressing (line 44) | void delHashMapOpenAddressing(HashMapOpenAddressing *hashMap) { function hashFunc (line 58) | int hashFunc(HashMapOpenAddressing *hashMap, int key) { function loadFactor (line 63) | double loadFactor(HashMapOpenAddressing *hashMap) { function findBucket (line 68) | int findBucket(HashMapOpenAddressing *hashMap, int key) { function put (line 107) | void put(HashMapOpenAddressing *hashMap, int key, char *val) { function removeItem (line 134) | void removeItem(HashMapOpenAddressing *hashMap, int key) { function extend (line 148) | void extend(HashMapOpenAddressing *hashMap) { function print (line 169) | void print(HashMapOpenAddressing *hashMap) { function main (line 183) | int main() { FILE: codes/c/chapter_hashing/simple_hash.c function addHash (line 10) | int addHash(char *key) { function mulHash (line 20) | int mulHash(char *key) { function xorHash (line 30) | int xorHash(char *key) { function rotHash (line 41) | int rotHash(char *key) { function main (line 52) | int main() { FILE: codes/c/chapter_heap/my_heap.c type MaxHeap (line 12) | typedef struct { function MaxHeap (line 25) | MaxHeap *newMaxHeap(int nums[], int size) { function delMaxHeap (line 38) | void delMaxHeap(MaxHeap *maxHeap) { function left (line 44) | int left(MaxHeap *maxHeap, int i) { function right (line 49) | int right(MaxHeap *maxHeap, int i) { function parent (line 54) | int parent(MaxHeap *maxHeap, int i) { function swap (line 59) | void swap(MaxHeap *maxHeap, int i, int j) { function size (line 66) | int size(MaxHeap *maxHeap) { function isEmpty (line 71) | int isEmpty(MaxHeap *maxHeap) { function peek (line 76) | int peek(MaxHeap *maxHeap) { function push (line 81) | void push(MaxHeap *maxHeap, int val) { function pop (line 96) | int pop(MaxHeap *maxHeap) { function siftDown (line 115) | void siftDown(MaxHeap *maxHeap, int i) { function siftUp (line 139) | void siftUp(MaxHeap *maxHeap, int i) { FILE: codes/c/chapter_heap/my_heap_test.c function main (line 10) | int main() { FILE: codes/c/chapter_heap/top_k.c function pushMinHeap (line 10) | void pushMinHeap(MaxHeap *maxHeap, int val) { function popMinHeap (line 16) | int popMinHeap(MaxHeap *maxHeap) { function peekMinHeap (line 22) | int peekMinHeap(MaxHeap *maxHeap) { function main (line 62) | int main() { FILE: codes/c/chapter_searching/binary_search.c function binarySearch (line 10) | int binarySearch(int *nums, int len, int target) { function binarySearchLCRO (line 28) | int binarySearchLCRO(int *nums, int len, int target) { function main (line 46) | int main() { FILE: codes/c/chapter_searching/binary_search_edge.c function binarySearchInsertion (line 10) | int binarySearchInsertion(int *nums, int numSize, int target) { function binarySearchLeftEdge (line 25) | int binarySearchLeftEdge(int *nums, int numSize, int target) { function binarySearchRightEdge (line 37) | int binarySearchRightEdge(int *nums, int numSize, int target) { function main (line 51) | int main() { FILE: codes/c/chapter_searching/binary_search_insertion.c function binarySearchInsertionSimple (line 10) | int binarySearchInsertionSimple(int *nums, int numSize, int target) { function binarySearchInsertion (line 27) | int binarySearchInsertion(int *nums, int numSize, int target) { function main (line 44) | int main() { FILE: codes/c/chapter_searching/two_sum.c type HashTable (line 26) | typedef struct { function HashTable (line 33) | HashTable *find(HashTable *h, int key) { function insert (line 40) | void insert(HashTable **h, int key, int val) { function main (line 69) | int main() { FILE: codes/c/chapter_sorting/bubble_sort.c function bubbleSort (line 10) | void bubbleSort(int nums[], int size) { function bubbleSortWithFlag (line 25) | void bubbleSortWithFlag(int nums[], int size) { function main (line 44) | int main() { FILE: codes/c/chapter_sorting/bucket_sort.c function compare (line 12) | int compare(const void *a, const void *b) { function bucketSort (line 19) | void bucketSort(float nums[], int n) { function main (line 49) | int main() { FILE: codes/c/chapter_sorting/counting_sort.c function countingSortNaive (line 11) | void countingSortNaive(int nums[], int size) { function countingSort (line 38) | void countingSort(int nums[], int size) { function main (line 73) | int main() { FILE: codes/c/chapter_sorting/heap_sort.c function siftDown (line 10) | void siftDown(int nums[], int n, int i) { function heapSort (line 34) | void heapSort(int nums[], int n) { function main (line 51) | int main() { FILE: codes/c/chapter_sorting/insertion_sort.c function insertionSort (line 10) | void insertionSort(int nums[], int size) { function main (line 26) | int main() { FILE: codes/c/chapter_sorting/merge_sort.c function merge (line 10) | void merge(int *nums, int left, int mid, int right) { function mergeSort (line 41) | void mergeSort(int *nums, int left, int right) { function main (line 54) | int main() { FILE: codes/c/chapter_sorting/quick_sort.c function swap (line 10) | void swap(int nums[], int i, int j) { function partition (line 17) | int partition(int nums[], int left, int right) { function quickSort (line 37) | void quickSort(int nums[], int left, int right) { function medianThree (line 52) | int medianThree(int nums[], int left, int mid, int right) { function partitionMedian (line 62) | int partitionMedian(int nums[], int left, int right) { function quickSortMedian (line 81) | void quickSortMedian(int nums[], int left, int right) { function quickSortTailCall (line 95) | void quickSortTailCall(int nums[], int left, int right) { function main (line 116) | int main() { FILE: codes/c/chapter_sorting/radix_sort.c function digit (line 10) | int digit(int num, int exp) { function countingSortDigit (line 16) | void countingSortDigit(int nums[], int size, int exp) { function radixSort (line 49) | void radixSort(int nums[], int size) { function main (line 67) | int main() { FILE: codes/c/chapter_sorting/selection_sort.c function selectionSort (line 10) | void selectionSort(int nums[], int n) { function main (line 27) | int main() { FILE: codes/c/chapter_stack_and_queue/array_deque.c type ArrayDeque (line 10) | typedef struct { function ArrayDeque (line 18) | ArrayDeque *newArrayDeque(int capacity) { function delArrayDeque (line 28) | void delArrayDeque(ArrayDeque *deque) { function capacity (line 34) | int capacity(ArrayDeque *deque) { function size (line 39) | int size(ArrayDeque *deque) { function empty (line 44) | bool empty(ArrayDeque *deque) { function dequeIndex (line 49) | int dequeIndex(ArrayDeque *deque, int i) { function pushFirst (line 57) | void pushFirst(ArrayDeque *deque, int num) { function pushLast (line 71) | void pushLast(ArrayDeque *deque, int num) { function peekFirst (line 84) | int peekFirst(ArrayDeque *deque) { function peekLast (line 91) | int peekLast(ArrayDeque *deque) { function popFirst (line 99) | int popFirst(ArrayDeque *deque) { function popLast (line 108) | int popLast(ArrayDeque *deque) { function main (line 127) | int main() { FILE: codes/c/chapter_stack_and_queue/array_queue.c type ArrayQueue (line 10) | typedef struct { function ArrayQueue (line 18) | ArrayQueue *newArrayQueue(int capacity) { function delArrayQueue (line 28) | void delArrayQueue(ArrayQueue *queue) { function capacity (line 34) | int capacity(ArrayQueue *queue) { function size (line 39) | int size(ArrayQueue *queue) { function empty (line 44) | bool empty(ArrayQueue *queue) { function peek (line 49) | int peek(ArrayQueue *queue) { function push (line 55) | void push(ArrayQueue *queue, int num) { function pop (line 69) | int pop(ArrayQueue *queue) { function main (line 90) | int main() { FILE: codes/c/chapter_stack_and_queue/array_stack.c type ArrayStack (line 12) | typedef struct { function ArrayStack (line 18) | ArrayStack *newArrayStack() { function delArrayStack (line 27) | void delArrayStack(ArrayStack *stack) { function size (line 33) | int size(ArrayStack *stack) { function isEmpty (line 38) | bool isEmpty(ArrayStack *stack) { function push (line 43) | void push(ArrayStack *stack, int num) { function peek (line 53) | int peek(ArrayStack *stack) { function pop (line 62) | int pop(ArrayStack *stack) { function main (line 69) | int main() { FILE: codes/c/chapter_stack_and_queue/linkedlist_deque.c type DoublyListNode (line 10) | typedef struct DoublyListNode { function DoublyListNode (line 17) | DoublyListNode *newDoublyListNode(int num) { function delDoublyListNode (line 26) | void delDoublyListNode(DoublyListNode *node) { type LinkedListDeque (line 31) | typedef struct { function LinkedListDeque (line 37) | LinkedListDeque *newLinkedListDeque() { function delLinkedListdeque (line 46) | void delLinkedListdeque(LinkedListDeque *deque) { function size (line 58) | int size(LinkedListDeque *deque) { function empty (line 63) | bool empty(LinkedListDeque *deque) { function push (line 68) | void push(LinkedListDeque *deque, int num, bool isFront) { function pushFirst (line 92) | void pushFirst(LinkedListDeque *deque, int num) { function pushLast (line 97) | void pushLast(LinkedListDeque *deque, int num) { function peekFirst (line 102) | int peekFirst(LinkedListDeque *deque) { function peekLast (line 108) | int peekLast(LinkedListDeque *deque) { function pop (line 114) | int pop(LinkedListDeque *deque, bool isFront) { function popFirst (line 145) | int popFirst(LinkedListDeque *deque) { function popLast (line 150) | int popLast(LinkedListDeque *deque) { function printLinkedListDeque (line 155) | void printLinkedListDeque(LinkedListDeque *deque) { function main (line 169) | int main() { FILE: codes/c/chapter_stack_and_queue/linkedlist_queue.c type LinkedListQueue (line 10) | typedef struct { function LinkedListQueue (line 16) | LinkedListQueue *newLinkedListQueue() { function delLinkedListQueue (line 25) | void delLinkedListQueue(LinkedListQueue *queue) { function size (line 37) | int size(LinkedListQueue *queue) { function empty (line 42) | bool empty(LinkedListQueue *queue) { function push (line 47) | void push(LinkedListQueue *queue, int num) { function peek (line 64) | int peek(LinkedListQueue *queue) { function pop (line 70) | int pop(LinkedListQueue *queue) { function printLinkedListQueue (line 80) | void printLinkedListQueue(LinkedListQueue *queue) { function main (line 94) | int main() { FILE: codes/c/chapter_stack_and_queue/linkedlist_stack.c type LinkedListStack (line 10) | typedef struct { function LinkedListStack (line 16) | LinkedListStack *newLinkedListStack() { function delLinkedListStack (line 24) | void delLinkedListStack(LinkedListStack *s) { function size (line 34) | int size(LinkedListStack *s) { function isEmpty (line 39) | bool isEmpty(LinkedListStack *s) { function push (line 44) | void push(LinkedListStack *s, int num) { function peek (line 53) | int peek(LinkedListStack *s) { function pop (line 62) | int pop(LinkedListStack *s) { function main (line 73) | int main() { FILE: codes/c/chapter_tree/array_binary_tree.c type ArrayBinaryTree (line 10) | typedef struct { function ArrayBinaryTree (line 16) | ArrayBinaryTree *newArrayBinaryTree(int *arr, int arrSize) { function delArrayBinaryTree (line 25) | void delArrayBinaryTree(ArrayBinaryTree *abt) { function size (line 31) | int size(ArrayBinaryTree *abt) { function val (line 36) | int val(ArrayBinaryTree *abt, int i) { function left (line 44) | int left(int i) { function right (line 49) | int right(int i) { function parent (line 54) | int parent(int i) { function dfs (line 72) | void dfs(ArrayBinaryTree *abt, int i, char *order, int *res, int *index) { function main (line 117) | int main() { FILE: codes/c/chapter_tree/avl_tree.c type AVLTree (line 10) | typedef struct { function AVLTree (line 15) | AVLTree *newAVLTree() { function delAVLTree (line 22) | void delAVLTree(AVLTree *tree) { function height (line 28) | int height(TreeNode *node) { function updateHeight (line 37) | void updateHeight(TreeNode *node) { function balanceFactor (line 49) | int balanceFactor(TreeNode *node) { function TreeNode (line 59) | TreeNode *rightRotate(TreeNode *node) { function TreeNode (line 74) | TreeNode *leftRotate(TreeNode *node) { function TreeNode (line 89) | TreeNode *rotate(TreeNode *node) { function TreeNode (line 119) | TreeNode *insertHelper(TreeNode *node, int val) { function insert (line 141) | void insert(AVLTree *tree, int val) { function TreeNode (line 146) | TreeNode *removeHelper(TreeNode *node, int val) { function removeItem (line 190) | void removeItem(AVLTree *tree, int val) { function TreeNode (line 195) | TreeNode *search(AVLTree *tree, int val) { function testInsert (line 214) | void testInsert(AVLTree *tree, int val) { function testRemove (line 220) | void testRemove(AVLTree *tree, int val) { function main (line 227) | int main() { FILE: codes/c/chapter_tree/binary_search_tree.c type BinarySearchTree (line 10) | typedef struct { function BinarySearchTree (line 15) | BinarySearchTree *newBinarySearchTree() { function delBinarySearchTree (line 23) | void delBinarySearchTree(BinarySearchTree *bst) { function TreeNode (line 29) | TreeNode *getRoot(BinarySearchTree *bst) { function TreeNode (line 34) | TreeNode *search(BinarySearchTree *bst, int num) { function insert (line 54) | void insert(BinarySearchTree *bst, int num) { function removeItem (line 87) | void removeItem(BinarySearchTree *bst, int num) { function main (line 138) | int main() { FILE: codes/c/chapter_tree/binary_tree.c function main (line 10) | int main() { FILE: codes/c/chapter_tree/binary_tree_bfs.c function main (line 54) | int main() { FILE: codes/c/chapter_tree/binary_tree_dfs.c function preOrder (line 15) | void preOrder(TreeNode *root, int *size) { function inOrder (line 25) | void inOrder(TreeNode *root, int *size) { function postOrder (line 35) | void postOrder(TreeNode *root, int *size) { function main (line 45) | int main() { FILE: codes/c/utils/common_test.c function testListNode (line 9) | void testListNode() { function testTreeNode (line 16) | void testTreeNode() { function main (line 29) | int main(int argc, char *argv[]) { FILE: codes/c/utils/list_node.h type ListNode (line 15) | typedef struct ListNode { function ListNode (line 21) | ListNode *newListNode(int val) { function ListNode (line 30) | ListNode *arrToLinkedList(const int *arr, size_t size) { function freeMemoryLinkedList (line 45) | void freeMemoryLinkedList(ListNode *cur) { FILE: codes/c/utils/print_util.h function printArray (line 22) | void printArray(int arr[], int size) { function printArrayFloat (line 35) | void printArrayFloat(float arr[], int size) { function printLinkedList (line 48) | void printLinkedList(ListNode *node) { type Trunk (line 59) | typedef struct Trunk { function Trunk (line 64) | Trunk *newTrunk(Trunk *prev, char *str) { function showTrunks (line 72) | void showTrunks(Trunk *trunk) { function printTreeHelper (line 85) | void printTreeHelper(TreeNode *node, Trunk *prev, bool isRight) { function printTree (line 113) | void printTree(TreeNode *root) { function printHeap (line 118) | void printHeap(int arr[], int size) { FILE: codes/c/utils/tree_node.h type TreeNode (line 19) | typedef struct TreeNode { function TreeNode (line 27) | TreeNode *newTreeNode(int val) { function TreeNode (line 55) | TreeNode *arrayToTreeDFS(int *arr, int size, int i) { function TreeNode (line 67) | TreeNode *arrayToTree(int *arr, int size) { function treeToArrayDFS (line 72) | void treeToArrayDFS(TreeNode *root, int i, int *res, int *size) { function freeMemoryTree (line 95) | void freeMemoryTree(TreeNode *root) { FILE: codes/c/utils/uthash.h type UT_hash_bucket (line 1072) | typedef struct UT_hash_bucket { type UT_hash_table (line 1096) | typedef struct UT_hash_table { type UT_hash_handle (line 1129) | typedef struct UT_hash_handle { FILE: codes/c/utils/vector.h type vector (line 15) | typedef struct vector { function vector (line 23) | vector *newVector() { function vector (line 33) | vector *_newVector(int size, void *elem, int elemSize) { function delVector (line 48) | void delVector(vector *v) { function vectorPushback (line 67) | void vectorPushback(vector *v, void *elem, int elemSize) { function vectorPopback (line 78) | void vectorPopback(vector *v) { function vectorClear (line 86) | void vectorClear(vector *v) { function vectorSize (line 95) | int vectorSize(vector *v) { function vectorSet (line 120) | void vectorSet(vector *v, int pos, void *elem, int elemSize) { function vectorExpand (line 132) | void vectorExpand(vector *v) { function vectorShrink (line 138) | void vectorShrink(vector *v) { function vectorInsert (line 144) | void vectorInsert(vector *v, int pos, void *elem, int elemSize) { function vectorErase (line 158) | void vectorErase(vector *v, int pos) { function vectorSwap (line 169) | void vectorSwap(vector *v, int i, int j) { function vectorEmpty (line 176) | bool vectorEmpty(vector *v) { function vectorFull (line 181) | bool vectorFull(vector *v) { function vectorEqual (line 186) | bool vectorEqual(vector *v1, vector *v2) { function vectorSort (line 203) | void vectorSort(vector *v, int (*cmp)(const void *, const void *)) { function printVector (line 209) | void printVector(vector *v, void (*printFunc)(vector *v, void *p)) { function printVectorMatrix (line 239) | void printVectorMatrix(vector *vv, void (*printFunc)(vector *v, void *p)) { FILE: codes/c/utils/vertex.h type Vertex (line 15) | typedef struct { function Vertex (line 20) | Vertex *newVertex(int val) { function Vertex (line 28) | Vertex **valsToVets(int *vals, int size) { FILE: codes/cpp/chapter_array_and_linkedlist/array.cpp function randomAccess (line 10) | int randomAccess(int *nums, int size) { function insert (line 33) | void insert(int *nums, int size, int num, int index) { function remove (line 43) | void remove(int *nums, int size, int index) { function traverse (line 51) | void traverse(int *nums, int size) { function find (line 60) | int find(int *nums, int size, int target) { function main (line 69) | int main() { FILE: codes/cpp/chapter_array_and_linkedlist/linked_list.cpp function insert (line 10) | void insert(ListNode *n0, ListNode *P) { function remove (line 17) | void remove(ListNode *n0) { function ListNode (line 29) | ListNode *access(ListNode *head, int index) { function find (line 39) | int find(ListNode *head, int target) { function main (line 51) | int main() { FILE: codes/cpp/chapter_array_and_linkedlist/list.cpp function main (line 10) | int main() { FILE: codes/cpp/chapter_array_and_linkedlist/my_list.cpp class MyList (line 10) | class MyList { method MyList (line 19) | MyList() { method size (line 29) | int size() { method capacity (line 34) | int capacity() { method get (line 39) | int get(int index) { method set (line 47) | void set(int index, int num) { method add (line 54) | void add(int num) { method insert (line 64) | void insert(int index, int num) { method remove (line 80) | int remove(int index) { method extendCapacity (line 95) | void extendCapacity() { method toVector (line 110) | vector toVector() { function main (line 121) | int main() { FILE: codes/cpp/chapter_backtracking/n_queens.cpp function backtrack (line 10) | void backtrack(int row, int n, vector> &state, vector>> nQueens(int n) { function main (line 51) | int main() { FILE: codes/cpp/chapter_backtracking/permutations_i.cpp function backtrack (line 10) | void backtrack(vector &state, const vector &choices, vector> permutationsI(vector nums) { function main (line 43) | int main() { FILE: codes/cpp/chapter_backtracking/permutations_ii.cpp function backtrack (line 10) | void backtrack(vector &state, const vector &choices, vector> permutationsII(vector nums) { function main (line 45) | int main() { FILE: codes/cpp/chapter_backtracking/preorder_traversal_i_compact.cpp function preOrder (line 12) | void preOrder(TreeNode *root) { function main (line 25) | int main() { FILE: codes/cpp/chapter_backtracking/preorder_traversal_ii_compact.cpp function preOrder (line 13) | void preOrder(TreeNode *root) { function main (line 30) | int main() { FILE: codes/cpp/chapter_backtracking/preorder_traversal_iii_compact.cpp function preOrder (line 13) | void preOrder(TreeNode *root) { function main (line 31) | int main() { FILE: codes/cpp/chapter_backtracking/preorder_traversal_iii_template.cpp function isSolution (line 10) | bool isSolution(vector &state) { function recordSolution (line 15) | void recordSolution(vector &state, vector... function isValid (line 20) | bool isValid(vector &state, TreeNode *choice) { function makeChoice (line 25) | void makeChoice(vector &state, TreeNode *choice) { function undoChoice (line 30) | void undoChoice(vector &state, TreeNode *choice) { function backtrack (line 35) | void backtrack(vector &state, vector &choices, v... function main (line 57) | int main() { FILE: codes/cpp/chapter_backtracking/subset_sum_i.cpp function backtrack (line 10) | void backtrack(vector &state, int target, vector &choices, int... function subsetSumI (line 34) | vector> subsetSumI(vector &nums, int target) { function main (line 44) | int main() { FILE: codes/cpp/chapter_backtracking/subset_sum_i_naive.cpp function backtrack (line 10) | void backtrack(vector &state, int target, int total, vector &c... function subsetSumINaive (line 32) | vector> subsetSumINaive(vector &nums, int target) { function main (line 41) | int main() { FILE: codes/cpp/chapter_backtracking/subset_sum_ii.cpp function backtrack (line 10) | void backtrack(vector &state, int target, vector &choices, int... function subsetSumII (line 39) | vector> subsetSumII(vector &nums, int target) { function main (line 49) | int main() { FILE: codes/cpp/chapter_computational_complexity/iteration.cpp function forLoop (line 10) | int forLoop(int n) { function whileLoop (line 20) | int whileLoop(int n) { function whileLoopII (line 32) | int whileLoopII(int n) { function string (line 46) | string nestedForLoop(int n) { function main (line 59) | int main() { FILE: codes/cpp/chapter_computational_complexity/recursion.cpp function recur (line 10) | int recur(int n) { function forLoopRecur (line 21) | int forLoopRecur(int n) { function tailRecur (line 41) | int tailRecur(int n, int res) { function fib (line 50) | int fib(int n) { function main (line 61) | int main() { FILE: codes/cpp/chapter_computational_complexity/space_complexity.cpp function func (line 10) | int func() { function constant (line 16) | void constant(int n) { function linear (line 33) | void linear(int n) { function linearRecur (line 49) | void linearRecur(int n) { function quadratic (line 57) | void quadratic(int n) { function quadraticRecur (line 70) | int quadraticRecur(int n) { function TreeNode (line 79) | TreeNode *buildTree(int n) { function main (line 89) | int main() { FILE: codes/cpp/chapter_computational_complexity/time_complexity.cpp function constant (line 10) | int constant(int n) { function linear (line 19) | int linear(int n) { function arrayTraversal (line 27) | int arrayTraversal(vector &nums) { function quadratic (line 37) | int quadratic(int n) { function bubbleSort (line 49) | int bubbleSort(vector &nums) { function exponential (line 68) | int exponential(int n) { function expRecur (line 82) | int expRecur(int n) { function logarithmic (line 89) | int logarithmic(int n) { function logRecur (line 99) | int logRecur(int n) { function linearLogRecur (line 106) | int linearLogRecur(int n) { function factorialRecur (line 117) | int factorialRecur(int n) { function main (line 129) | int main() { FILE: codes/cpp/chapter_computational_complexity/worst_best_time_complexity.cpp function randomNumbers (line 10) | vector randomNumbers(int n) { function findOne (line 24) | int findOne(vector &nums) { function main (line 35) | int main() { FILE: codes/cpp/chapter_divide_and_conquer/binary_search_recur.cpp function dfs (line 10) | int dfs(vector &nums, int target, int i, int j) { function binarySearch (line 30) | int binarySearch(vector &nums, int target) { function main (line 37) | int main() { FILE: codes/cpp/chapter_divide_and_conquer/build_tree.cpp function TreeNode (line 10) | TreeNode *dfs(vector &preorder, unordered_map &inorderMap... function TreeNode (line 27) | TreeNode *buildTree(vector &preorder, vector &inorder) { function main (line 38) | int main() { FILE: codes/cpp/chapter_divide_and_conquer/hanota.cpp function move (line 10) | void move(vector &src, vector &tar) { function dfs (line 19) | void dfs(int i, vector &src, vector &buf, vector &tar) { function solveHanota (line 34) | void solveHanota(vector &A, vector &B, vector &C) { function main (line 41) | int main() { FILE: codes/cpp/chapter_dynamic_programming/climbing_stairs_backtrack.cpp function backtrack (line 11) | void backtrack(vector &choices, int state, int n, vector &res) { function climbingStairsBacktrack (line 27) | int climbingStairsBacktrack(int n) { function main (line 36) | int main() { FILE: codes/cpp/chapter_dynamic_programming/climbing_stairs_constraint_dp.cpp function climbingStairsConstraintDP (line 10) | int climbingStairsConstraintDP(int n) { function main (line 30) | int main() { FILE: codes/cpp/chapter_dynamic_programming/climbing_stairs_dfs.cpp function dfs (line 10) | int dfs(int i) { function climbingStairsDFS (line 20) | int climbingStairsDFS(int n) { function main (line 25) | int main() { FILE: codes/cpp/chapter_dynamic_programming/climbing_stairs_dfs_mem.cpp function dfs (line 10) | int dfs(int i, vector &mem) { function climbingStairsDFSMem (line 25) | int climbingStairsDFSMem(int n) { function main (line 32) | int main() { FILE: codes/cpp/chapter_dynamic_programming/climbing_stairs_dp.cpp function climbingStairsDP (line 10) | int climbingStairsDP(int n) { function climbingStairsDPComp (line 26) | int climbingStairsDPComp(int n) { function main (line 39) | int main() { FILE: codes/cpp/chapter_dynamic_programming/coin_change.cpp function coinChangeDP (line 10) | int coinChangeDP(vector &coins, int amt) { function coinChangeDPComp (line 35) | int coinChangeDPComp(vector &coins, int amt) { function main (line 57) | int main() { FILE: codes/cpp/chapter_dynamic_programming/coin_change_ii.cpp function coinChangeIIDP (line 10) | int coinChangeIIDP(vector &coins, int amt) { function coinChangeIIDPComp (line 34) | int coinChangeIIDPComp(vector &coins, int amt) { function main (line 55) | int main() { FILE: codes/cpp/chapter_dynamic_programming/edit_distance.cpp function editDistanceDFS (line 10) | int editDistanceDFS(string s, string t, int i, int j) { function editDistanceDFSMem (line 32) | int editDistanceDFSMem(string s, string t, vector> &mem, int... function editDistanceDP (line 58) | int editDistanceDP(string s, string t) { function editDistanceDPComp (line 84) | int editDistanceDPComp(string s, string t) { function main (line 113) | int main() { FILE: codes/cpp/chapter_dynamic_programming/knapsack.cpp function knapsackDFS (line 8) | int knapsackDFS(vector &wgt, vector &val, int i, int c) { function knapsackDFSMem (line 25) | int knapsackDFSMem(vector &wgt, vector &val, vector &wgt, vector &val, int cap) { function knapsackDPComp (line 67) | int knapsackDPComp(vector &wgt, vector &val, int cap) { function main (line 85) | int main() { FILE: codes/cpp/chapter_dynamic_programming/min_cost_climbing_stairs_dp.cpp function minCostClimbingStairsDP (line 10) | int minCostClimbingStairsDP(vector &cost) { function minCostClimbingStairsDPComp (line 27) | int minCostClimbingStairsDPComp(vector &cost) { function main (line 41) | int main() { FILE: codes/cpp/chapter_dynamic_programming/min_path_sum.cpp function minPathSumDFS (line 10) | int minPathSumDFS(vector> &grid, int i, int j) { function minPathSumDFSMem (line 27) | int minPathSumDFSMem(vector> &grid, vector> &mem... function minPathSumDP (line 49) | int minPathSumDP(vector> &grid) { function minPathSumDPComp (line 72) | int minPathSumDPComp(vector> &grid) { function main (line 94) | int main() { FILE: codes/cpp/chapter_dynamic_programming/unbounded_knapsack.cpp function unboundedKnapsackDP (line 10) | int unboundedKnapsackDP(vector &wgt, vector &val, int cap) { function unboundedKnapsackDPComp (line 30) | int unboundedKnapsackDPComp(vector &wgt, vector &val, int cap) { function main (line 50) | int main() { FILE: codes/cpp/chapter_graph/graph_adjacency_list.cpp class GraphAdjList (line 10) | class GraphAdjList { method remove (line 16) | void remove(vector &vec, Vertex *vet) { method GraphAdjList (line 26) | GraphAdjList(const vector> &edges) { method size (line 36) | int size() { method addEdge (line 41) | void addEdge(Vertex *vet1, Vertex *vet2) { method removeEdge (line 50) | void removeEdge(Vertex *vet1, Vertex *vet2) { method addVertex (line 59) | void addVertex(Vertex *vet) { method removeVertex (line 67) | void removeVertex(Vertex *vet) { method print (line 79) | void print() { FILE: codes/cpp/chapter_graph/graph_adjacency_list_test.cpp function main (line 10) | int main() { FILE: codes/cpp/chapter_graph/graph_adjacency_matrix.cpp class GraphAdjMat (line 10) | class GraphAdjMat { method GraphAdjMat (line 16) | GraphAdjMat(const vector &vertices, const vector> &ed... method size (line 29) | int size() const { method addVertex (line 34) | void addVertex(int val) { method removeVertex (line 47) | void removeVertex(int index) { method addEdge (line 63) | void addEdge(int i, int j) { method removeEdge (line 75) | void removeEdge(int i, int j) { method print (line 85) | void print() { function main (line 94) | int main() { FILE: codes/cpp/chapter_graph/graph_bfs.cpp function graphBFS (line 12) | vector graphBFS(GraphAdjList &graph, Vertex *startVet) { function main (line 38) | int main() { FILE: codes/cpp/chapter_graph/graph_dfs.cpp function dfs (line 11) | void dfs(GraphAdjList &graph, unordered_set &visited, vector graphDFS(GraphAdjList &graph, Vertex *startVet) { function main (line 35) | int main() { FILE: codes/cpp/chapter_greedy/coin_change_greedy.cpp function coinChangeGreedy (line 10) | int coinChangeGreedy(vector &coins, int amt) { function main (line 29) | int main() { FILE: codes/cpp/chapter_greedy/fractional_knapsack.cpp class Item (line 10) | class Item { method Item (line 15) | Item(int w, int v) : w(w), v(v) { function fractionalKnapsack (line 20) | double fractionalKnapsack(vector &wgt, vector &val, int cap) { function main (line 46) | int main() { FILE: codes/cpp/chapter_greedy/max_capacity.cpp function maxCapacity (line 10) | int maxCapacity(vector &ht) { function main (line 31) | int main() { FILE: codes/cpp/chapter_greedy/max_product_cutting.cpp function maxProductCutting (line 10) | int maxProductCutting(int n) { function main (line 31) | int main() { FILE: codes/cpp/chapter_hashing/array_hash_map.cpp type Pair (line 10) | struct Pair { method Pair (line 14) | Pair(int key, string val) { class ArrayHashMap (line 21) | class ArrayHashMap { method ArrayHashMap (line 26) | ArrayHashMap() { method hashFunc (line 40) | int hashFunc(int key) { method string (line 46) | string get(int key) { method put (line 55) | void put(int key, string val) { method remove (line 62) | void remove(int key) { method pairSet (line 70) | vector pairSet() { method keySet (line 81) | vector keySet() { method valueSet (line 92) | vector valueSet() { method print (line 103) | void print() { FILE: codes/cpp/chapter_hashing/array_hash_map_test.cpp function main (line 10) | int main() { FILE: codes/cpp/chapter_hashing/built_in_hash.cpp function main (line 10) | int main() { FILE: codes/cpp/chapter_hashing/hash_map.cpp function main (line 10) | int main() { FILE: codes/cpp/chapter_hashing/hash_map_chaining.cpp class HashMapChaining (line 10) | class HashMapChaining { method HashMapChaining (line 20) | HashMapChaining() : size(0), capacity(4), loadThres(2.0 / 3.0), extend... method hashFunc (line 35) | int hashFunc(int key) { method loadFactor (line 40) | double loadFactor() { method string (line 45) | string get(int key) { method put (line 58) | void put(int key, string val) { method remove (line 77) | void remove(int key) { method extend (line 93) | void extend() { method print (line 112) | void print() { function main (line 124) | int main() { FILE: codes/cpp/chapter_hashing/hash_map_open_addressing.cpp class HashMapOpenAddressing (line 10) | class HashMapOpenAddressing { method HashMapOpenAddressing (line 21) | HashMapOpenAddressing() : size(0), buckets(capacity, nullptr) { method hashFunc (line 35) | int hashFunc(int key) { method loadFactor (line 40) | double loadFactor() { method findBucket (line 45) | int findBucket(int key) { method string (line 72) | string get(int key) { method put (line 84) | void put(int key, string val) { method remove (line 102) | void remove(int key) { method extend (line 114) | void extend() { method print (line 131) | void print() { function main (line 145) | int main() { FILE: codes/cpp/chapter_hashing/simple_hash.cpp function addHash (line 10) | int addHash(string key) { function mulHash (line 20) | int mulHash(string key) { function xorHash (line 30) | int xorHash(string key) { function rotHash (line 40) | int rotHash(string key) { function main (line 50) | int main() { FILE: codes/cpp/chapter_heap/heap.cpp function testPush (line 9) | void testPush(priority_queue &heap, int val) { function testPop (line 15) | void testPop(priority_queue &heap) { function main (line 23) | int main() { FILE: codes/cpp/chapter_heap/my_heap.cpp class MaxHeap (line 10) | class MaxHeap { method left (line 16) | int left(int i) { method right (line 21) | int right(int i) { method parent (line 26) | int parent(int i) { method siftUp (line 31) | void siftUp(int i) { method siftDown (line 46) | void siftDown(int i) { method MaxHeap (line 65) | MaxHeap(vector nums) { method size (line 75) | int size() { method isEmpty (line 80) | bool isEmpty() { method peek (line 85) | int peek() { method push (line 90) | void push(int val) { method pop (line 98) | void pop() { method print (line 112) | void print() { function main (line 123) | int main() { FILE: codes/cpp/chapter_heap/top_k.cpp function topKHeap (line 10) | priority_queue, greater> topKHeap(vector &num... function main (line 29) | int main() { FILE: codes/cpp/chapter_searching/binary_search.cpp function binarySearch (line 10) | int binarySearch(vector &nums, int target) { function binarySearchLCRO (line 28) | int binarySearchLCRO(vector &nums, int target) { function main (line 46) | int main() { FILE: codes/cpp/chapter_searching/binary_search_edge.cpp function binarySearchInsertion (line 10) | int binarySearchInsertion(const vector &nums, int target) { function binarySearchLeftEdge (line 25) | int binarySearchLeftEdge(vector &nums, int target) { function binarySearchRightEdge (line 37) | int binarySearchRightEdge(vector &nums, int target) { function main (line 51) | int main() { FILE: codes/cpp/chapter_searching/binary_search_insertion.cpp function binarySearchInsertionSimple (line 10) | int binarySearchInsertionSimple(vector &nums, int target) { function binarySearchInsertion (line 27) | int binarySearchInsertion(vector &nums, int target) { function main (line 44) | int main() { FILE: codes/cpp/chapter_searching/hashing_search.cpp function hashingSearchArray (line 10) | int hashingSearchArray(unordered_map map, int target) { function ListNode (line 19) | ListNode *hashingSearchLinkedList(unordered_map map, in... function main (line 28) | int main() { FILE: codes/cpp/chapter_searching/linear_search.cpp function linearSearchArray (line 10) | int linearSearchArray(vector &nums, int target) { function ListNode (line 22) | ListNode *linearSearchLinkedList(ListNode *head, int target) { function main (line 35) | int main() { FILE: codes/cpp/chapter_searching/two_sum.cpp function twoSumBruteForce (line 10) | vector twoSumBruteForce(vector &nums, int target) { function twoSumHashTable (line 23) | vector twoSumHashTable(vector &nums, int target) { function main (line 38) | int main() { FILE: codes/cpp/chapter_sorting/bubble_sort.cpp function bubbleSort (line 10) | void bubbleSort(vector &nums) { function bubbleSortWithFlag (line 25) | void bubbleSortWithFlag(vector &nums) { function main (line 44) | int main() { FILE: codes/cpp/chapter_sorting/bucket_sort.cpp function bucketSort (line 10) | void bucketSort(vector &nums) { function main (line 36) | int main() { FILE: codes/cpp/chapter_sorting/counting_sort.cpp function countingSortNaive (line 11) | void countingSortNaive(vector &nums) { function countingSort (line 34) | void countingSort(vector &nums) { function main (line 65) | int main() { FILE: codes/cpp/chapter_sorting/heap_sort.cpp function siftDown (line 10) | void siftDown(vector &nums, int n, int i) { function heapSort (line 32) | void heapSort(vector &nums) { function main (line 47) | int main() { FILE: codes/cpp/chapter_sorting/insertion_sort.cpp function insertionSort (line 10) | void insertionSort(vector &nums) { function main (line 24) | int main() { FILE: codes/cpp/chapter_sorting/merge_sort.cpp function merge (line 10) | void merge(vector &nums, int left, int mid, int right) { function mergeSort (line 37) | void mergeSort(vector &nums, int left, int right) { function main (line 50) | int main() { FILE: codes/cpp/chapter_sorting/quick_sort.cpp class QuickSort (line 10) | class QuickSort { method partition (line 13) | static int partition(vector &nums, int left, int right) { method quickSort (line 29) | static void quickSort(vector &nums, int left, int right) { class QuickSortMedian (line 42) | class QuickSortMedian { method medianThree (line 45) | static int medianThree(vector &nums, int left, int mid, int right) { method partition (line 55) | static int partition(vector &nums, int left, int right) { method quickSort (line 75) | static void quickSort(vector &nums, int left, int right) { class QuickSortTailCall (line 88) | class QuickSortTailCall { method partition (line 91) | static int partition(vector &nums, int left, int right) { method quickSort (line 107) | static void quickSort(vector &nums, int left, int right) { function main (line 125) | int main() { FILE: codes/cpp/chapter_sorting/radix_sort.cpp function digit (line 10) | int digit(int num, int exp) { function countingSortDigit (line 16) | void countingSortDigit(vector &nums, int exp) { function radixSort (line 43) | void radixSort(vector &nums) { function main (line 56) | int main() { FILE: codes/cpp/chapter_sorting/selection_sort.cpp function selectionSort (line 10) | void selectionSort(vector &nums) { function main (line 26) | int main() { FILE: codes/cpp/chapter_stack_and_queue/array_deque.cpp class ArrayDeque (line 10) | class ArrayDeque { method ArrayDeque (line 18) | ArrayDeque(int capacity) { method capacity (line 24) | int capacity() { method size (line 29) | int size() { method isEmpty (line 34) | bool isEmpty() { method index (line 39) | int index(int i) { method pushFirst (line 47) | void pushFirst(int num) { method pushLast (line 61) | void pushLast(int num) { method popFirst (line 74) | int popFirst() { method popLast (line 83) | int popLast() { method peekFirst (line 90) | int peekFirst() { method peekLast (line 97) | int peekLast() { method toVector (line 106) | vector toVector() { function main (line 117) | int main() { FILE: codes/cpp/chapter_stack_and_queue/array_queue.cpp class ArrayQueue (line 10) | class ArrayQueue { method ArrayQueue (line 18) | ArrayQueue(int capacity) { method capacity (line 30) | int capacity() { method size (line 35) | int size() { method isEmpty (line 40) | bool isEmpty() { method push (line 45) | void push(int num) { method pop (line 59) | int pop() { method peek (line 68) | int peek() { method toVector (line 75) | vector toVector() { function main (line 86) | int main() { FILE: codes/cpp/chapter_stack_and_queue/array_stack.cpp class ArrayStack (line 10) | class ArrayStack { method size (line 16) | int size() { method isEmpty (line 21) | bool isEmpty() { method push (line 26) | void push(int num) { method pop (line 31) | int pop() { method top (line 38) | int top() { method toVector (line 45) | vector toVector() { function main (line 51) | int main() { FILE: codes/cpp/chapter_stack_and_queue/deque.cpp function main (line 10) | int main() { FILE: codes/cpp/chapter_stack_and_queue/linkedlist_deque.cpp type DoublyListNode (line 10) | struct DoublyListNode { method DoublyListNode (line 14) | DoublyListNode(int val) : val(val), prev(nullptr), next(nullptr) { class LinkedListDeque (line 19) | class LinkedListDeque { method LinkedListDeque (line 26) | LinkedListDeque() : front(nullptr), rear(nullptr) { method size (line 41) | int size() { method isEmpty (line 46) | bool isEmpty() { method push (line 51) | void push(int num, bool isFront) { method pushFirst (line 73) | void pushFirst(int num) { method pushLast (line 78) | void pushLast(int num) { method pop (line 83) | int pop(bool isFront) { method popFirst (line 115) | int popFirst() { method popLast (line 120) | int popLast() { method peekFirst (line 125) | int peekFirst() { method peekLast (line 132) | int peekLast() { method toVector (line 139) | vector toVector() { function main (line 151) | int main() { FILE: codes/cpp/chapter_stack_and_queue/linkedlist_queue.cpp class LinkedListQueue (line 10) | class LinkedListQueue { method LinkedListQueue (line 16) | LinkedListQueue() { method size (line 28) | int size() { method isEmpty (line 33) | bool isEmpty() { method push (line 38) | void push(int num) { method pop (line 55) | int pop() { method peek (line 67) | int peek() { method toVector (line 74) | vector toVector() { function main (line 86) | int main() { FILE: codes/cpp/chapter_stack_and_queue/linkedlist_stack.cpp class LinkedListStack (line 10) | class LinkedListStack { method LinkedListStack (line 16) | LinkedListStack() { method size (line 27) | int size() { method isEmpty (line 32) | bool isEmpty() { method push (line 37) | void push(int num) { method pop (line 45) | int pop() { method top (line 56) | int top() { method toVector (line 63) | vector toVector() { function main (line 75) | int main() { FILE: codes/cpp/chapter_stack_and_queue/queue.cpp function main (line 10) | int main() { FILE: codes/cpp/chapter_stack_and_queue/stack.cpp function main (line 10) | int main() { FILE: codes/cpp/chapter_tree/array_binary_tree.cpp class ArrayBinaryTree (line 10) | class ArrayBinaryTree { method ArrayBinaryTree (line 13) | ArrayBinaryTree(vector arr) { method size (line 18) | int size() { method val (line 23) | int val(int i) { method left (line 31) | int left(int i) { method right (line 36) | int right(int i) { method parent (line 41) | int parent(int i) { method levelOrder (line 46) | vector levelOrder() { method preOrder (line 57) | vector preOrder() { method inOrder (line 64) | vector inOrder() { method postOrder (line 71) | vector postOrder() { method dfs (line 81) | void dfs(int i, string order, vector &res) { function main (line 100) | int main() { FILE: codes/cpp/chapter_tree/avl_tree.cpp class AVLTree (line 10) | class AVLTree { method updateHeight (line 13) | void updateHeight(TreeNode *node) { method TreeNode (line 19) | TreeNode *rightRotate(TreeNode *node) { method TreeNode (line 33) | TreeNode *leftRotate(TreeNode *node) { method TreeNode (line 47) | TreeNode *rotate(TreeNode *node) { method TreeNode (line 77) | TreeNode *insertHelper(TreeNode *node, int val) { method TreeNode (line 95) | TreeNode *removeHelper(TreeNode *node, int val) { method height (line 138) | int height(TreeNode *node) { method balanceFactor (line 144) | int balanceFactor(TreeNode *node) { method insert (line 153) | void insert(int val) { method remove (line 158) | void remove(int val) { method TreeNode (line 163) | TreeNode *search(int val) { method AVLTree (line 182) | AVLTree() : root(nullptr) { function testInsert (line 191) | void testInsert(AVLTree &tree, int val) { function testRemove (line 197) | void testRemove(AVLTree &tree, int val) { function main (line 204) | int main() { FILE: codes/cpp/chapter_tree/binary_search_tree.cpp class BinarySearchTree (line 10) | class BinarySearchTree { method BinarySearchTree (line 16) | BinarySearchTree() { method TreeNode (line 27) | TreeNode *getRoot() { method TreeNode (line 32) | TreeNode *search(int num) { method insert (line 51) | void insert(int num) { method remove (line 80) | void remove(int num) { function main (line 135) | int main() { FILE: codes/cpp/chapter_tree/binary_tree.cpp function main (line 10) | int main() { FILE: codes/cpp/chapter_tree/binary_tree_bfs.cpp function levelOrder (line 10) | vector levelOrder(TreeNode *root) { function main (line 29) | int main() { FILE: codes/cpp/chapter_tree/binary_tree_dfs.cpp function preOrder (line 13) | void preOrder(TreeNode *root) { function inOrder (line 23) | void inOrder(TreeNode *root) { function postOrder (line 33) | void postOrder(TreeNode *root) { function main (line 43) | int main() { FILE: codes/cpp/utils/list_node.hpp type ListNode (line 15) | struct ListNode { method ListNode (line 18) | ListNode(int x) : val(x), next(nullptr) { function ListNode (line 23) | ListNode *vecToLinkedList(vector list) { method ListNode (line 18) | ListNode(int x) : val(x), next(nullptr) { function freeMemoryLinkedList (line 34) | void freeMemoryLinkedList(ListNode *cur) { FILE: codes/cpp/utils/print_utils.hpp function vecFind (line 17) | int vecFind(const vector &vec, T ele) { function string (line 28) | string strJoin(const string &delim, const T &vec) { function string (line 40) | string strRepeat(string str, int n) { function printArray (line 48) | void printArray(T *arr, int n) { function string (line 60) | string getVectorString(vector &list) { function printVector (line 65) | void printVector(vector list) { function printVectorMatrix (line 70) | void printVectorMatrix(vector> &matrix) { function printLinkedList (line 78) | void printLinkedList(ListNode *head) { type Trunk (line 88) | struct Trunk { method Trunk (line 91) | Trunk(Trunk *prev, string str) { function showTrunks (line 97) | void showTrunks(Trunk *p) { function printTree (line 111) | void printTree(TreeNode *root, Trunk *prev, bool isRight) { function printTree (line 143) | void printTree(TreeNode *root) { function printStack (line 148) | void printStack(stack stk) { function printQueue (line 170) | void printQueue(queue queue) { function printDeque (line 186) | void printDeque(deque deque) { function printHashMap (line 203) | void printHashMap(unordered_map map) { function S (line 210) | S &Container(priority_queue &pq) { function printHeap (line 220) | void printHeap(priority_queue &heap) { FILE: codes/cpp/utils/tree_node.hpp type TreeNode (line 15) | struct TreeNode { method TreeNode (line 21) | TreeNode() = default; method TreeNode (line 22) | explicit TreeNode(int x, TreeNode *parent = nullptr) : val(x), parent(... function TreeNode (line 43) | TreeNode *vectorToTreeDFS(vector &arr, int i) { method TreeNode (line 21) | TreeNode() = default; method TreeNode (line 22) | explicit TreeNode(int x, TreeNode *parent = nullptr) : val(x), parent(... function TreeNode (line 54) | TreeNode *vectorToTree(vector arr) { method TreeNode (line 21) | TreeNode() = default; method TreeNode (line 22) | explicit TreeNode(int x, TreeNode *parent = nullptr) : val(x), parent(... function treeToVecorDFS (line 59) | void treeToVecorDFS(TreeNode *root, int i, vector &res) { function treeToVecor (line 71) | vector treeToVecor(TreeNode *root) { function freeMemoryTree (line 78) | void freeMemoryTree(TreeNode *root) { FILE: codes/cpp/utils/vertex.hpp type Vertex (line 14) | struct Vertex { method Vertex (line 16) | Vertex(int x) : val(x) { function valsToVets (line 21) | vector valsToVets(vector vals) { function vetsToVals (line 30) | vector vetsToVals(vector vets) { FILE: codes/csharp/chapter_array_and_linkedlist/array.cs class array (line 7) | public class array { method RandomAccess (line 9) | int RandomAccess(int[] nums) { method Extend (line 19) | int[] Extend(int[] nums, int enlarge) { method Insert (line 31) | void Insert(int[] nums, int num, int index) { method Remove (line 41) | void Remove(int[] nums, int index) { method Traverse (line 49) | void Traverse(int[] nums) { method Find (line 62) | int Find(int[] nums, int target) { method ToString (line 71) | string ToString(int[] nums) { method Test (line 76) | [Test] FILE: codes/csharp/chapter_array_and_linkedlist/linked_list.cs class linked_list (line 7) | public class linked_list { method Insert (line 9) | void Insert(ListNode n0, ListNode P) { method Remove (line 16) | void Remove(ListNode n0) { method Access (line 26) | ListNode? Access(ListNode? head, int index) { method Find (line 36) | int Find(ListNode? head, int target) { method Test (line 48) | [Test] FILE: codes/csharp/chapter_array_and_linkedlist/list.cs class list (line 9) | public class list { method Test (line 10) | [Test] FILE: codes/csharp/chapter_array_and_linkedlist/my_list.cs class MyList (line 10) | class MyList { method MyList (line 17) | public MyList() { method Size (line 22) | public int Size() { method Capacity (line 27) | public int Capacity() { method Get (line 32) | public int Get(int index) { method Set (line 40) | public void Set(int index, int num) { method Add (line 47) | public void Add(int num) { method Insert (line 57) | public void Insert(int index, int num) { method Remove (line 73) | public int Remove(int index) { method ExtendCapacity (line 88) | public void ExtendCapacity() { method ToArray (line 96) | public int[] ToArray() { class my_list (line 106) | public class my_list { method Test (line 107) | [Test] FILE: codes/csharp/chapter_backtracking/n_queens.cs class n_queens (line 9) | public class n_queens { method Backtrack (line 11) | void Backtrack(int row, int n, List> state, List>> NQueens(int n) { method Test (line 62) | [Test] FILE: codes/csharp/chapter_backtracking/permutations_i.cs class permutations_i (line 9) | public class permutations_i { method Backtrack (line 11) | void Backtrack(List state, int[] choices, bool[] selected, List> PermutationsI(int[] nums) { method Test (line 41) | [Test] FILE: codes/csharp/chapter_backtracking/permutations_ii.cs class permutations_ii (line 9) | public class permutations_ii { method Backtrack (line 11) | void Backtrack(List state, int[] choices, bool[] selected, List> PermutationsII(int[] nums) { method Test (line 43) | [Test] FILE: codes/csharp/chapter_backtracking/preorder_traversal_i_compact.cs class preorder_traversal_i_compact (line 9) | public class preorder_traversal_i_compact { method PreOrder (line 13) | void PreOrder(TreeNode? root) { method Test (line 25) | [Test] FILE: codes/csharp/chapter_backtracking/preorder_traversal_ii_compact.cs class preorder_traversal_ii_compact (line 9) | public class preorder_traversal_ii_compact { method PreOrder (line 14) | void PreOrder(TreeNode? root) { method Test (line 30) | [Test] FILE: codes/csharp/chapter_backtracking/preorder_traversal_iii_compact.cs class preorder_traversal_iii_compact (line 9) | public class preorder_traversal_iii_compact { method PreOrder (line 14) | void PreOrder(TreeNode? root) { method Test (line 31) | [Test] FILE: codes/csharp/chapter_backtracking/preorder_traversal_iii_template.cs class preorder_traversal_iii_template (line 9) | public class preorder_traversal_iii_template { method IsSolution (line 11) | bool IsSolution(List state) { method RecordSolution (line 16) | void RecordSolution(List state, List> res) { method IsValid (line 21) | bool IsValid(List state, TreeNode choice) { method MakeChoice (line 26) | void MakeChoice(List state, TreeNode choice) { method UndoChoice (line 31) | void UndoChoice(List state, TreeNode choice) { method Backtrack (line 36) | void Backtrack(List state, List choices, List state, int target, int[] choices, int start, ... method SubsetSumI (line 35) | List> SubsetSumI(int[] nums, int target) { method Test (line 44) | [Test] FILE: codes/csharp/chapter_backtracking/subset_sum_i_naive.cs class subset_sum_i_naive (line 9) | public class subset_sum_i_naive { method Backtrack (line 11) | void Backtrack(List state, int target, int total, int[] choices, ... method SubsetSumINaive (line 33) | List> SubsetSumINaive(int[] nums, int target) { method Test (line 41) | [Test] FILE: codes/csharp/chapter_backtracking/subset_sum_ii.cs class subset_sum_ii (line 9) | public class subset_sum_ii { method Backtrack (line 11) | void Backtrack(List state, int target, int[] choices, int start, ... method SubsetSumII (line 40) | List> SubsetSumII(int[] nums, int target) { method Test (line 49) | [Test] FILE: codes/csharp/chapter_computational_complexity/iteration.cs class iteration (line 9) | public class iteration { method ForLoop (line 11) | int ForLoop(int n) { method WhileLoop (line 21) | int WhileLoop(int n) { method WhileLoopII (line 33) | int WhileLoopII(int n) { method NestedForLoop (line 47) | string NestedForLoop(int n) { method Test (line 60) | [Test] FILE: codes/csharp/chapter_computational_complexity/recursion.cs class recursion (line 9) | public class recursion { method Recur (line 11) | int Recur(int n) { method ForLoopRecur (line 22) | int ForLoopRecur(int n) { method TailRecur (line 41) | int TailRecur(int n, int res) { method Fib (line 50) | int Fib(int n) { method Test (line 61) | [Test] FILE: codes/csharp/chapter_computational_complexity/space_complexity.cs class space_complexity (line 9) | public class space_complexity { method Function (line 11) | int Function() { method Constant (line 17) | void Constant(int n) { method Linear (line 34) | void Linear(int n) { method LinearRecur (line 50) | void LinearRecur(int n) { method Quadratic (line 57) | void Quadratic(int n) { method QuadraticRecur (line 72) | int QuadraticRecur(int n) { method BuildTree (line 80) | TreeNode? BuildTree(int n) { method Test (line 89) | [Test] FILE: codes/csharp/chapter_computational_complexity/time_complexity.cs class time_complexity (line 9) | public class time_complexity { method Algorithm (line 10) | void Algorithm(int n) { method AlgorithmA (line 26) | void AlgorithmA(int n) { method AlgorithmB (line 31) | void AlgorithmB(int n) { method AlgorithmC (line 38) | void AlgorithmC(int n) { method Constant (line 45) | int Constant(int n) { method Linear (line 54) | int Linear(int n) { method ArrayTraversal (line 62) | int ArrayTraversal(int[] nums) { method Quadratic (line 72) | int Quadratic(int n) { method BubbleSort (line 84) | int BubbleSort(int[] nums) { method Exponential (line 101) | int Exponential(int n) { method ExpRecur (line 115) | int ExpRecur(int n) { method Logarithmic (line 121) | int Logarithmic(int n) { method LogRecur (line 131) | int LogRecur(int n) { method LinearLogRecur (line 137) | int LinearLogRecur(int n) { method FactorialRecur (line 147) | int FactorialRecur(int n) { method Test (line 157) | [Test] FILE: codes/csharp/chapter_computational_complexity/worst_best_time_complexity.cs class worst_best_time_complexity (line 9) | public class worst_best_time_complexity { method RandomNumbers (line 11) | int[] RandomNumbers(int n) { method FindOne (line 27) | int FindOne(int[] nums) { method Test (line 39) | [Test] FILE: codes/csharp/chapter_divide_and_conquer/binary_search_recur.cs class binary_search_recur (line 9) | public class binary_search_recur { method DFS (line 11) | int DFS(int[] nums, int target, int i, int j) { method BinarySearch (line 31) | int BinarySearch(int[] nums, int target) { method Test (line 37) | [Test] FILE: codes/csharp/chapter_divide_and_conquer/build_tree.cs class build_tree (line 9) | public class build_tree { method DFS (line 11) | TreeNode? DFS(int[] preorder, Dictionary inorderMap, int i, ... method BuildTree (line 28) | TreeNode? BuildTree(int[] preorder, int[] inorder) { method Test (line 38) | [Test] FILE: codes/csharp/chapter_divide_and_conquer/hanota.cs class hanota (line 9) | public class hanota { method Move (line 11) | void Move(List src, List tar) { method DFS (line 20) | void DFS(int i, List src, List buf, List tar) { method SolveHanota (line 35) | void SolveHanota(List A, List B, List C) { method Test (line 41) | [Test] FILE: codes/csharp/chapter_dynamic_programming/climbing_stairs_backtrack.cs class climbing_stairs_backtrack (line 9) | public class climbing_stairs_backtrack { method Backtrack (line 11) | void Backtrack(List choices, int state, int n, List res) { method ClimbingStairsBacktrack (line 27) | int ClimbingStairsBacktrack(int n) { method Test (line 35) | [Test] FILE: codes/csharp/chapter_dynamic_programming/climbing_stairs_constraint_dp.cs class climbing_stairs_constraint_dp (line 9) | public class climbing_stairs_constraint_dp { method ClimbingStairsConstraintDP (line 11) | int ClimbingStairsConstraintDP(int n) { method Test (line 30) | [Test] FILE: codes/csharp/chapter_dynamic_programming/climbing_stairs_dfs.cs class climbing_stairs_dfs (line 9) | public class climbing_stairs_dfs { method DFS (line 11) | int DFS(int i) { method ClimbingStairsDFS (line 21) | int ClimbingStairsDFS(int n) { method Test (line 25) | [Test] FILE: codes/csharp/chapter_dynamic_programming/climbing_stairs_dfs_mem.cs class climbing_stairs_dfs_mem (line 9) | public class climbing_stairs_dfs_mem { method DFS (line 11) | int DFS(int i, int[] mem) { method ClimbingStairsDFSMem (line 26) | int ClimbingStairsDFSMem(int n) { method Test (line 33) | [Test] FILE: codes/csharp/chapter_dynamic_programming/climbing_stairs_dp.cs class climbing_stairs_dp (line 9) | public class climbing_stairs_dp { method ClimbingStairsDP (line 11) | int ClimbingStairsDP(int n) { method ClimbingStairsDPComp (line 27) | int ClimbingStairsDPComp(int n) { method Test (line 39) | [Test] FILE: codes/csharp/chapter_dynamic_programming/coin_change.cs class coin_change (line 9) | public class coin_change { method CoinChangeDP (line 11) | int CoinChangeDP(int[] coins, int amt) { method CoinChangeDPComp (line 36) | int CoinChangeDPComp(int[] coins, int amt) { method Test (line 58) | [Test] FILE: codes/csharp/chapter_dynamic_programming/coin_change_ii.cs class coin_change_ii (line 9) | public class coin_change_ii { method CoinChangeIIDP (line 11) | int CoinChangeIIDP(int[] coins, int amt) { method CoinChangeIIDPComp (line 35) | int CoinChangeIIDPComp(int[] coins, int amt) { method Test (line 55) | [Test] FILE: codes/csharp/chapter_dynamic_programming/edit_distance.cs class edit_distance (line 9) | public class edit_distance { method EditDistanceDFS (line 11) | int EditDistanceDFS(string s, string t, int i, int j) { method EditDistanceDFSMem (line 33) | int EditDistanceDFSMem(string s, string t, int[][] mem, int i, int j) { method EditDistanceDP (line 59) | int EditDistanceDP(string s, string t) { method EditDistanceDPComp (line 85) | int EditDistanceDPComp(string s, string t) { method Test (line 113) | [Test] FILE: codes/csharp/chapter_dynamic_programming/knapsack.cs class knapsack (line 9) | public class knapsack { method KnapsackDFS (line 11) | int KnapsackDFS(int[] weight, int[] val, int i, int c) { method KnapsackDFSMem (line 28) | int KnapsackDFSMem(int[] weight, int[] val, int[][] mem, int i, int c) { method KnapsackDP (line 50) | int KnapsackDP(int[] weight, int[] val, int cap) { method KnapsackDPComp (line 70) | int KnapsackDPComp(int[] weight, int[] val, int cap) { method Test (line 90) | [Test] FILE: codes/csharp/chapter_dynamic_programming/min_cost_climbing_stairs_dp.cs class min_cost_climbing_stairs_dp (line 9) | public class min_cost_climbing_stairs_dp { method MinCostClimbingStairsDP (line 11) | int MinCostClimbingStairsDP(int[] cost) { method MinCostClimbingStairsDPComp (line 28) | int MinCostClimbingStairsDPComp(int[] cost) { method Test (line 41) | [Test] FILE: codes/csharp/chapter_dynamic_programming/min_path_sum.cs class min_path_sum (line 9) | public class min_path_sum { method MinPathSumDFS (line 11) | int MinPathSumDFS(int[][] grid, int i, int j) { method MinPathSumDFSMem (line 28) | int MinPathSumDFSMem(int[][] grid, int[][] mem, int i, int j) { method MinPathSumDP (line 50) | int MinPathSumDP(int[][] grid) { method MinPathSumDPComp (line 73) | int MinPathSumDPComp(int[][] grid) { method Test (line 94) | [Test] FILE: codes/csharp/chapter_dynamic_programming/unbounded_knapsack.cs class unbounded_knapsack (line 9) | public class unbounded_knapsack { method UnboundedKnapsackDP (line 11) | int UnboundedKnapsackDP(int[] wgt, int[] val, int cap) { method UnboundedKnapsackDPComp (line 31) | int UnboundedKnapsackDPComp(int[] wgt, int[] val, int cap) { method Test (line 50) | [Test] FILE: codes/csharp/chapter_graph/graph_adjacency_list.cs class GraphAdjList (line 10) | public class GraphAdjList { method GraphAdjList (line 15) | public GraphAdjList(Vertex[][] edges) { method Size (line 26) | int Size() { method AddEdge (line 31) | public void AddEdge(Vertex vet1, Vertex vet2) { method RemoveEdge (line 40) | public void RemoveEdge(Vertex vet1, Vertex vet2) { method AddVertex (line 49) | public void AddVertex(Vertex vet) { method RemoveVertex (line 57) | public void RemoveVertex(Vertex vet) { method Print (line 69) | public void Print() { class graph_adjacency_list (line 80) | public class graph_adjacency_list { method Test (line 81) | [Test] FILE: codes/csharp/chapter_graph/graph_adjacency_matrix.cs class GraphAdjMat (line 10) | class GraphAdjMat { method GraphAdjMat (line 15) | public GraphAdjMat(int[] vertices, int[][] edges) { method Size (line 30) | int Size() { method AddVertex (line 35) | public void AddVertex(int val) { method RemoveVertex (line 52) | public void RemoveVertex(int index) { method AddEdge (line 67) | public void AddEdge(int i, int j) { method RemoveEdge (line 78) | public void RemoveEdge(int i, int j) { method Print (line 87) | public void Print() { class graph_adjacency_matrix (line 95) | public class graph_adjacency_matrix { method Test (line 96) | [Test] FILE: codes/csharp/chapter_graph/graph_bfs.cs class graph_bfs (line 9) | public class graph_bfs { method GraphBFS (line 12) | List GraphBFS(GraphAdjList graph, Vertex startVet) { method Test (line 37) | [Test] FILE: codes/csharp/chapter_graph/graph_dfs.cs class graph_dfs (line 9) | public class graph_dfs { method DFS (line 11) | void DFS(GraphAdjList graph, HashSet visited, List res... method GraphDFS (line 26) | List GraphDFS(GraphAdjList graph, Vertex startVet) { method Test (line 35) | [Test] FILE: codes/csharp/chapter_greedy/coin_change_greedy.cs class coin_change_greedy (line 9) | public class coin_change_greedy { method CoinChangeGreedy (line 11) | int CoinChangeGreedy(int[] coins, int amt) { method Test (line 29) | [Test] FILE: codes/csharp/chapter_greedy/fractional_knapsack.cs class Item (line 10) | class Item(int w, int v) { class fractional_knapsack (line 15) | public class fractional_knapsack { method FractionalKnapsack (line 17) | double FractionalKnapsack(int[] wgt, int[] val, int cap) { method Test (line 42) | [Test] FILE: codes/csharp/chapter_greedy/max_capacity.cs class max_capacity (line 9) | public class max_capacity { method MaxCapacity (line 11) | int MaxCapacity(int[] ht) { method Test (line 31) | [Test] FILE: codes/csharp/chapter_greedy/max_product_cutting.cs class max_product_cutting (line 9) | public class max_product_cutting { method MaxProductCutting (line 11) | int MaxProductCutting(int n) { method Test (line 31) | [Test] FILE: codes/csharp/chapter_hashing/array_hash_map.cs class Pair (line 10) | class Pair(int key, string val) { class ArrayHashMap (line 16) | class ArrayHashMap { method ArrayHashMap (line 18) | public ArrayHashMap() { method HashFunc (line 27) | int HashFunc(int key) { method Get (line 33) | public string? Get(int key) { method Put (line 41) | public void Put(int key, string val) { method Remove (line 48) | public void Remove(int key) { method PairSet (line 55) | public List PairSet() { method KeySet (line 65) | public List KeySet() { method ValueSet (line 75) | public List ValueSet() { method Print (line 85) | public void Print() { class array_hash_map (line 93) | public class array_hash_map { method Test (line 94) | [Test] FILE: codes/csharp/chapter_hashing/built_in_hash.cs class built_in_hash (line 9) | public class built_in_hash { method Test (line 10) | [Test] FILE: codes/csharp/chapter_hashing/hash_map.cs class hash_map (line 10) | public class hash_map { method Test (line 11) | [Test] FILE: codes/csharp/chapter_hashing/hash_map_chaining.cs class HashMapChaining (line 10) | class HashMapChaining { method HashMapChaining (line 18) | public HashMapChaining() { method HashFunc (line 30) | int HashFunc(int key) { method LoadFactor (line 35) | double LoadFactor() { method Get (line 40) | public string? Get(int key) { method Put (line 53) | public void Put(int key, string val) { method Remove (line 72) | public void Remove(int key) { method Extend (line 85) | void Extend() { method Print (line 104) | public void Print() { class hash_map_chaining (line 117) | public class hash_map_chaining { method Test (line 118) | [Test] FILE: codes/csharp/chapter_hashing/hash_map_open_addressing.cs class HashMapOpenAddressing (line 10) | class HashMapOpenAddressing { method HashMapOpenAddressing (line 19) | public HashMapOpenAddressing() { method HashFunc (line 25) | int HashFunc(int key) { method LoadFactor (line 30) | double LoadFactor() { method FindBucket (line 35) | int FindBucket(int key) { method Get (line 62) | public string? Get(int key) { method Put (line 74) | public void Put(int key, string val) { method Remove (line 92) | public void Remove(int key) { method Extend (line 103) | void Extend() { method Print (line 119) | public void Print() { class hash_map_open_addressing (line 132) | public class hash_map_open_addressing { method Test (line 133) | [Test] FILE: codes/csharp/chapter_hashing/simple_hash.cs class simple_hash (line 9) | public class simple_hash { method AddHash (line 11) | int AddHash(string key) { method MulHash (line 21) | int MulHash(string key) { method XorHash (line 31) | int XorHash(string key) { method RotHash (line 41) | int RotHash(string key) { method Test (line 50) | [Test] FILE: codes/csharp/chapter_heap/heap.cs class heap (line 9) | public class heap { method TestPush (line 10) | void TestPush(PriorityQueue heap, int val) { method TestPop (line 16) | void TestPop(PriorityQueue heap) { method Test (line 22) | [Test] FILE: codes/csharp/chapter_heap/my_heap.cs class MaxHeap (line 10) | class MaxHeap { method MaxHeap (line 15) | public MaxHeap() { method MaxHeap (line 20) | public MaxHeap(IEnumerable nums) { method Left (line 31) | int Left(int i) { method Right (line 36) | int Right(int i) { method Parent (line 41) | int Parent(int i) { method Peek (line 46) | public int Peek() { method Push (line 51) | public void Push(int val) { method Size (line 59) | public int Size() { method IsEmpty (line 64) | public bool IsEmpty() { method SiftUp (line 69) | void SiftUp(int i) { method Pop (line 84) | public int Pop() { method SiftDown (line 100) | void SiftDown(int i) { method Swap (line 118) | void Swap(int i, int p) { method Print (line 123) | public void Print() { class my_heap (line 129) | public class my_heap { method Test (line 130) | [Test] FILE: codes/csharp/chapter_heap/top_k.cs class top_k (line 9) | public class top_k { method TopKHeap (line 11) | PriorityQueue TopKHeap(int[] nums, int k) { method Test (line 29) | [Test] FILE: codes/csharp/chapter_searching/binary_search.cs class binary_search (line 9) | public class binary_search { method BinarySearch (line 11) | int BinarySearch(int[] nums, int target) { method BinarySearchLCRO (line 29) | int BinarySearchLCRO(int[] nums, int target) { method Test (line 46) | [Test] FILE: codes/csharp/chapter_searching/binary_search_edge.cs class binary_search_edge (line 9) | public class binary_search_edge { method BinarySearchLeftEdge (line 11) | int BinarySearchLeftEdge(int[] nums, int target) { method BinarySearchRightEdge (line 23) | int BinarySearchRightEdge(int[] nums, int target) { method Test (line 36) | [Test] FILE: codes/csharp/chapter_searching/binary_search_insertion.cs class binary_search_insertion (line 9) | public class binary_search_insertion { method BinarySearchInsertionSimple (line 11) | public static int BinarySearchInsertionSimple(int[] nums, int target) { method BinarySearchInsertion (line 28) | public static int BinarySearchInsertion(int[] nums, int target) { method Test (line 44) | [Test] FILE: codes/csharp/chapter_searching/hashing_search.cs class hashing_search (line 9) | public class hashing_search { method HashingSearchArray (line 11) | int HashingSearchArray(Dictionary map, int target) { method HashingSearchLinkedList (line 18) | ListNode? HashingSearchLinkedList(Dictionary map, int t... method Test (line 25) | [Test] FILE: codes/csharp/chapter_searching/linear_search.cs class linear_search (line 9) | public class linear_search { method LinearSearchArray (line 11) | int LinearSearchArray(int[] nums, int target) { method LinearSearchLinkedList (line 23) | ListNode? LinearSearchLinkedList(ListNode? head, int target) { method Test (line 35) | [Test] FILE: codes/csharp/chapter_searching/two_sum.cs class two_sum (line 9) | public class two_sum { method TwoSumBruteForce (line 11) | int[] TwoSumBruteForce(int[] nums, int target) { method TwoSumHashTable (line 24) | int[] TwoSumHashTable(int[] nums, int target) { method Test (line 38) | [Test] FILE: codes/csharp/chapter_sorting/bubble_sort.cs class bubble_sort (line 9) | public class bubble_sort { method BubbleSort (line 11) | void BubbleSort(int[] nums) { method BubbleSortWithFlag (line 25) | void BubbleSortWithFlag(int[] nums) { method Test (line 41) | [Test] FILE: codes/csharp/chapter_sorting/bucket_sort.cs class bucket_sort (line 9) | public class bucket_sort { method BucketSort (line 11) | void BucketSort(float[] nums) { method Test (line 39) | [Test] FILE: codes/csharp/chapter_sorting/counting_sort.cs class counting_sort (line 9) | public class counting_sort { method CountingSortNaive (line 12) | void CountingSortNaive(int[] nums) { method CountingSort (line 35) | void CountingSort(int[] nums) { method Test (line 67) | [Test] FILE: codes/csharp/chapter_sorting/heap_sort.cs class heap_sort (line 9) | public class heap_sort { method SiftDown (line 11) | void SiftDown(int[] nums, int n, int i) { method HeapSort (line 32) | void HeapSort(int[] nums) { method Test (line 46) | [Test] FILE: codes/csharp/chapter_sorting/insertion_sort.cs class insertion_sort (line 9) | public class insertion_sort { method InsertionSort (line 11) | void InsertionSort(int[] nums) { method Test (line 24) | [Test] FILE: codes/csharp/chapter_sorting/merge_sort.cs class merge_sort (line 9) | public class merge_sort { method Merge (line 11) | void Merge(int[] nums, int left, int mid, int right) { method MergeSort (line 38) | void MergeSort(int[] nums, int left, int right) { method Test (line 49) | [Test] FILE: codes/csharp/chapter_sorting/quick_sort.cs class quickSort (line 9) | class quickSort { method Swap (line 11) | static void Swap(int[] nums, int i, int j) { method Partition (line 16) | static int Partition(int[] nums, int left, int right) { method QuickSort (line 31) | public static void QuickSort(int[] nums, int left, int right) { class QuickSortMedian (line 44) | class QuickSortMedian { method Swap (line 46) | static void Swap(int[] nums, int i, int j) { method MedianThree (line 51) | static int MedianThree(int[] nums, int left, int mid, int right) { method Partition (line 61) | static int Partition(int[] nums, int left, int right) { method QuickSort (line 80) | public static void QuickSort(int[] nums, int left, int right) { class QuickSortTailCall (line 93) | class QuickSortTailCall { method Swap (line 95) | static void Swap(int[] nums, int i, int j) { method Partition (line 100) | static int Partition(int[] nums, int left, int right) { method QuickSort (line 115) | public static void QuickSort(int[] nums, int left, int right) { class quick_sort (line 132) | public class quick_sort { method Test (line 133) | [Test] FILE: codes/csharp/chapter_sorting/radix_sort.cs class radix_sort (line 9) | public class radix_sort { method Digit (line 11) | int Digit(int num, int exp) { method CountingSortDigit (line 17) | void CountingSortDigit(int[] nums, int exp) { method RadixSort (line 45) | void RadixSort(int[] nums) { method Test (line 61) | [Test] FILE: codes/csharp/chapter_sorting/selection_sort.cs class selection_sort (line 9) | public class selection_sort { method SelectionSort (line 11) | void SelectionSort(int[] nums) { method Test (line 26) | [Test] FILE: codes/csharp/chapter_stack_and_queue/array_deque.cs class ArrayDeque (line 10) | public class ArrayDeque { method ArrayDeque (line 16) | public ArrayDeque(int capacity) { method Capacity (line 22) | int Capacity() { method Size (line 27) | public int Size() { method IsEmpty (line 32) | public bool IsEmpty() { method Index (line 37) | int Index(int i) { method PushFirst (line 45) | public void PushFirst(int num) { method PushLast (line 59) | public void PushLast(int num) { method PopFirst (line 72) | public int PopFirst() { method PopLast (line 81) | public int PopLast() { method PeekFirst (line 88) | public int PeekFirst() { method PeekLast (line 96) | public int PeekLast() { method ToArray (line 106) | public int[] ToArray() { class array_deque (line 116) | public class array_deque { method Test (line 117) | [Test] FILE: codes/csharp/chapter_stack_and_queue/array_queue.cs class ArrayQueue (line 10) | class ArrayQueue { method ArrayQueue (line 15) | public ArrayQueue(int capacity) { method Capacity (line 21) | int Capacity() { method Size (line 26) | public int Size() { method IsEmpty (line 31) | public bool IsEmpty() { method Push (line 36) | public void Push(int num) { method Pop (line 50) | public int Pop() { method Peek (line 59) | public int Peek() { method ToArray (line 66) | public int[] ToArray() { class array_queue (line 76) | public class array_queue { method Test (line 77) | [Test] FILE: codes/csharp/chapter_stack_and_queue/array_stack.cs class ArrayStack (line 10) | class ArrayStack { method ArrayStack (line 12) | public ArrayStack() { method Size (line 18) | public int Size() { method IsEmpty (line 23) | public bool IsEmpty() { method Push (line 28) | public void Push(int num) { method Pop (line 33) | public int Pop() { method Peek (line 42) | public int Peek() { method ToArray (line 49) | public int[] ToArray() { class array_stack (line 54) | public class array_stack { method Test (line 55) | [Test] FILE: codes/csharp/chapter_stack_and_queue/deque.cs class deque (line 9) | public class deque { method Test (line 10) | [Test] FILE: codes/csharp/chapter_stack_and_queue/linkedlist_deque.cs class ListNode (line 10) | public class ListNode(int val) { class LinkedListDeque (line 17) | public class LinkedListDeque { method LinkedListDeque (line 21) | public LinkedListDeque() { method Size (line 27) | public int Size() { method IsEmpty (line 32) | public bool IsEmpty() { method Push (line 37) | void Push(int num, bool isFront) { method PushFirst (line 63) | public void PushFirst(int num) { method PushLast (line 68) | public void PushLast(int num) { method Pop (line 73) | int? Pop(bool isFront) { method PopFirst (line 105) | public int? PopFirst() { method PopLast (line 110) | public int? PopLast() { method PeekFirst (line 115) | public int? PeekFirst() { method PeekLast (line 122) | public int? PeekLast() { method ToArray (line 129) | public int?[] ToArray() { class linkedlist_deque (line 141) | public class linkedlist_deque { method Test (line 142) | [Test] FILE: codes/csharp/chapter_stack_and_queue/linkedlist_queue.cs class LinkedListQueue (line 10) | class LinkedListQueue { method LinkedListQueue (line 14) | public LinkedListQueue() { method Size (line 20) | public int Size() { method IsEmpty (line 25) | public bool IsEmpty() { method Push (line 30) | public void Push(int num) { method Pop (line 46) | public int Pop() { method Peek (line 55) | public int Peek() { method ToArray (line 62) | public int[] ToArray() { class linkedlist_queue (line 76) | public class linkedlist_queue { method Test (line 77) | [Test] FILE: codes/csharp/chapter_stack_and_queue/linkedlist_stack.cs class LinkedListStack (line 10) | class LinkedListStack { method LinkedListStack (line 14) | public LinkedListStack() { method Size (line 19) | public int Size() { method IsEmpty (line 24) | public bool IsEmpty() { method Push (line 29) | public void Push(int num) { method Pop (line 38) | public int Pop() { method Peek (line 46) | public int Peek() { method ToArray (line 53) | public int[] ToArray() { class linkedlist_stack (line 67) | public class linkedlist_stack { method Test (line 68) | [Test] FILE: codes/csharp/chapter_stack_and_queue/queue.cs class queue (line 9) | public class queue { method Test (line 10) | [Test] FILE: codes/csharp/chapter_stack_and_queue/stack.cs class stack (line 9) | public class stack { method Test (line 10) | [Test] FILE: codes/csharp/chapter_tree/array_binary_tree.cs class ArrayBinaryTree (line 10) | public class ArrayBinaryTree(List arr) { method Size (line 14) | public int Size() { method Val (line 19) | public int? Val(int i) { method Left (line 27) | public int Left(int i) { method Right (line 32) | public int Right(int i) { method Parent (line 37) | public int Parent(int i) { method LevelOrder (line 42) | public List LevelOrder() { method DFS (line 53) | void DFS(int i, string order, List res) { method PreOrder (line 71) | public List PreOrder() { method InOrder (line 78) | public List InOrder() { method PostOrder (line 85) | public List PostOrder() { class array_binary_tree (line 92) | public class array_binary_tree { method Test (line 93) | [Test] FILE: codes/csharp/chapter_tree/avl_tree.cs class AVLTree (line 10) | class AVLTree { method Height (line 14) | int Height(TreeNode? node) { method UpdateHeight (line 20) | void UpdateHeight(TreeNode node) { method BalanceFactor (line 26) | public int BalanceFactor(TreeNode? node) { method RightRotate (line 34) | TreeNode? RightRotate(TreeNode? node) { method LeftRotate (line 48) | TreeNode? LeftRotate(TreeNode? node) { method Rotate (line 62) | TreeNode? Rotate(TreeNode? node) { method Insert (line 92) | public void Insert(int val) { method InsertHelper (line 97) | TreeNode? InsertHelper(TreeNode? node, int val) { method Remove (line 114) | public void Remove(int val) { method RemoveHelper (line 119) | TreeNode? RemoveHelper(TreeNode? node, int val) { method Search (line 153) | public TreeNode? Search(int val) { class avl_tree (line 172) | public class avl_tree { method TestInsert (line 173) | static void TestInsert(AVLTree tree, int val) { method TestRemove (line 179) | static void TestRemove(AVLTree tree, int val) { method Test (line 185) | [Test] FILE: codes/csharp/chapter_tree/binary_search_tree.cs class BinarySearchTree (line 9) | class BinarySearchTree { method BinarySearchTree (line 12) | public BinarySearchTree() { method GetRoot (line 18) | public TreeNode? GetRoot() { method Search (line 23) | public TreeNode? Search(int num) { method Insert (line 42) | public void Insert(int num) { method Remove (line 75) | public void Remove(int num) { class binary_search_tree (line 126) | public class binary_search_tree { method Test (line 127) | [Test] FILE: codes/csharp/chapter_tree/binary_tree.cs class binary_tree (line 9) | public class binary_tree { method Test (line 10) | [Test] FILE: codes/csharp/chapter_tree/binary_tree_bfs.cs class binary_tree_bfs (line 9) | public class binary_tree_bfs { method LevelOrder (line 12) | List LevelOrder(TreeNode root) { method Test (line 29) | [Test] FILE: codes/csharp/chapter_tree/binary_tree_dfs.cs class binary_tree_dfs (line 9) | public class binary_tree_dfs { method PreOrder (line 13) | void PreOrder(TreeNode? root) { method InOrder (line 22) | void InOrder(TreeNode? root) { method PostOrder (line 31) | void PostOrder(TreeNode? root) { method Test (line 39) | [Test] FILE: codes/csharp/utils/ListNode.cs class ListNode (line 8) | public class ListNode(int x) { method ArrToLinkedList (line 13) | public static ListNode? ArrToLinkedList(int[] arr) { method ToString (line 23) | public override string? ToString() { FILE: codes/csharp/utils/PrintUtil.cs class Trunk (line 9) | public class Trunk(Trunk? prev, string str) { class PrintUtil (line 14) | public static class PrintUtil { method PrintList (line 16) | public static void PrintList(IList list) { method PrintList (line 20) | public static string PrintList(this IEnumerable list) { method PrintMatrix (line 25) | public static void PrintMatrix(T[][] matrix) { method PrintMatrix (line 34) | public static void PrintMatrix(List> matrix) { method PrintLinkedList (line 43) | public static void PrintLinkedList(ListNode? head) { method PrintTree (line 57) | public static void PrintTree(TreeNode? root) { method PrintTree (line 62) | public static void PrintTree(TreeNode? root, Trunk? prev, bool isRight) { method ShowTrunks (line 93) | public static void ShowTrunks(Trunk? p) { method PrintHashMap (line 103) | public static void PrintHashMap(Dictionary map) where K : ... method PrintHeap (line 110) | public static void PrintHeap(Queue queue) { method PrintHeap (line 120) | public static void PrintHeap(PriorityQueue queue) { FILE: codes/csharp/utils/TreeNode.cs class TreeNode (line 10) | public class TreeNode(int? x) { method ListToTreeDFS (line 33) | static TreeNode? ListToTreeDFS(List arr, int i) { method ListToTree (line 45) | public static TreeNode? ListToTree(List arr) { method TreeToListDFS (line 50) | static void TreeToListDFS(TreeNode? root, int i, List res) { method TreeToList (line 62) | public static List TreeToList(TreeNode root) { FILE: codes/csharp/utils/Vertex.cs class Vertex (line 10) | public class Vertex(int val) { method ValsToVets (line 14) | public static Vertex[] ValsToVets(int[] vals) { method VetsToVals (line 23) | public static List VetsToVals(List vets) { FILE: codes/dart/build.dart function main (line 3) | void main() FILE: codes/dart/chapter_array_and_linkedlist/array.dart function randomAccess (line 12) | int randomAccess(List nums) function extend (line 21) | List extend(List nums, int enlarge) function insert (line 33) | void insert(List nums, int _num, int index) function remove (line 43) | void remove(List nums, int index) function traverse (line 51) | void traverse(List nums) function find (line 68) | int find(List nums, int target) function main (line 76) | void main() FILE: codes/dart/chapter_array_and_linkedlist/linked_list.dart function insert (line 11) | void insert(ListNode n0, ListNode P) function remove (line 18) | void remove(ListNode n0) function access (line 27) | ListNode? access(ListNode? head, int index) function find (line 36) | int find(ListNode? head, int target) function main (line 49) | void main() FILE: codes/dart/chapter_array_and_linkedlist/list.dart function main (line 10) | void main() FILE: codes/dart/chapter_array_and_linkedlist/my_list.dart class MyList (line 8) | class MyList { method size (line 20) | int size() method capacity (line 23) | int capacity() method get (line 26) | int get(int index) method set (line 32) | void set(int index, int _num) method add (line 38) | void add(int _num) method insert (line 47) | void insert(int index, int _num) method remove (line 61) | int remove(int index) method extendCapacity (line 75) | void extendCapacity() method toArray (line 87) | List toArray() function main (line 97) | void main() FILE: codes/dart/chapter_backtracking/n_queens.dart function backtrack (line 8) | void backtrack( function nQueens (line 50) | List>> nQueens(int n) function main (line 64) | void main() FILE: codes/dart/chapter_backtracking/permutations_i.dart function backtrack (line 8) | void backtrack( function permutationsI (line 37) | List> permutationsI(List nums) function main (line 44) | void main() FILE: codes/dart/chapter_backtracking/permutations_ii.dart function backtrack (line 8) | void backtrack( function permutationsII (line 39) | List> permutationsII(List nums) function main (line 46) | void main() FILE: codes/dart/chapter_backtracking/preorder_traversal_i_compact.dart function preOrder (line 11) | void preOrder(TreeNode? root, List res) function main (line 24) | void main() FILE: codes/dart/chapter_backtracking/preorder_traversal_ii_compact.dart function preOrder (line 11) | void preOrder( function main (line 33) | void main() FILE: codes/dart/chapter_backtracking/preorder_traversal_iii_compact.dart function preOrder (line 11) | void preOrder( function main (line 33) | void main() FILE: codes/dart/chapter_backtracking/preorder_traversal_iii_template.dart function isSolution (line 11) | bool isSolution(List state) function recordSolution (line 16) | void recordSolution(List state, List> res) function isValid (line 21) | bool isValid(List state, TreeNode? choice) function makeChoice (line 26) | void makeChoice(List state, TreeNode? choice) function undoChoice (line 31) | void undoChoice(List state, TreeNode? choice) function backtrack (line 36) | void backtrack( function main (line 61) | void main() FILE: codes/dart/chapter_backtracking/subset_sum_i.dart function backtrack (line 8) | void backtrack( function subsetSumI (line 38) | List> subsetSumI(List nums, int target) function main (line 48) | void main() FILE: codes/dart/chapter_backtracking/subset_sum_i_naive.dart function backtrack (line 8) | void backtrack( function subsetSumINaive (line 36) | List> subsetSumINaive(List nums, int target) function main (line 45) | void main() FILE: codes/dart/chapter_backtracking/subset_sum_ii.dart function backtrack (line 8) | void backtrack( function subsetSumII (line 43) | List> subsetSumII(List nums, int target) function main (line 53) | void main() FILE: codes/dart/chapter_computational_complexity/iteration.dart function forLoop (line 8) | int forLoop(int n) function whileLoop (line 18) | int whileLoop(int n) function whileLoopII (line 30) | int whileLoopII(int n) function nestedForLoop (line 44) | String nestedForLoop(int n) function main (line 57) | void main() FILE: codes/dart/chapter_computational_complexity/recursion.dart function recur (line 8) | int recur(int n) function forLoopRecur (line 18) | int forLoopRecur(int n) function tailRecur (line 37) | int tailRecur(int n, int res) function fib (line 45) | int fib(int n) function main (line 55) | void main() FILE: codes/dart/chapter_computational_complexity/space_complexity.dart function function (line 15) | int function() function constant (line 21) | void constant(int n) function linear (line 38) | void linear(int n) function linearRecur (line 54) | void linearRecur(int n) function quadratic (line 61) | void quadratic(int n) function quadraticRecur (line 76) | int quadraticRecur(int n) function buildTree (line 84) | TreeNode? buildTree(int n) function main (line 93) | void main() FILE: codes/dart/chapter_computational_complexity/time_complexity.dart function constant (line 10) | int constant(int n) function linear (line 20) | int linear(int n) function arrayTraversal (line 29) | int arrayTraversal(List nums) function quadratic (line 39) | int quadratic(int n) function bubbleSort (line 51) | int bubbleSort(List nums) function exponential (line 70) | int exponential(int n) function expRecur (line 84) | int expRecur(int n) function logarithmic (line 90) | int logarithmic(int n) function logRecur (line 100) | int logRecur(int n) function linearLogRecur (line 106) | int linearLogRecur(int n) function factorialRecur (line 116) | int factorialRecur(int n) function main (line 127) | void main() FILE: codes/dart/chapter_computational_complexity/worst_best_time_complexity.dart function randomNumbers (line 8) | List randomNumbers(int n) function findOne (line 21) | int findOne(List nums) function main (line 32) | void main() FILE: codes/dart/chapter_divide_and_conquer/binary_search_recur.dart function dfs (line 8) | int dfs(List nums, int target, int i, int j) function binarySearch (line 28) | int binarySearch(List nums, int target) function main (line 35) | void main() FILE: codes/dart/chapter_divide_and_conquer/build_tree.dart function dfs (line 11) | TreeNode? dfs( function buildTree (line 35) | TreeNode? buildTree(List preorder, List inorder) function main (line 46) | void main() FILE: codes/dart/chapter_divide_and_conquer/hanota.dart function move (line 8) | void move(List src, List tar) function dfs (line 16) | void dfs(int i, List src, List buf, List tar) function solveHanota (line 31) | void solveHanota(List A, List B, List C) function main (line 38) | void main() FILE: codes/dart/chapter_dynamic_programming/climbing_stairs_backtrack.dart function backtrack (line 8) | void backtrack(List choices, int state, int n, List res) function climbingStairsBacktrack (line 24) | int climbingStairsBacktrack(int n) function main (line 34) | void main() FILE: codes/dart/chapter_dynamic_programming/climbing_stairs_constraint_dp.dart function climbingStairsConstraintDP (line 8) | int climbingStairsConstraintDP(int n) function main (line 28) | void main() FILE: codes/dart/chapter_dynamic_programming/climbing_stairs_dfs.dart function dfs (line 8) | int dfs(int i) function climbingStairsDFS (line 17) | int climbingStairsDFS(int n) function main (line 22) | void main() FILE: codes/dart/chapter_dynamic_programming/climbing_stairs_dfs_mem.dart function dfs (line 8) | int dfs(int i, List mem) function climbingStairsDFSMem (line 21) | int climbingStairsDFSMem(int n) function main (line 28) | void main() FILE: codes/dart/chapter_dynamic_programming/climbing_stairs_dp.dart function climbingStairsDP (line 8) | int climbingStairsDP(int n) function climbingStairsDPComp (line 23) | int climbingStairsDPComp(int n) function main (line 35) | void main() FILE: codes/dart/chapter_dynamic_programming/coin_change.dart function coinChangeDP (line 10) | int coinChangeDP(List coins, int amt) function coinChangeDPComp (line 35) | int coinChangeDPComp(List coins, int amt) function main (line 57) | void main() FILE: codes/dart/chapter_dynamic_programming/coin_change_ii.dart function coinChangeIIDP (line 8) | int coinChangeIIDP(List coins, int amt) function coinChangeIIDPComp (line 32) | int coinChangeIIDPComp(List coins, int amt) function main (line 53) | void main() FILE: codes/dart/chapter_dynamic_programming/edit_distance.dart function editDistanceDFS (line 10) | int editDistanceDFS(String s, String t, int i, int j) function editDistanceDFSMem (line 28) | int editDistanceDFSMem(String s, String t, List> mem, int i, i... function editDistanceDP (line 49) | int editDistanceDP(String s, String t) function editDistanceDPComp (line 75) | int editDistanceDPComp(String s, String t) function main (line 104) | void main() FILE: codes/dart/chapter_dynamic_programming/knapsack.dart function knapsackDFS (line 10) | int knapsackDFS(List wgt, List val, int i, int c) function knapsackDFSMem (line 27) | int knapsackDFSMem( function knapsackDP (line 55) | int knapsackDP(List wgt, List val, int cap) function knapsackDPComp (line 75) | int knapsackDPComp(List wgt, List val, int cap) function main (line 93) | void main() FILE: codes/dart/chapter_dynamic_programming/min_cost_climbing_stairs_dp.dart function minCostClimbingStairsDP (line 10) | int minCostClimbingStairsDP(List cost) function minCostClimbingStairsDPComp (line 26) | int minCostClimbingStairsDPComp(List cost) function main (line 39) | void main() FILE: codes/dart/chapter_dynamic_programming/min_path_sum.dart function minPathSumDFS (line 10) | int minPathSumDFS(List> grid, int i, int j) function minPathSumDFSMem (line 28) | int minPathSumDFSMem(List> grid, List> mem, int i, i... function minPathSumDP (line 51) | int minPathSumDP(List> grid) function minPathSumDPComp (line 74) | int minPathSumDPComp(List> grid) function main (line 95) | void main() FILE: codes/dart/chapter_dynamic_programming/unbounded_knapsack.dart function unboundedKnapsackDP (line 10) | int unboundedKnapsackDP(List wgt, List val, int cap) function unboundedKnapsackDPComp (line 30) | int unboundedKnapsackDPComp(List wgt, List val, int cap) function main (line 50) | void main() FILE: codes/dart/chapter_graph/graph_adjacency_list.dart class GraphAdjList (line 10) | class GraphAdjList { method size (line 24) | int size() method addEdge (line 29) | void addEdge(Vertex vet1, Vertex vet2) method removeEdge (line 41) | void removeEdge(Vertex vet1, Vertex vet2) method addVertex (line 53) | void addVertex(Vertex vet) method removeVertex (line 60) | void removeVertex(Vertex vet) method printAdjList (line 73) | void printAdjList() function main (line 86) | void main() FILE: codes/dart/chapter_graph/graph_adjacency_matrix.dart class GraphAdjMat (line 10) | class GraphAdjMat { method size (line 30) | int size() method addVertex (line 35) | void addVertex(int val) method removeVertex (line 49) | void removeVertex(int index) method addEdge (line 65) | void addEdge(int i, int j) method removeEdge (line 77) | void removeEdge(int i, int j) method printAdjMat (line 87) | void printAdjMat() function main (line 95) | void main() FILE: codes/dart/chapter_graph/graph_bfs.dart function graphBFS (line 13) | List graphBFS(GraphAdjList graph, Vertex startVet) function main (line 41) | void main() FILE: codes/dart/chapter_graph/graph_dfs.dart function dfs (line 11) | void dfs( function graphDFS (line 30) | List graphDFS(GraphAdjList graph, Vertex startVet) function main (line 40) | void main() FILE: codes/dart/chapter_greedy/coin_change_greedy.dart function coinChangeGreedy (line 8) | int coinChangeGreedy(List coins, int amt) function main (line 27) | void main() FILE: codes/dart/chapter_greedy/fractional_knapsack.dart class Item (line 8) | class Item { function fractionalKnapsack (line 16) | double fractionalKnapsack(List wgt, List val, int cap) function main (line 39) | void main() FILE: codes/dart/chapter_greedy/max_capacity.dart function maxCapacity (line 10) | int maxCapacity(List ht) function main (line 31) | void main() FILE: codes/dart/chapter_greedy/max_product_cutting.dart function maxProductCutting (line 10) | int maxProductCutting(int n) function main (line 31) | void main() FILE: codes/dart/chapter_hashing/array_hash_map.dart class Pair (line 8) | class Pair { class ArrayHashMap (line 15) | class ArrayHashMap { method _hashFunc (line 24) | int _hashFunc(int key) method get (line 30) | String? get(int key) method put (line 40) | void put(int key, String val) method remove (line 47) | void remove(int key) method pairSet (line 53) | List pairSet() method keySet (line 64) | List keySet() method values (line 75) | List values() method printHashMap (line 86) | void printHashMap() function main (line 94) | void main() FILE: codes/dart/chapter_hashing/built_in_hash.dart function main (line 10) | void main() FILE: codes/dart/chapter_hashing/hash_map.dart function main (line 8) | void main() FILE: codes/dart/chapter_hashing/hash_map_chaining.dart class HashMapChaining (line 10) | class HashMapChaining { method hashFunc (line 27) | int hashFunc(int key) method loadFactor (line 32) | double loadFactor() method get (line 37) | String? get(int key) method put (line 51) | void put(int key, String val) method remove (line 72) | void remove(int key) method extend (line 86) | void extend() method printHashMap (line 102) | void printHashMap() function main (line 114) | void main() FILE: codes/dart/chapter_hashing/hash_map_open_addressing.dart class HashMapOpenAddressing (line 10) | class HashMapOpenAddressing { method hashFunc (line 25) | int hashFunc(int key) method loadFactor (line 30) | double loadFactor() method findBucket (line 35) | int findBucket(int key) method get (line 62) | String? get(int key) method put (line 74) | void put(int key, String val) method remove (line 92) | void remove(int key) method extend (line 103) | void extend() method printHashMap (line 119) | void printHashMap() function main (line 133) | void main() FILE: codes/dart/chapter_hashing/simple_hash.dart function addHash (line 8) | int addHash(String key) function mulHash (line 18) | int mulHash(String key) function xorHash (line 28) | int xorHash(String key) function rotHash (line 38) | int rotHash(String key) function main (line 48) | void main() FILE: codes/dart/chapter_heap/my_heap.dart class MaxHeap (line 10) | class MaxHeap { method _left (line 24) | int _left(int i) method _right (line 29) | int _right(int i) method _parent (line 34) | int _parent(int i) method _swap (line 39) | void _swap(int i, int j) method size (line 46) | int size() method isEmpty (line 51) | bool isEmpty() method peek (line 56) | int peek() method push (line 61) | void push(int val) method siftUp (line 69) | void siftUp(int i) method pop (line 85) | int pop() method siftDown (line 99) | void siftDown(int i) method print (line 117) | void print() function main (line 123) | void main() FILE: codes/dart/chapter_heap/top_k.dart function topKHeap (line 10) | MinHeap topKHeap(List nums, int k) function main (line 25) | void main() class MinHeap (line 35) | class MinHeap { method getHeap (line 49) | List getHeap() method _left (line 54) | int _left(int i) method _right (line 59) | int _right(int i) method _parent (line 64) | int _parent(int i) method _swap (line 69) | void _swap(int i, int j) method size (line 76) | int size() method isEmpty (line 81) | bool isEmpty() method peek (line 86) | int peek() method push (line 91) | void push(int val) method siftUp (line 99) | void siftUp(int i) method pop (line 115) | int pop() method siftDown (line 129) | void siftDown(int i) method print (line 147) | void print() FILE: codes/dart/chapter_searching/binary_search.dart function binarySearch (line 8) | int binarySearch(List nums, int target) function binarySearchLCRO (line 30) | int binarySearchLCRO(List nums, int target) function main (line 52) | void main() FILE: codes/dart/chapter_searching/binary_search_edge.dart function binarySearchLeftEdge (line 10) | int binarySearchLeftEdge(List nums, int target) function binarySearchRightEdge (line 22) | int binarySearchRightEdge(List nums, int target) function main (line 36) | void main() FILE: codes/dart/chapter_searching/binary_search_insertion.dart function binarySearchInsertionSimple (line 8) | int binarySearchInsertionSimple(List nums, int target) function binarySearchInsertion (line 25) | int binarySearchInsertion(List nums, int target) function main (line 42) | void main() FILE: codes/dart/chapter_searching/hashing_search.dart function hashingSearchArray (line 11) | int hashingSearchArray(Map map, int target) function hashingSearchLinkedList (line 21) | ListNode? hashingSearchLinkedList(Map map, int target) function main (line 31) | void main() FILE: codes/dart/chapter_searching/linear_search.dart function linearSearchArray (line 10) | int linearSearchArray(List nums, int target) function linearSearchList (line 23) | ListNode? linearSearchList(ListNode? head, int target) function main (line 35) | void main() FILE: codes/dart/chapter_searching/two_sum.dart function twoSumBruteForce (line 10) | List twoSumBruteForce(List nums, int target) function twoSumHashTable (line 22) | List twoSumHashTable(List nums, int target) function main (line 37) | void main() FILE: codes/dart/chapter_sorting/bubble_sort.dart function bubbleSort (line 8) | void bubbleSort(List nums) function bubbleSortWithFlag (line 24) | void bubbleSortWithFlag(List nums) function main (line 43) | void main() FILE: codes/dart/chapter_sorting/bucket_sort.dart function bucketSort (line 8) | void bucketSort(List nums) function main (line 34) | void main() FILE: codes/dart/chapter_sorting/counting_sort.dart function countingSortNaive (line 10) | void countingSortNaive(List nums) function countingSort (line 33) | void countingSort(List nums) function main (line 64) | void main() FILE: codes/dart/chapter_sorting/heap_sort.dart function siftDown (line 8) | void siftDown(List nums, int n, int i) function heapSort (line 28) | void heapSort(List nums) function main (line 45) | void main() FILE: codes/dart/chapter_sorting/insertion_sort.dart function insertionSort (line 8) | void insertionSort(List nums) function main (line 22) | void main() FILE: codes/dart/chapter_sorting/merge_sort.dart function merge (line 8) | void merge(List nums, int left, int mid, int right) function mergeSort (line 35) | void mergeSort(List nums, int left, int right) function main (line 47) | void main() FILE: codes/dart/chapter_sorting/quick_sort.dart class QuickSort (line 8) | class QuickSort { method _swap (line 10) | void _swap(List nums, int i, int j) method _partition (line 17) | int _partition(List nums, int left, int right) method quickSort (line 30) | void quickSort(List nums, int left, int right) class QuickSortMedian (line 42) | class QuickSortMedian { method _swap (line 44) | void _swap(List nums, int i, int j) method _medianThree (line 51) | int _medianThree(List nums, int left, int mid, int right) method _partition (line 61) | int _partition(List nums, int left, int right) method quickSort (line 78) | void quickSort(List nums, int left, int right) class QuickSortTailCall (line 90) | class QuickSortTailCall { method _swap (line 92) | void _swap(List nums, int i, int j) method _partition (line 99) | int _partition(List nums, int left, int right) method quickSort (line 112) | void quickSort(List nums, int left, int right) function main (line 130) | void main() FILE: codes/dart/chapter_sorting/radix_sort.dart function digit (line 8) | int digit(int _num, int exp) function countingSortDigit (line 14) | void countingSortDigit(List nums, int exp) function radixSort (line 40) | void radixSort(List nums) function main (line 55) | void main() FILE: codes/dart/chapter_sorting/selection_sort.dart function selectionSort (line 8) | void selectionSort(List nums) function main (line 25) | void main() FILE: codes/dart/chapter_stack_and_queue/array_deque.dart class ArrayDeque (line 8) | class ArrayDeque { method capacity (line 20) | int capacity() method size (line 25) | int size() method isEmpty (line 30) | bool isEmpty() method index (line 35) | int index(int i) method pushFirst (line 43) | void pushFirst(int _num) method pushLast (line 56) | void pushLast(int _num) method popFirst (line 68) | int popFirst() method popLast (line 77) | int popLast() method peekFirst (line 84) | int peekFirst() method peekLast (line 92) | int peekLast() method toArray (line 102) | List toArray() function main (line 113) | void main() FILE: codes/dart/chapter_stack_and_queue/array_queue.dart class ArrayQueue (line 8) | class ArrayQueue { method capaCity (line 19) | int capaCity() method size (line 24) | int size() method isEmpty (line 29) | bool isEmpty() method push (line 34) | void push(int _num) method pop (line 47) | int pop() method peek (line 56) | int peek() method toArray (line 64) | List toArray() function main (line 75) | void main() FILE: codes/dart/chapter_stack_and_queue/array_stack.dart class ArrayStack (line 8) | class ArrayStack { method size (line 15) | int size() method isEmpty (line 20) | bool isEmpty() method push (line 25) | void push(int _num) method pop (line 30) | int pop() method peek (line 38) | int peek() method toArray (line 46) | List toArray() function main (line 50) | void main() FILE: codes/dart/chapter_stack_and_queue/deque.dart function main (line 9) | void main() FILE: codes/dart/chapter_stack_and_queue/linkedlist_deque.dart class ListNode (line 8) | class ListNode { class LinkedListDeque (line 17) | class LinkedListDeque { method size (line 28) | int size() method isEmpty (line 33) | bool isEmpty() method push (line 38) | void push(int _num, bool isFront) method pushFirst (line 60) | void pushFirst(int _num) method pushLast (line 65) | void pushLast(int _num) method pop (line 70) | int? pop(bool isFront) method popFirst (line 102) | int? popFirst() method popLast (line 107) | int? popLast() method peekFirst (line 112) | int? peekFirst() method peekLast (line 117) | int? peekLast() method toArray (line 122) | List toArray() function main (line 134) | void main() FILE: codes/dart/chapter_stack_and_queue/linkedlist_queue.dart class LinkedListQueue (line 10) | class LinkedListQueue { method size (line 21) | int size() method isEmpty (line 26) | bool isEmpty() method push (line 31) | void push(int _num) method pop (line 47) | int pop() method peek (line 56) | int peek() method toArray (line 64) | List toArray() function main (line 76) | void main() FILE: codes/dart/chapter_stack_and_queue/linkedlist_stack.dart class LinkedListStack (line 10) | class LinkedListStack { method size (line 19) | int size() method isEmpty (line 24) | bool isEmpty() method push (line 29) | void push(int _num) method pop (line 37) | int pop() method peek (line 45) | int peek() method toList (line 53) | List toList() function main (line 66) | void main() FILE: codes/dart/chapter_stack_and_queue/queue.dart function main (line 9) | void main() FILE: codes/dart/chapter_stack_and_queue/stack.dart function main (line 7) | void main() FILE: codes/dart/chapter_tree/array_binary_tree.dart class ArrayBinaryTree (line 11) | class ArrayBinaryTree { method size (line 18) | int size() method val (line 23) | int? val(int i) method left (line 32) | int? left(int i) method right (line 37) | int? right(int i) method parent (line 42) | int? parent(int i) method levelOrder (line 47) | List levelOrder() method dfs (line 58) | void dfs(int i, String order, List res) method preOrder (line 80) | List preOrder() method inOrder (line 87) | List inOrder() method postOrder (line 94) | List postOrder() function main (line 102) | void main() FILE: codes/dart/chapter_tree/avl_tree.dart class AVLTree (line 11) | class AVLTree { method height (line 20) | int height(TreeNode? node) method updateHeight (line 26) | void updateHeight(TreeNode? node) method balanceFactor (line 32) | int balanceFactor(TreeNode? node) method rightRotate (line 40) | TreeNode? rightRotate(TreeNode? node) method leftRotate (line 54) | TreeNode? leftRotate(TreeNode? node) method rotate (line 68) | TreeNode? rotate(TreeNode? node) method insert (line 98) | void insert(int val) method insertHelper (line 103) | TreeNode? insertHelper(TreeNode? node, int val) method remove (line 120) | void remove(int val) method removeHelper (line 125) | TreeNode? removeHelper(TreeNode? node, int val) method search (line 159) | TreeNode? search(int val) function testInsert (line 177) | void testInsert(AVLTree tree, int val) function testRemove (line 183) | void testRemove(AVLTree tree, int val) function main (line 190) | void main() FILE: codes/dart/chapter_tree/binary_search_tree.dart class BinarySearchTree (line 11) | class BinarySearchTree { method getRoot (line 21) | TreeNode? getRoot() method search (line 26) | TreeNode? search(int _num) method insert (line 45) | void insert(int _num) method remove (line 74) | void remove(int _num) function main (line 123) | void main() FILE: codes/dart/chapter_tree/binary_tree.dart function main (line 10) | void main() FILE: codes/dart/chapter_tree/binary_tree_bfs.dart function levelOrder (line 12) | List levelOrder(TreeNode? root) function main (line 28) | void main() FILE: codes/dart/chapter_tree/binary_tree_dfs.dart function preOrder (line 14) | void preOrder(TreeNode? node) function inOrder (line 23) | void inOrder(TreeNode? node) function postOrder (line 32) | void postOrder(TreeNode? node) function main (line 41) | void main() FILE: codes/dart/utils/list_node.dart class ListNode (line 8) | class ListNode { function listToLinkedList (line 16) | ListNode? listToLinkedList(List list) FILE: codes/dart/utils/print_util.dart class Trunk (line 12) | class Trunk { function printMatrix (line 20) | void printMatrix(List> matrix) function printLinkedList (line 29) | void printLinkedList(ListNode? head) function printTree (line 45) | void printTree(TreeNode? root, [Trunk? prev = null, bool isRight = false]) function showTrunks (line 75) | void showTrunks(Trunk? p) function printHeap (line 85) | void printHeap(List heap) FILE: codes/dart/utils/tree_node.dart class TreeNode (line 8) | class TreeNode { function listToTreeDFS (line 19) | TreeNode? listToTreeDFS(List arr, int i) function listToTree (line 30) | TreeNode? listToTree(List arr) function treeToListDFS (line 35) | void treeToListDFS(TreeNode? root, int i, List res) function treeToList (line 46) | List treeToList(TreeNode? root) FILE: codes/dart/utils/vertex.dart class Vertex (line 8) | class Vertex { method valsToVets (line 13) | List valsToVets(List vals) method vetsToVals (line 22) | List vetsToVals(List vets) FILE: codes/go/chapter_array_and_linkedlist/array.go function randomAccess (line 12) | func randomAccess(nums []int) (randomNum int) { function extend (line 21) | func extend(nums []int, enlarge int) []int { function insert (line 33) | func insert(nums []int, num int, index int) { function remove (line 43) | func remove(nums []int, index int) { function traverse (line 51) | func traverse(nums []int) { function find (line 70) | func find(nums []int, target int) (index int) { FILE: codes/go/chapter_array_and_linkedlist/array_test.go function TestArray (line 18) | func TestArray(t *testing.T) { FILE: codes/go/chapter_array_and_linkedlist/linked_list.go function insertNode (line 12) | func insertNode(n0 *ListNode, P *ListNode) { function removeItem (line 19) | func removeItem(n0 *ListNode) { function access (line 30) | func access(head *ListNode, index int) *ListNode { function findNode (line 41) | func findNode(head *ListNode, target int) int { FILE: codes/go/chapter_array_and_linkedlist/linked_list_test.go function TestLinkedList (line 14) | func TestLinkedList(t *testing.T) { FILE: codes/go/chapter_array_and_linkedlist/list_test.go function TestList (line 14) | func TestList(t *testing.T) { FILE: codes/go/chapter_array_and_linkedlist/my_list.go type myList (line 8) | type myList struct method size (line 26) | func (l *myList) size() int { method capacity (line 31) | func (l *myList) capacity() int { method get (line 36) | func (l *myList) get(index int) int { method set (line 45) | func (l *myList) set(num, index int) { method add (line 53) | func (l *myList) add(num int) { method insert (line 64) | func (l *myList) insert(num, index int) { method remove (line 82) | func (l *myList) remove(index int) int { method extendCapacity (line 98) | func (l *myList) extendCapacity() { method toArray (line 106) | func (l *myList) toArray() []int { function newMyList (line 16) | func newMyList() *myList { FILE: codes/go/chapter_array_and_linkedlist/my_list_test.go function TestMyList (line 13) | func TestMyList(t *testing.T) { FILE: codes/go/chapter_backtracking/n_queens.go function backtrack (line 8) | func backtrack(row, n int, state *[][]string, res *[][][]string, cols, d... function nQueens (line 40) | func nQueens(n int) [][][]string { FILE: codes/go/chapter_backtracking/n_queens_test.go function TestNQueens (line 12) | func TestNQueens(t *testing.T) { FILE: codes/go/chapter_backtracking/permutation_test.go function TestPermutationI (line 14) | func TestPermutationI(t *testing.T) { function TestPermutationII (line 25) | func TestPermutationII(t *testing.T) { FILE: codes/go/chapter_backtracking/permutations_i.go function backtrackI (line 8) | func backtrackI(state *[]int, choices *[]int, selected *[]bool, res *[][... function permutationsI (line 32) | func permutationsI(nums []int) [][]int { FILE: codes/go/chapter_backtracking/permutations_ii.go function backtrackII (line 8) | func backtrackII(state *[]int, choices *[]int, selected *[]bool, res *[]... function permutationsII (line 35) | func permutationsII(nums []int) [][]int { FILE: codes/go/chapter_backtracking/preorder_traversal_i_compact.go function preOrderI (line 12) | func preOrderI(root *TreeNode, res *[]*TreeNode) { FILE: codes/go/chapter_backtracking/preorder_traversal_ii_compact.go function preOrderII (line 12) | func preOrderII(root *TreeNode, res *[][]*TreeNode, path *[]*TreeNode) { FILE: codes/go/chapter_backtracking/preorder_traversal_iii_compact.go function preOrderIII (line 12) | func preOrderIII(root *TreeNode, res *[][]*TreeNode, path *[]*TreeNode) { FILE: codes/go/chapter_backtracking/preorder_traversal_iii_template.go function isSolution (line 12) | func isSolution(state *[]*TreeNode) bool { function recordSolution (line 17) | func recordSolution(state *[]*TreeNode, res *[][]*TreeNode) { function isValid (line 22) | func isValid(state *[]*TreeNode, choice *TreeNode) bool { function makeChoice (line 27) | func makeChoice(state *[]*TreeNode, choice *TreeNode) { function undoChoice (line 32) | func undoChoice(state *[]*TreeNode, choice *TreeNode) { function backtrackIII (line 37) | func backtrackIII(state *[]*TreeNode, choices *[]*TreeNode, res *[][]*Tr... FILE: codes/go/chapter_backtracking/preorder_traversal_test.go function TestPreorderTraversalICompact (line 14) | func TestPreorderTraversalICompact(t *testing.T) { function TestPreorderTraversalIICompact (line 31) | func TestPreorderTraversalIICompact(t *testing.T) { function TestPreorderTraversalIIICompact (line 51) | func TestPreorderTraversalIIICompact(t *testing.T) { function TestPreorderTraversalIIITemplate (line 71) | func TestPreorderTraversalIIITemplate(t *testing.T) { FILE: codes/go/chapter_backtracking/subset_sum_i.go function backtrackSubsetSumI (line 10) | func backtrackSubsetSumI(start, target int, state, choices *[]int, res *... function subsetSumI (line 35) | func subsetSumI(nums []int, target int) [][]int { FILE: codes/go/chapter_backtracking/subset_sum_i_naive.go function backtrackSubsetSumINaive (line 8) | func backtrackSubsetSumINaive(total, target int, state, choices *[]int, ... function subsetSumINaive (line 31) | func subsetSumINaive(nums []int, target int) [][]int { FILE: codes/go/chapter_backtracking/subset_sum_ii.go function backtrackSubsetSumII (line 10) | func backtrackSubsetSumII(start, target int, state, choices *[]int, res ... function subsetSumII (line 40) | func subsetSumII(nums []int, target int) [][]int { FILE: codes/go/chapter_backtracking/subset_sum_test.go function TestSubsetSumINaive (line 15) | func TestSubsetSumINaive(t *testing.T) { function TestSubsetSumI (line 30) | func TestSubsetSumI(t *testing.T) { function TestSubsetSumII (line 44) | func TestSubsetSumII(t *testing.T) { FILE: codes/go/chapter_computational_complexity/iteration.go function forLoop (line 10) | func forLoop(n int) int { function whileLoop (line 20) | func whileLoop(n int) int { function whileLoopII (line 34) | func whileLoopII(n int) int { function nestedForLoop (line 49) | func nestedForLoop(n int) string { FILE: codes/go/chapter_computational_complexity/iteration_test.go function TestIteration (line 13) | func TestIteration(t *testing.T) { FILE: codes/go/chapter_computational_complexity/recursion.go function recur (line 10) | func recur(n int) int { function forLoopRecur (line 22) | func forLoopRecur(n int) int { function tailRecur (line 42) | func tailRecur(n int, res int) int { function fib (line 52) | func fib(n int) int { FILE: codes/go/chapter_computational_complexity/recursion_test.go function TestRecursion (line 13) | func TestRecursion(t *testing.T) { FILE: codes/go/chapter_computational_complexity/space_complexity.go type node (line 15) | type node struct function newNode (line 21) | func newNode(val int) *node { function function (line 26) | func function() int { function spaceConstant (line 32) | func spaceConstant(n int) { function spaceLinear (line 54) | func spaceLinear(n int) { function spaceLinearRecur (line 70) | func spaceLinearRecur(n int) { function spaceQuadratic (line 79) | func spaceQuadratic(n int) { function spaceQuadraticRecur (line 88) | func spaceQuadraticRecur(n int) int { function buildTree (line 98) | func buildTree(n int) *TreeNode { FILE: codes/go/chapter_computational_complexity/space_complexity_test.go function TestSpaceComplexity (line 13) | func TestSpaceComplexity(t *testing.T) { FILE: codes/go/chapter_computational_complexity/time_complexity.go function constant (line 8) | func constant(n int) int { function linear (line 18) | func linear(n int) int { function arrayTraversal (line 27) | func arrayTraversal(nums []int) int { function quadratic (line 37) | func quadratic(n int) int { function bubbleSort (line 49) | func bubbleSort(nums []int) int { function exponential (line 68) | func exponential(n int) int { function expRecur (line 82) | func expRecur(n int) int { function logarithmic (line 90) | func logarithmic(n int) int { function logRecur (line 100) | func logRecur(n int) int { function linearLogRecur (line 108) | func linearLogRecur(n int) int { function factorialRecur (line 120) | func factorialRecur(n int) int { FILE: codes/go/chapter_computational_complexity/time_complexity_test.go function TestTimeComplexity (line 12) | func TestTimeComplexity(t *testing.T) { FILE: codes/go/chapter_computational_complexity/worst_best_time_complexity.go function randomNumbers (line 12) | func randomNumbers(n int) []int { function findOne (line 26) | func findOne(nums []int) int { FILE: codes/go/chapter_computational_complexity/worst_best_time_complexity_test.go function TestWorstBestTimeComplexity (line 12) | func TestWorstBestTimeComplexity(t *testing.T) { FILE: codes/go/chapter_divide_and_conquer/binary_search_recur.go function dfs (line 8) | func dfs(nums []int, target, i, j int) int { function binarySearch (line 31) | func binarySearch(nums []int, target int) int { FILE: codes/go/chapter_divide_and_conquer/binary_search_recur_test.go function TestBinarySearch (line 12) | func TestBinarySearch(t *testing.T) { FILE: codes/go/chapter_divide_and_conquer/build_tree.go function dfsBuildTree (line 10) | func dfsBuildTree(preorder []int, inorderMap map[int]int, i, l, r int) *... function buildTree (line 28) | func buildTree(preorder, inorder []int) *TreeNode { FILE: codes/go/chapter_divide_and_conquer/build_tree_test.go function TestBuildTree (line 14) | func TestBuildTree(t *testing.T) { FILE: codes/go/chapter_divide_and_conquer/hanota.go function move (line 10) | func move(src, tar *list.List) { function dfsHanota (line 20) | func dfsHanota(i int, src, buf, tar *list.List) { function solveHanota (line 35) | func solveHanota(A, B, C *list.List) { FILE: codes/go/chapter_divide_and_conquer/hanota_test.go function TestHanota (line 15) | func TestHanota(t *testing.T) { FILE: codes/go/chapter_dynamic_programming/climbing_stairs_backtrack.go function backtrack (line 8) | func backtrack(choices []int, state, n int, res []int) { function climbingStairsBacktrack (line 26) | func climbingStairsBacktrack(n int) int { FILE: codes/go/chapter_dynamic_programming/climbing_stairs_constraint_dp.go function climbingStairsConstraintDP (line 8) | func climbingStairsConstraintDP(n int) int { FILE: codes/go/chapter_dynamic_programming/climbing_stairs_dfs.go function dfs (line 8) | func dfs(i int) int { function climbingStairsDFS (line 19) | func climbingStairsDFS(n int) int { FILE: codes/go/chapter_dynamic_programming/climbing_stairs_dfs_mem.go function dfsMem (line 8) | func dfsMem(i int, mem []int) int { function climbingStairsDFSMem (line 25) | func climbingStairsDFSMem(n int) int { FILE: codes/go/chapter_dynamic_programming/climbing_stairs_dp.go function climbingStairsDP (line 8) | func climbingStairsDP(n int) int { function climbingStairsDPComp (line 25) | func climbingStairsDPComp(n int) int { FILE: codes/go/chapter_dynamic_programming/climbing_stairs_test.go function TestClimbingStairsBacktrack (line 12) | func TestClimbingStairsBacktrack(t *testing.T) { function TestClimbingStairsDFS (line 18) | func TestClimbingStairsDFS(t *testing.T) { function TestClimbingStairsDFSMem (line 24) | func TestClimbingStairsDFSMem(t *testing.T) { function TestClimbingStairsDP (line 30) | func TestClimbingStairsDP(t *testing.T) { function TestClimbingStairsDPComp (line 36) | func TestClimbingStairsDPComp(t *testing.T) { function TestClimbingStairsConstraintDP (line 42) | func TestClimbingStairsConstraintDP(t *testing.T) { function TestMinCostClimbingStairsDPComp (line 48) | func TestMinCostClimbingStairsDPComp(t *testing.T) { FILE: codes/go/chapter_dynamic_programming/coin_change.go function coinChangeDP (line 10) | func coinChangeDP(coins []int, amt int) int { function coinChangeDPComp (line 41) | func coinChangeDPComp(coins []int, amt int) int { FILE: codes/go/chapter_dynamic_programming/coin_change_ii.go function coinChangeIIDP (line 8) | func coinChangeIIDP(coins []int, amt int) int { function coinChangeIIDPComp (line 35) | func coinChangeIIDPComp(coins []int, amt int) int { FILE: codes/go/chapter_dynamic_programming/coin_change_test.go function TestCoinChange (line 12) | func TestCoinChange(t *testing.T) { FILE: codes/go/chapter_dynamic_programming/edit_distance.go function editDistanceDFS (line 8) | func editDistanceDFS(s string, t string, i int, j int) int { function editDistanceDFSMem (line 34) | func editDistanceDFSMem(s string, t string, mem [][]int, i int, j int) i... function editDistanceDP (line 65) | func editDistanceDP(s string, t string) int { function editDistanceDPComp (line 95) | func editDistanceDPComp(s string, t string) int { function MinInt (line 124) | func MinInt(a, b int) int { FILE: codes/go/chapter_dynamic_programming/edit_distance_test.go function TestEditDistanceDFS (line 12) | func TestEditDistanceDFS(test *testing.T) { FILE: codes/go/chapter_dynamic_programming/knapsack.go function knapsackDFS (line 10) | func knapsackDFS(wgt, val []int, i, c int) int { function knapsackDFSMem (line 27) | func knapsackDFSMem(wgt, val []int, mem [][]int, i, c int) int { function knapsackDP (line 49) | func knapsackDP(wgt, val []int, cap int) int { function knapsackDPComp (line 72) | func knapsackDPComp(wgt, val []int, cap int) int { FILE: codes/go/chapter_dynamic_programming/knapsack_test.go function TestKnapsack (line 12) | func TestKnapsack(t *testing.T) { function TestUnboundedKnapsack (line 42) | func TestUnboundedKnapsack(t *testing.T) { FILE: codes/go/chapter_dynamic_programming/min_cost_climbing_stairs_dp.go function minCostClimbingStairsDP (line 8) | func minCostClimbingStairsDP(cost []int) int { function minCostClimbingStairsDPComp (line 32) | func minCostClimbingStairsDPComp(cost []int) int { FILE: codes/go/chapter_dynamic_programming/min_path_sum.go function minPathSumDFS (line 10) | func minPathSumDFS(grid [][]int, i, j int) int { function minPathSumDFSMem (line 27) | func minPathSumDFSMem(grid, mem [][]int, i, j int) int { function minPathSumDP (line 49) | func minPathSumDP(grid [][]int) int { function minPathSumDPComp (line 75) | func minPathSumDPComp(grid [][]int) int { FILE: codes/go/chapter_dynamic_programming/min_path_sum_test.go function TestMinPathSum (line 12) | func TestMinPathSum(t *testing.T) { FILE: codes/go/chapter_dynamic_programming/unbounded_knapsack.go function unboundedKnapsackDP (line 10) | func unboundedKnapsackDP(wgt, val []int, cap int) int { function unboundedKnapsackDPComp (line 33) | func unboundedKnapsackDPComp(wgt, val []int, cap int) int { FILE: codes/go/chapter_graph/graph_adjacency_list.go type graphAdjList (line 16) | type graphAdjList struct method size (line 36) | func (g *graphAdjList) size() int { method addEdge (line 41) | func (g *graphAdjList) addEdge(vet1 Vertex, vet2 Vertex) { method removeEdge (line 53) | func (g *graphAdjList) removeEdge(vet1 Vertex, vet2 Vertex) { method addVertex (line 65) | func (g *graphAdjList) addVertex(vet Vertex) { method removeVertex (line 75) | func (g *graphAdjList) removeVertex(vet Vertex) { method print (line 89) | func (g *graphAdjList) print() { function newGraphAdjList (line 22) | func newGraphAdjList(edges [][]Vertex) *graphAdjList { FILE: codes/go/chapter_graph/graph_adjacency_list_test.go function TestGraphAdjList (line 14) | func TestGraphAdjList(t *testing.T) { FILE: codes/go/chapter_graph/graph_adjacency_matrix.go type graphAdjMat (line 10) | type graphAdjMat struct method size (line 39) | func (g *graphAdjMat) size() int { method addVertex (line 44) | func (g *graphAdjMat) addVertex(val int) { method removeVertex (line 58) | func (g *graphAdjMat) removeVertex(index int) { method addEdge (line 74) | func (g *graphAdjMat) addEdge(i, j int) { method removeEdge (line 86) | func (g *graphAdjMat) removeEdge(i, j int) { method print (line 96) | func (g *graphAdjMat) print() { function newGraphAdjMat (line 18) | func newGraphAdjMat(vertices []int, edges [][]int) *graphAdjMat { FILE: codes/go/chapter_graph/graph_adjacency_matrix_test.go function TestGraphAdjMat (line 12) | func TestGraphAdjMat(t *testing.T) { FILE: codes/go/chapter_graph/graph_bfs.go function graphBFS (line 13) | func graphBFS(g *graphAdjList, startVet Vertex) []Vertex { FILE: codes/go/chapter_graph/graph_bfs_test.go function TestGraphBFS (line 14) | func TestGraphBFS(t *testing.T) { FILE: codes/go/chapter_graph/graph_dfs.go function dfs (line 12) | func dfs(g *graphAdjList, visited map[Vertex]struct{}, res *[]Vertex, ve... function graphDFS (line 28) | func graphDFS(g *graphAdjList, startVet Vertex) []Vertex { FILE: codes/go/chapter_graph/graph_dfs_test.go function TestGraphDFS (line 14) | func TestGraphDFS(t *testing.T) { FILE: codes/go/chapter_greedy/coin_change_greedy.go function coinChangeGreedy (line 8) | func coinChangeGreedy(coins []int, amt int) int { FILE: codes/go/chapter_greedy/coin_change_greedy_test.go function TestCoinChangeGreedy (line 12) | func TestCoinChangeGreedy(t *testing.T) { FILE: codes/go/chapter_greedy/fractional_knapsack.go type Item (line 10) | type Item struct function fractionalKnapsack (line 16) | func fractionalKnapsack(wgt []int, val []int, cap int) float64 { FILE: codes/go/chapter_greedy/fractional_knapsack_test.go function TestFractionalKnapsack (line 12) | func TestFractionalKnapsack(t *testing.T) { FILE: codes/go/chapter_greedy/max_capacity.go function maxCapacity (line 10) | func maxCapacity(ht []int) int { FILE: codes/go/chapter_greedy/max_capacity_test.go function TestMaxCapacity (line 12) | func TestMaxCapacity(t *testing.T) { FILE: codes/go/chapter_greedy/max_product_cutting.go function maxProductCutting (line 10) | func maxProductCutting(n int) int { FILE: codes/go/chapter_greedy/max_product_cutting_test.go function TestMaxProductCutting (line 12) | func TestMaxProductCutting(t *testing.T) { FILE: codes/go/chapter_hashing/array_hash_map.go type pair (line 10) | type pair struct type arrayHashMap (line 16) | type arrayHashMap struct method hashFunc (line 28) | func (a *arrayHashMap) hashFunc(key int) int { method get (line 34) | func (a *arrayHashMap) get(key int) string { method put (line 44) | func (a *arrayHashMap) put(key int, val string) { method remove (line 51) | func (a *arrayHashMap) remove(key int) { method pairSet (line 58) | func (a *arrayHashMap) pairSet() []*pair { method keySet (line 69) | func (a *arrayHashMap) keySet() []int { method valueSet (line 80) | func (a *arrayHashMap) valueSet() []string { method print (line 91) | func (a *arrayHashMap) print() { function newArrayHashMap (line 21) | func newArrayHashMap() *arrayHashMap { FILE: codes/go/chapter_hashing/array_hash_map_test.go function TestArrayHashMap (line 12) | func TestArrayHashMap(t *testing.T) { FILE: codes/go/chapter_hashing/hash_collision_test.go function TestHashMapChaining (line 12) | func TestHashMapChaining(t *testing.T) { function TestHashMapOpenAddressing (line 38) | func TestHashMapOpenAddressing(t *testing.T) { FILE: codes/go/chapter_hashing/hash_map_chaining.go type hashMapChaining (line 14) | type hashMapChaining struct method hashFunc (line 38) | func (m *hashMapChaining) hashFunc(key int) int { method loadFactor (line 43) | func (m *hashMapChaining) loadFactor() float64 { method get (line 48) | func (m *hashMapChaining) get(key int) string { method put (line 62) | func (m *hashMapChaining) put(key int, val string) { method remove (line 85) | func (m *hashMapChaining) remove(key int) { method extend (line 99) | func (m *hashMapChaining) extend() { method print (line 122) | func (m *hashMapChaining) print() { function newHashMapChaining (line 23) | func newHashMapChaining() *hashMapChaining { FILE: codes/go/chapter_hashing/hash_map_open_addressing.go type hashMapOpenAddressing (line 12) | type hashMapOpenAddressing struct method hashFunc (line 34) | func (h *hashMapOpenAddressing) hashFunc(key int) int { method loadFactor (line 39) | func (h *hashMapOpenAddressing) loadFactor() float64 { method findBucket (line 44) | func (h *hashMapOpenAddressing) findBucket(key int) int { method get (line 70) | func (h *hashMapOpenAddressing) get(key int) string { method put (line 79) | func (h *hashMapOpenAddressing) put(key int, val string) { method remove (line 93) | func (h *hashMapOpenAddressing) remove(key int) { method extend (line 102) | func (h *hashMapOpenAddressing) extend() { method print (line 116) | func (h *hashMapOpenAddressing) print() { function newHashMapOpenAddressing (line 22) | func newHashMapOpenAddressing() *hashMapOpenAddressing { FILE: codes/go/chapter_hashing/hash_map_test.go function TestHashMap (line 15) | func TestHashMap(t *testing.T) { function TestSimpleHash (line 58) | func TestSimpleHash(t *testing.T) { FILE: codes/go/chapter_hashing/simple_hash.go function addHash (line 10) | func addHash(key string) int { function mulHash (line 22) | func mulHash(key string) int { function xorHash (line 34) | func xorHash(key string) int { function rotHash (line 46) | func rotHash(key string) int { FILE: codes/go/chapter_heap/heap.go type intHeap (line 9) | type intHeap method Push (line 12) | func (h *intHeap) Push(x any) { method Pop (line 19) | func (h *intHeap) Pop() any { method Len (line 27) | func (h *intHeap) Len() int { method Less (line 32) | func (h *intHeap) Less(i, j int) bool { method Swap (line 38) | func (h *intHeap) Swap(i, j int) { method Top (line 43) | func (h *intHeap) Top() any { FILE: codes/go/chapter_heap/heap_test.go function testPush (line 16) | func testPush(h *intHeap, val int) { function testPop (line 23) | func testPop(h *intHeap) { function TestHeap (line 30) | func TestHeap(t *testing.T) { function TestMyHeap (line 62) | func TestMyHeap(t *testing.T) { function TestTopKHeap (line 93) | func TestTopKHeap(t *testing.T) { FILE: codes/go/chapter_heap/my_heap.go type maxHeap (line 13) | type maxHeap struct method left (line 37) | func (h *maxHeap) left(i int) int { method right (line 42) | func (h *maxHeap) right(i int) int { method parent (line 47) | func (h *maxHeap) parent(i int) int { method swap (line 53) | func (h *maxHeap) swap(i, j int) { method size (line 58) | func (h *maxHeap) size() int { method isEmpty (line 63) | func (h *maxHeap) isEmpty() bool { method peek (line 68) | func (h *maxHeap) peek() any { method push (line 73) | func (h *maxHeap) push(val any) { method siftUp (line 81) | func (h *maxHeap) siftUp(i int) { method pop (line 97) | func (h *maxHeap) pop() any { method siftDown (line 116) | func (h *maxHeap) siftDown(i int) { method print (line 138) | func (h *maxHeap) print() { function newHeap (line 19) | func newHeap() *maxHeap { function newMaxHeap (line 26) | func newMaxHeap(nums []any) *maxHeap { FILE: codes/go/chapter_heap/top_k.go type minHeap (line 9) | type minHeap method Len (line 11) | func (h *minHeap) Len() int { return len(*h) } method Less (line 12) | func (h *minHeap) Less(i, j int) bool { return (*h)[i].(int) < (*h)[j]... method Swap (line 13) | func (h *minHeap) Swap(i, j int) { (*h)[i], (*h)[j] = (*h)[j], (*... method Push (line 16) | func (h *minHeap) Push(x any) { method Pop (line 21) | func (h *minHeap) Pop() any { method Top (line 29) | func (h *minHeap) Top() any { function topKHeap (line 34) | func topKHeap(nums []int, k int) *minHeap { FILE: codes/go/chapter_searching/binary_search.go function binarySearch (line 8) | func binarySearch(nums []int, target int) int { function binarySearchLCRO (line 27) | func binarySearchLCRO(nums []int, target int) int { FILE: codes/go/chapter_searching/binary_search_edge.go function binarySearchLeftEdge (line 8) | func binarySearchLeftEdge(nums []int, target int) int { function binarySearchRightEdge (line 20) | func binarySearchRightEdge(nums []int, target int) int { FILE: codes/go/chapter_searching/binary_search_insertion.go function binarySearchInsertionSimple (line 8) | func binarySearchInsertionSimple(nums []int, target int) int { function binarySearchInsertion (line 30) | func binarySearchInsertion(nums []int, target int) int { FILE: codes/go/chapter_searching/binary_search_test.go function TestBinarySearch (line 12) | func TestBinarySearch(t *testing.T) { function TestBinarySearchEdge (line 26) | func TestBinarySearchEdge(t *testing.T) { function TestBinarySearchInsertion (line 41) | func TestBinarySearchInsertion(t *testing.T) { FILE: codes/go/chapter_searching/hashing_search.go function hashingSearchArray (line 10) | func hashingSearchArray(m map[int]int, target int) int { function hashingSearchLinkedList (line 21) | func hashingSearchLinkedList(m map[int]*ListNode, target int) *ListNode { FILE: codes/go/chapter_searching/hashing_search_test.go function TestHashingSearch (line 14) | func TestHashingSearch(t *testing.T) { FILE: codes/go/chapter_searching/linear_search.go function linearSearchArray (line 12) | func linearSearchArray(nums []int, target int) int { function linearSearchLinkedList (line 25) | func linearSearchLinkedList(node *ListNode, target int) *ListNode { FILE: codes/go/chapter_searching/linear_search_test.go function TestLinearSearch (line 14) | func TestLinearSearch(t *testing.T) { FILE: codes/go/chapter_searching/two_sum.go function twoSumBruteForce (line 8) | func twoSumBruteForce(nums []int, target int) []int { function twoSumHashTable (line 22) | func twoSumHashTable(nums []int, target int) []int { FILE: codes/go/chapter_searching/two_sum_test.go function TestTwoSum (line 12) | func TestTwoSum(t *testing.T) { FILE: codes/go/chapter_sorting/bubble_sort.go function bubbleSort (line 8) | func bubbleSort(nums []int) { function bubbleSortWithFlag (line 22) | func bubbleSortWithFlag(nums []int) { FILE: codes/go/chapter_sorting/bubble_sort_test.go function TestBubbleSort (line 12) | func TestBubbleSort(t *testing.T) { FILE: codes/go/chapter_sorting/bucket_sort.go function bucketSort (line 10) | func bucketSort(nums []float64) { FILE: codes/go/chapter_sorting/bucket_sort_test.go function TestBucketSort (line 12) | func TestBucketSort(t *testing.T) { FILE: codes/go/chapter_sorting/counting_sort.go type CountingSort (line 7) | type CountingSort struct function countingSortNaive (line 11) | func countingSortNaive(nums []int) { function countingSort (line 36) | func countingSort(nums []int) { FILE: codes/go/chapter_sorting/counting_sort_test.go function TestCountingSort (line 12) | func TestCountingSort(t *testing.T) { FILE: codes/go/chapter_sorting/heap_sort.go function siftDown (line 8) | func siftDown(nums *[]int, n, i int) { function heapSort (line 32) | func heapSort(nums *[]int) { FILE: codes/go/chapter_sorting/heap_sort_test.go function TestHeapSort (line 12) | func TestHeapSort(t *testing.T) { FILE: codes/go/chapter_sorting/insertion_sort.go function insertionSort (line 8) | func insertionSort(nums []int) { FILE: codes/go/chapter_sorting/insertion_sort_test.go function TestInsertionSort (line 12) | func TestInsertionSort(t *testing.T) { FILE: codes/go/chapter_sorting/merge_sort.go function merge (line 8) | func merge(nums []int, left, mid, right int) { function mergeSort (line 43) | func mergeSort(nums []int, left, right int) { FILE: codes/go/chapter_sorting/merge_sort_test.go function TestMergeSort (line 12) | func TestMergeSort(t *testing.T) { FILE: codes/go/chapter_sorting/quick_sort.go type quickSort (line 8) | type quickSort struct method partition (line 17) | func (q *quickSort) partition(nums []int, left, right int) int { method quickSort (line 36) | func (q *quickSort) quickSort(nums []int, left, right int) { type quickSortMedian (line 11) | type quickSortMedian struct method medianThree (line 49) | func (q *quickSortMedian) medianThree(nums []int, left, mid, right int... method partition (line 61) | func (q *quickSortMedian) partition(nums []int, left, right int) int { method quickSort (line 84) | func (q *quickSortMedian) quickSort(nums []int, left, right int) { type quickSortTailCall (line 14) | type quickSortTailCall struct method partition (line 97) | func (q *quickSortTailCall) partition(nums []int, left, right int) int { method quickSort (line 116) | func (q *quickSortTailCall) quickSort(nums []int, left, right int) { FILE: codes/go/chapter_sorting/quick_sort_test.go function TestQuickSort (line 13) | func TestQuickSort(t *testing.T) { function TestQuickSortMedian (line 21) | func TestQuickSortMedian(t *testing.T) { function TestQuickSortTailCall (line 29) | func TestQuickSortTailCall(t *testing.T) { FILE: codes/go/chapter_sorting/radix_sort.go function digit (line 10) | func digit(num, exp int) int { function countingSortDigit (line 16) | func countingSortDigit(nums []int, exp int) { function radixSort (line 44) | func radixSort(nums []int) { FILE: codes/go/chapter_sorting/radix_sort_test.go function TestRadixSort (line 12) | func TestRadixSort(t *testing.T) { FILE: codes/go/chapter_sorting/selection_sort.go function selectionSort (line 8) | func selectionSort(nums []int) { FILE: codes/go/chapter_sorting/selection_sort_test.go function TestSelectionSort (line 12) | func TestSelectionSort(t *testing.T) { FILE: codes/go/chapter_stack_and_queue/array_deque.go type arrayDeque (line 10) | type arrayDeque struct method size (line 28) | func (q *arrayDeque) size() int { method isEmpty (line 33) | func (q *arrayDeque) isEmpty() bool { method index (line 38) | func (q *arrayDeque) index(i int) int { method pushFirst (line 46) | func (q *arrayDeque) pushFirst(num int) { method pushLast (line 60) | func (q *arrayDeque) pushLast(num int) { method popFirst (line 73) | func (q *arrayDeque) popFirst() any { method popLast (line 85) | func (q *arrayDeque) popLast() any { method peekFirst (line 95) | func (q *arrayDeque) peekFirst() any { method peekLast (line 103) | func (q *arrayDeque) peekLast() any { method toSlice (line 113) | func (q *arrayDeque) toSlice() []int { function newArrayDeque (line 18) | func newArrayDeque(queCapacity int) *arrayDeque { FILE: codes/go/chapter_stack_and_queue/array_queue.go type arrayQueue (line 8) | type arrayQueue struct method size (line 26) | func (q *arrayQueue) size() int { method isEmpty (line 31) | func (q *arrayQueue) isEmpty() bool { method push (line 36) | func (q *arrayQueue) push(num int) { method pop (line 50) | func (q *arrayQueue) pop() any { method peek (line 63) | func (q *arrayQueue) peek() any { method toSlice (line 71) | func (q *arrayQueue) toSlice() []int { function newArrayQueue (line 16) | func newArrayQueue(queCapacity int) *arrayQueue { FILE: codes/go/chapter_stack_and_queue/array_stack.go type arrayStack (line 8) | type arrayStack struct method size (line 21) | func (s *arrayStack) size() int { method isEmpty (line 26) | func (s *arrayStack) isEmpty() bool { method push (line 31) | func (s *arrayStack) push(v int) { method pop (line 37) | func (s *arrayStack) pop() any { method peek (line 44) | func (s *arrayStack) peek() any { method toSlice (line 53) | func (s *arrayStack) toSlice() []int { function newArrayStack (line 13) | func newArrayStack() *arrayStack { FILE: codes/go/chapter_stack_and_queue/deque_test.go function TestDeque (line 15) | func TestDeque(t *testing.T) { function TestArrayDeque (line 52) | func TestArrayDeque(t *testing.T) { function TestLinkedListDeque (line 95) | func TestLinkedListDeque(t *testing.T) { function BenchmarkLinkedListDeque (line 132) | func BenchmarkLinkedListDeque(b *testing.B) { FILE: codes/go/chapter_stack_and_queue/linkedlist_deque.go type linkedListDeque (line 12) | type linkedListDeque struct method pushFirst (line 25) | func (s *linkedListDeque) pushFirst(value any) { method pushLast (line 30) | func (s *linkedListDeque) pushLast(value any) { method popFirst (line 35) | func (s *linkedListDeque) popFirst() any { method popLast (line 45) | func (s *linkedListDeque) popLast() any { method peekFirst (line 55) | func (s *linkedListDeque) peekFirst() any { method peekLast (line 64) | func (s *linkedListDeque) peekLast() any { method size (line 73) | func (s *linkedListDeque) size() int { method isEmpty (line 78) | func (s *linkedListDeque) isEmpty() bool { method toList (line 83) | func (s *linkedListDeque) toList() *list.List { function newLinkedListDeque (line 18) | func newLinkedListDeque() *linkedListDeque { FILE: codes/go/chapter_stack_and_queue/linkedlist_queue.go type linkedListQueue (line 12) | type linkedListQueue struct method push (line 25) | func (s *linkedListQueue) push(value any) { method pop (line 30) | func (s *linkedListQueue) pop() any { method peek (line 40) | func (s *linkedListQueue) peek() any { method size (line 49) | func (s *linkedListQueue) size() int { method isEmpty (line 54) | func (s *linkedListQueue) isEmpty() bool { method toList (line 59) | func (s *linkedListQueue) toList() *list.List { function newLinkedListQueue (line 18) | func newLinkedListQueue() *linkedListQueue { FILE: codes/go/chapter_stack_and_queue/linkedlist_stack.go type linkedListStack (line 12) | type linkedListStack struct method push (line 25) | func (s *linkedListStack) push(value int) { method pop (line 30) | func (s *linkedListStack) pop() any { method peek (line 40) | func (s *linkedListStack) peek() any { method size (line 49) | func (s *linkedListStack) size() int { method isEmpty (line 54) | func (s *linkedListStack) isEmpty() bool { method toList (line 59) | func (s *linkedListStack) toList() *list.List { function newLinkedListStack (line 18) | func newLinkedListStack() *linkedListStack { FILE: codes/go/chapter_stack_and_queue/queue_test.go function TestQueue (line 15) | func TestQueue(t *testing.T) { function TestArrayQueue (line 48) | func TestArrayQueue(t *testing.T) { function TestLinkedListQueue (line 92) | func TestLinkedListQueue(t *testing.T) { function BenchmarkArrayQueue (line 124) | func BenchmarkArrayQueue(b *testing.B) { function BenchmarkLinkedQueue (line 137) | func BenchmarkLinkedQueue(b *testing.B) { FILE: codes/go/chapter_stack_and_queue/stack_test.go function TestStack (line 14) | func TestStack(t *testing.T) { function TestArrayStack (line 47) | func TestArrayStack(t *testing.T) { function TestLinkedListStack (line 78) | func TestLinkedListStack(t *testing.T) { function BenchmarkArrayStack (line 109) | func BenchmarkArrayStack(b *testing.B) { function BenchmarkLinkedListStack (line 121) | func BenchmarkLinkedListStack(b *testing.B) { FILE: codes/go/chapter_tree/array_binary_tree.go type arrayBinaryTree (line 8) | type arrayBinaryTree struct method size (line 20) | func (abt *arrayBinaryTree) size() int { method val (line 25) | func (abt *arrayBinaryTree) val(i int) any { method left (line 34) | func (abt *arrayBinaryTree) left(i int) int { method right (line 39) | func (abt *arrayBinaryTree) right(i int) int { method parent (line 44) | func (abt *arrayBinaryTree) parent(i int) int { method levelOrder (line 49) | func (abt *arrayBinaryTree) levelOrder() []any { method dfs (line 61) | func (abt *arrayBinaryTree) dfs(i int, order string, res *[]any) { method preOrder (line 83) | func (abt *arrayBinaryTree) preOrder() []any { method inOrder (line 90) | func (abt *arrayBinaryTree) inOrder() []any { method postOrder (line 97) | func (abt *arrayBinaryTree) postOrder() []any { function newArrayBinaryTree (line 13) | func newArrayBinaryTree(arr []any) *arrayBinaryTree { FILE: codes/go/chapter_tree/array_binary_tree_test.go function TestArrayBinaryTree (line 14) | func TestArrayBinaryTree(t *testing.T) { FILE: codes/go/chapter_tree/avl_tree.go type aVLTree (line 10) | type aVLTree struct method height (line 20) | func (t *aVLTree) height(node *TreeNode) int { method updateHeight (line 29) | func (t *aVLTree) updateHeight(node *TreeNode) { method balanceFactor (line 41) | func (t *aVLTree) balanceFactor(node *TreeNode) int { method rightRotate (line 51) | func (t *aVLTree) rightRotate(node *TreeNode) *TreeNode { method leftRotate (line 65) | func (t *aVLTree) leftRotate(node *TreeNode) *TreeNode { method rotate (line 79) | func (t *aVLTree) rotate(node *TreeNode) *TreeNode { method insert (line 110) | func (t *aVLTree) insert(val int) { method insertHelper (line 115) | func (t *aVLTree) insertHelper(node *TreeNode, val int) *TreeNode { method remove (line 137) | func (t *aVLTree) remove(val int) { method removeHelper (line 142) | func (t *aVLTree) removeHelper(node *TreeNode, val int) *TreeNode { method search (line 183) | func (t *aVLTree) search(val int) *TreeNode { function newAVLTree (line 15) | func newAVLTree() *aVLTree { FILE: codes/go/chapter_tree/avl_tree_test.go function TestAVLTree (line 14) | func TestAVLTree(t *testing.T) { function testInsert (line 44) | func testInsert(tree *aVLTree, val int) { function testRemove (line 50) | func testRemove(tree *aVLTree, val int) { FILE: codes/go/chapter_tree/binary_search_tree.go type binarySearchTree (line 11) | type binarySearchTree struct method getRoot (line 23) | func (bst *binarySearchTree) getRoot() *TreeNode { method search (line 28) | func (bst *binarySearchTree) search(num int) *TreeNode { method insert (line 48) | func (bst *binarySearchTree) insert(num int) { method remove (line 79) | func (bst *binarySearchTree) remove(num int) { method print (line 140) | func (bst *binarySearchTree) print() { function newBinarySearchTree (line 15) | func newBinarySearchTree() *binarySearchTree { FILE: codes/go/chapter_tree/binary_search_tree_test.go function TestBinarySearchTree (line 12) | func TestBinarySearchTree(t *testing.T) { FILE: codes/go/chapter_tree/binary_tree_bfs.go function levelOrder (line 14) | func levelOrder(root *TreeNode) []any { FILE: codes/go/chapter_tree/binary_tree_bfs_test.go function TestLevelOrder (line 14) | func TestLevelOrder(t *testing.T) { FILE: codes/go/chapter_tree/binary_tree_dfs.go function preOrder (line 14) | func preOrder(node *TreeNode) { function inOrder (line 25) | func inOrder(node *TreeNode) { function postOrder (line 36) | func postOrder(node *TreeNode) { FILE: codes/go/chapter_tree/binary_tree_dfs_test.go function TestPreInPostOrderTraversal (line 14) | func TestPreInPostOrderTraversal(t *testing.T) { FILE: codes/go/chapter_tree/binary_tree_test.go function TestBinaryTree (line 14) | func TestBinaryTree(t *testing.T) { FILE: codes/go/pkg/list_node.go type ListNode (line 8) | type ListNode struct function NewListNode (line 14) | func NewListNode(v int) *ListNode { function ArrayToLinkedList (line 22) | func ArrayToLinkedList(arr []int) *ListNode { FILE: codes/go/pkg/list_node_test.go function TestListNode (line 11) | func TestListNode(t *testing.T) { FILE: codes/go/pkg/print_utils.go function PrintSlice (line 15) | func PrintSlice[T any](nums []T) { function PrintList (line 21) | func PrintList(list *list.List) { function PrintMap (line 37) | func PrintMap[K comparable, V any](m map[K]V) { function PrintHeap (line 44) | func PrintHeap(h []any) { function PrintLinkedList (line 53) | func PrintLinkedList(node *ListNode) { function PrintTree (line 67) | func PrintTree(root *TreeNode) { function printTreeHelper (line 74) | func printTreeHelper(root *TreeNode, prev *trunk, isRight bool) { type trunk (line 99) | type trunk struct function newTrunk (line 104) | func newTrunk(prev *trunk, str string) *trunk { function showTrunk (line 111) | func showTrunk(t *trunk) { FILE: codes/go/pkg/tree_node.go type TreeNode (line 8) | type TreeNode struct function NewTreeNode (line 16) | func NewTreeNode(v any) *TreeNode { function SliceToTreeDFS (line 45) | func SliceToTreeDFS(arr []any, i int) *TreeNode { function SliceToTree (line 56) | func SliceToTree(arr []any) *TreeNode { function TreeToSliceDFS (line 61) | func TreeToSliceDFS(root *TreeNode, i int, res *[]any) { function TreeToSlice (line 74) | func TreeToSlice(root *TreeNode) []any { FILE: codes/go/pkg/tree_node_test.go function TestTreeNode (line 12) | func TestTreeNode(t *testing.T) { FILE: codes/go/pkg/vertex.go type Vertex (line 8) | type Vertex struct function NewVertex (line 13) | func NewVertex(val int) Vertex { function ValsToVets (line 20) | func ValsToVets(vals []int) []Vertex { function VetsToVals (line 29) | func VetsToVals(vets []Vertex) []int { function DeleteSliceElms (line 38) | func DeleteSliceElms[T any](a []T, elms ...T) []T { FILE: codes/java/chapter_array_and_linkedlist/array.java class array (line 12) | public class array { method randomAccess (line 14) | static int randomAccess(int[] nums) { method extend (line 23) | static int[] extend(int[] nums, int enlarge) { method insert (line 35) | static void insert(int[] nums, int num, int index) { method remove (line 45) | static void remove(int[] nums, int index) { method traverse (line 53) | static void traverse(int[] nums) { method find (line 66) | static int find(int[] nums, int target) { method main (line 75) | public static void main(String[] args) { FILE: codes/java/chapter_array_and_linkedlist/linked_list.java class linked_list (line 11) | public class linked_list { method insert (line 13) | static void insert(ListNode n0, ListNode P) { method remove (line 20) | static void remove(ListNode n0) { method access (line 30) | static ListNode access(ListNode head, int index) { method find (line 40) | static int find(ListNode head, int target) { method main (line 52) | public static void main(String[] args) { FILE: codes/java/chapter_array_and_linkedlist/list.java class list (line 11) | public class list { method main (line 12) | public static void main(String[] args) { FILE: codes/java/chapter_array_and_linkedlist/my_list.java class MyList (line 12) | class MyList { method MyList (line 19) | public MyList() { method size (line 24) | public int size() { method capacity (line 29) | public int capacity() { method get (line 34) | public int get(int index) { method set (line 42) | public void set(int index, int num) { method add (line 49) | public void add(int num) { method insert (line 59) | public void insert(int index, int num) { method remove (line 75) | public int remove(int index) { method extendCapacity (line 90) | public void extendCapacity() { method toArray (line 98) | public int[] toArray() { class my_list (line 109) | public class my_list { method main (line 111) | public static void main(String[] args) { FILE: codes/java/chapter_backtracking/n_queens.java class n_queens (line 11) | public class n_queens { method backtrack (line 13) | public static void backtrack(int row, int n, List> state,... method nQueens (line 44) | public static List>> nQueens(int n) { method main (line 64) | public static void main(String[] args) { FILE: codes/java/chapter_backtracking/permutations_i.java class permutations_i (line 11) | public class permutations_i { method backtrack (line 13) | public static void backtrack(List state, int[] choices, boole... method permutationsI (line 37) | static List> permutationsI(int[] nums) { method main (line 43) | public static void main(String[] args) { FILE: codes/java/chapter_backtracking/permutations_ii.java class permutations_ii (line 11) | public class permutations_ii { method backtrack (line 13) | static void backtrack(List state, int[] choices, boolean[] se... method permutationsII (line 39) | static List> permutationsII(int[] nums) { method main (line 45) | public static void main(String[] args) { FILE: codes/java/chapter_backtracking/preorder_traversal_i_compact.java class preorder_traversal_i_compact (line 12) | public class preorder_traversal_i_compact { method preOrder (line 16) | static void preOrder(TreeNode root) { method main (line 28) | public static void main(String[] args) { FILE: codes/java/chapter_backtracking/preorder_traversal_ii_compact.java class preorder_traversal_ii_compact (line 12) | public class preorder_traversal_ii_compact { method preOrder (line 17) | static void preOrder(TreeNode root) { method main (line 33) | public static void main(String[] args) { FILE: codes/java/chapter_backtracking/preorder_traversal_iii_compact.java class preorder_traversal_iii_compact (line 12) | public class preorder_traversal_iii_compact { method preOrder (line 17) | static void preOrder(TreeNode root) { method main (line 34) | public static void main(String[] args) { FILE: codes/java/chapter_backtracking/preorder_traversal_iii_template.java class preorder_traversal_iii_template (line 12) | public class preorder_traversal_iii_template { method isSolution (line 14) | static boolean isSolution(List state) { method recordSolution (line 19) | static void recordSolution(List state, List> ... method isValid (line 24) | static boolean isValid(List state, TreeNode choice) { method makeChoice (line 29) | static void makeChoice(List state, TreeNode choice) { method undoChoice (line 34) | static void undoChoice(List state, TreeNode choice) { method backtrack (line 39) | static void backtrack(List state, List choices, Li... method main (line 59) | public static void main(String[] args) { FILE: codes/java/chapter_backtracking/subset_sum_i.java class subset_sum_i (line 11) | public class subset_sum_i { method backtrack (line 13) | static void backtrack(List state, int target, int[] choices, ... method subsetSumI (line 37) | static List> subsetSumI(int[] nums, int target) { method main (line 46) | public static void main(String[] args) { FILE: codes/java/chapter_backtracking/subset_sum_i_naive.java class subset_sum_i_naive (line 11) | public class subset_sum_i_naive { method backtrack (line 13) | static void backtrack(List state, int target, int total, int[... method subsetSumINaive (line 35) | static List> subsetSumINaive(int[] nums, int target) { method main (line 43) | public static void main(String[] args) { FILE: codes/java/chapter_backtracking/subset_sum_ii.java class subset_sum_ii (line 11) | public class subset_sum_ii { method backtrack (line 13) | static void backtrack(List state, int target, int[] choices, ... method subsetSumII (line 42) | static List> subsetSumII(int[] nums, int target) { method main (line 51) | public static void main(String[] args) { FILE: codes/java/chapter_computational_complexity/iteration.java class iteration (line 9) | public class iteration { method forLoop (line 11) | static int forLoop(int n) { method whileLoop (line 21) | static int whileLoop(int n) { method whileLoopII (line 33) | static int whileLoopII(int n) { method nestedForLoop (line 47) | static String nestedForLoop(int n) { method main (line 60) | public static void main(String[] args) { FILE: codes/java/chapter_computational_complexity/recursion.java class recursion (line 11) | public class recursion { method recur (line 13) | static int recur(int n) { method forLoopRecur (line 24) | static int forLoopRecur(int n) { method tailRecur (line 43) | static int tailRecur(int n, int res) { method fib (line 52) | static int fib(int n) { method main (line 63) | public static void main(String[] args) { FILE: codes/java/chapter_computational_complexity/space_complexity.java class space_complexity (line 12) | public class space_complexity { method function (line 14) | static int function() { method constant (line 20) | static void constant(int n) { method linear (line 37) | static void linear(int n) { method linearRecur (line 53) | static void linearRecur(int n) { method quadratic (line 61) | static void quadratic(int n) { method quadraticRecur (line 76) | static int quadraticRecur(int n) { method buildTree (line 86) | static TreeNode buildTree(int n) { method main (line 96) | public static void main(String[] args) { FILE: codes/java/chapter_computational_complexity/time_complexity.java class time_complexity (line 9) | public class time_complexity { method constant (line 11) | static int constant(int n) { method linear (line 20) | static int linear(int n) { method arrayTraversal (line 28) | static int arrayTraversal(int[] nums) { method quadratic (line 38) | static int quadratic(int n) { method bubbleSort (line 50) | static int bubbleSort(int[] nums) { method exponential (line 69) | static int exponential(int n) { method expRecur (line 83) | static int expRecur(int n) { method logarithmic (line 90) | static int logarithmic(int n) { method logRecur (line 100) | static int logRecur(int n) { method linearLogRecur (line 107) | static int linearLogRecur(int n) { method factorialRecur (line 118) | static int factorialRecur(int n) { method main (line 130) | public static void main(String[] args) { FILE: codes/java/chapter_computational_complexity/worst_best_time_complexity.java class worst_best_time_complexity (line 11) | public class worst_best_time_complexity { method randomNumbers (line 13) | static int[] randomNumbers(int n) { method findOne (line 30) | static int findOne(int[] nums) { method main (line 41) | public static void main(String[] args) { FILE: codes/java/chapter_divide_and_conquer/binary_search_recur.java class binary_search_recur (line 9) | public class binary_search_recur { method dfs (line 11) | static int dfs(int[] nums, int target, int i, int j) { method binarySearch (line 31) | static int binarySearch(int[] nums, int target) { method main (line 37) | public static void main(String[] args) { FILE: codes/java/chapter_divide_and_conquer/build_tree.java class build_tree (line 12) | public class build_tree { method dfs (line 14) | static TreeNode dfs(int[] preorder, Map inorderMap, ... method buildTree (line 31) | static TreeNode buildTree(int[] preorder, int[] inorder) { method main (line 41) | public static void main(String[] args) { FILE: codes/java/chapter_divide_and_conquer/hanota.java class hanota (line 11) | public class hanota { method move (line 13) | static void move(List src, List tar) { method dfs (line 21) | static void dfs(int i, List src, List buf, List A, List B, List choices, int state, int n, ... method climbingStairsBacktrack (line 29) | public static int climbingStairsBacktrack(int n) { method main (line 38) | public static void main(String[] args) { FILE: codes/java/chapter_dynamic_programming/climbing_stairs_constraint_dp.java class climbing_stairs_constraint_dp (line 9) | public class climbing_stairs_constraint_dp { method climbingStairsConstraintDP (line 11) | static int climbingStairsConstraintDP(int n) { method main (line 30) | public static void main(String[] args) { FILE: codes/java/chapter_dynamic_programming/climbing_stairs_dfs.java class climbing_stairs_dfs (line 9) | public class climbing_stairs_dfs { method dfs (line 11) | public static int dfs(int i) { method climbingStairsDFS (line 21) | public static int climbingStairsDFS(int n) { method main (line 25) | public static void main(String[] args) { FILE: codes/java/chapter_dynamic_programming/climbing_stairs_dfs_mem.java class climbing_stairs_dfs_mem (line 11) | public class climbing_stairs_dfs_mem { method dfs (line 13) | public static int dfs(int i, int[] mem) { method climbingStairsDFSMem (line 28) | public static int climbingStairsDFSMem(int n) { method main (line 35) | public static void main(String[] args) { FILE: codes/java/chapter_dynamic_programming/climbing_stairs_dp.java class climbing_stairs_dp (line 9) | public class climbing_stairs_dp { method climbingStairsDP (line 11) | public static int climbingStairsDP(int n) { method climbingStairsDPComp (line 27) | public static int climbingStairsDPComp(int n) { method main (line 39) | public static void main(String[] args) { FILE: codes/java/chapter_dynamic_programming/coin_change.java class coin_change (line 11) | public class coin_change { method coinChangeDP (line 13) | static int coinChangeDP(int[] coins, int amt) { method coinChangeDPComp (line 38) | static int coinChangeDPComp(int[] coins, int amt) { method main (line 60) | public static void main(String[] args) { FILE: codes/java/chapter_dynamic_programming/coin_change_ii.java class coin_change_ii (line 9) | public class coin_change_ii { method coinChangeIIDP (line 11) | static int coinChangeIIDP(int[] coins, int amt) { method coinChangeIIDPComp (line 35) | static int coinChangeIIDPComp(int[] coins, int amt) { method main (line 55) | public static void main(String[] args) { FILE: codes/java/chapter_dynamic_programming/edit_distance.java class edit_distance (line 11) | public class edit_distance { method editDistanceDFS (line 13) | static int editDistanceDFS(String s, String t, int i, int j) { method editDistanceDFSMem (line 35) | static int editDistanceDFSMem(String s, String t, int[][] mem, int i, ... method editDistanceDP (line 61) | static int editDistanceDP(String s, String t) { method editDistanceDPComp (line 87) | static int editDistanceDPComp(String s, String t) { method main (line 115) | public static void main(String[] args) { FILE: codes/java/chapter_dynamic_programming/knapsack.java class knapsack (line 11) | public class knapsack { method knapsackDFS (line 14) | static int knapsackDFS(int[] wgt, int[] val, int i, int c) { method knapsackDFSMem (line 31) | static int knapsackDFSMem(int[] wgt, int[] val, int[][] mem, int i, in... method knapsackDP (line 53) | static int knapsackDP(int[] wgt, int[] val, int cap) { method knapsackDPComp (line 73) | static int knapsackDPComp(int[] wgt, int[] val, int cap) { method main (line 90) | public static void main(String[] args) { FILE: codes/java/chapter_dynamic_programming/min_cost_climbing_stairs_dp.java class min_cost_climbing_stairs_dp (line 11) | public class min_cost_climbing_stairs_dp { method minCostClimbingStairsDP (line 13) | public static int minCostClimbingStairsDP(int[] cost) { method minCostClimbingStairsDPComp (line 30) | public static int minCostClimbingStairsDPComp(int[] cost) { method main (line 43) | public static void main(String[] args) { FILE: codes/java/chapter_dynamic_programming/min_path_sum.java class min_path_sum (line 11) | public class min_path_sum { method minPathSumDFS (line 13) | static int minPathSumDFS(int[][] grid, int i, int j) { method minPathSumDFSMem (line 30) | static int minPathSumDFSMem(int[][] grid, int[][] mem, int i, int j) { method minPathSumDP (line 52) | static int minPathSumDP(int[][] grid) { method minPathSumDPComp (line 75) | static int minPathSumDPComp(int[][] grid) { method main (line 96) | public static void main(String[] args) { FILE: codes/java/chapter_dynamic_programming/unbounded_knapsack.java class unbounded_knapsack (line 9) | public class unbounded_knapsack { method unboundedKnapsackDP (line 11) | static int unboundedKnapsackDP(int[] wgt, int[] val, int cap) { method unboundedKnapsackDPComp (line 31) | static int unboundedKnapsackDPComp(int[] wgt, int[] val, int cap) { method main (line 50) | public static void main(String[] args) { FILE: codes/java/chapter_graph/graph_adjacency_list.java class GraphAdjList (line 13) | class GraphAdjList { method GraphAdjList (line 18) | public GraphAdjList(Vertex[][] edges) { method size (line 29) | public int size() { method addEdge (line 34) | public void addEdge(Vertex vet1, Vertex vet2) { method removeEdge (line 43) | public void removeEdge(Vertex vet1, Vertex vet2) { method addVertex (line 52) | public void addVertex(Vertex vet) { method removeVertex (line 60) | public void removeVertex(Vertex vet) { method print (line 72) | public void print() { class graph_adjacency_list (line 83) | public class graph_adjacency_list { method main (line 84) | public static void main(String[] args) { FILE: codes/java/chapter_graph/graph_adjacency_matrix.java class GraphAdjMat (line 13) | class GraphAdjMat { method GraphAdjMat (line 18) | public GraphAdjMat(int[] vertices, int[][] edges) { method size (line 33) | public int size() { method addVertex (line 38) | public void addVertex(int val) { method removeVertex (line 55) | public void removeVertex(int index) { method addEdge (line 70) | public void addEdge(int i, int j) { method removeEdge (line 81) | public void removeEdge(int i, int j) { method print (line 90) | public void print() { class graph_adjacency_matrix (line 98) | public class graph_adjacency_matrix { method main (line 99) | public static void main(String[] args) { FILE: codes/java/chapter_graph/graph_bfs.java class graph_bfs (line 12) | public class graph_bfs { method graphBFS (line 15) | static List graphBFS(GraphAdjList graph, Vertex startVet) { method main (line 40) | public static void main(String[] args) { FILE: codes/java/chapter_graph/graph_dfs.java class graph_dfs (line 12) | public class graph_dfs { method dfs (line 14) | static void dfs(GraphAdjList graph, Set visited, List ... method graphDFS (line 28) | static List graphDFS(GraphAdjList graph, Vertex startVet) { method main (line 37) | public static void main(String[] args) { FILE: codes/java/chapter_greedy/coin_change_greedy.java class coin_change_greedy (line 11) | public class coin_change_greedy { method coinChangeGreedy (line 13) | static int coinChangeGreedy(int[] coins, int amt) { method main (line 31) | public static void main(String[] args) { FILE: codes/java/chapter_greedy/fractional_knapsack.java class Item (line 13) | class Item { method Item (line 17) | public Item(int w, int v) { class fractional_knapsack (line 23) | public class fractional_knapsack { method fractionalKnapsack (line 25) | static double fractionalKnapsack(int[] wgt, int[] val, int cap) { method main (line 50) | public static void main(String[] args) { FILE: codes/java/chapter_greedy/max_capacity.java class max_capacity (line 9) | public class max_capacity { method maxCapacity (line 11) | static int maxCapacity(int[] ht) { method main (line 31) | public static void main(String[] args) { FILE: codes/java/chapter_greedy/max_product_cutting.java class max_product_cutting (line 11) | public class max_product_cutting { method maxProductCutting (line 13) | public static int maxProductCutting(int n) { method main (line 33) | public static void main(String[] args) { FILE: codes/java/chapter_hashing/array_hash_map.java class Pair (line 12) | class Pair { method Pair (line 16) | public Pair(int key, String val) { class ArrayHashMap (line 23) | class ArrayHashMap { method ArrayHashMap (line 26) | public ArrayHashMap() { method hashFunc (line 35) | private int hashFunc(int key) { method get (line 41) | public String get(int key) { method put (line 50) | public void put(int key, String val) { method remove (line 57) | public void remove(int key) { method pairSet (line 64) | public List pairSet() { method keySet (line 74) | public List keySet() { method valueSet (line 84) | public List valueSet() { method print (line 94) | public void print() { class array_hash_map (line 101) | public class array_hash_map { method main (line 102) | public static void main(String[] args) { FILE: codes/java/chapter_hashing/built_in_hash.java class built_in_hash (line 12) | public class built_in_hash { method main (line 13) | public static void main(String[] args) { FILE: codes/java/chapter_hashing/hash_map.java class hash_map (line 12) | public class hash_map { method main (line 13) | public static void main(String[] args) { FILE: codes/java/chapter_hashing/hash_map_chaining.java class HashMapChaining (line 13) | class HashMapChaining { method HashMapChaining (line 21) | public HashMapChaining() { method hashFunc (line 33) | int hashFunc(int key) { method loadFactor (line 38) | double loadFactor() { method get (line 43) | String get(int key) { method put (line 57) | void put(int key, String val) { method remove (line 78) | void remove(int key) { method extend (line 92) | void extend() { method print (line 111) | void print() { class hash_map_chaining (line 122) | public class hash_map_chaining { method main (line 123) | public static void main(String[] args) { FILE: codes/java/chapter_hashing/hash_map_open_addressing.java class HashMapOpenAddressing (line 10) | class HashMapOpenAddressing { method HashMapOpenAddressing (line 19) | public HashMapOpenAddressing() { method hashFunc (line 25) | private int hashFunc(int key) { method loadFactor (line 30) | private double loadFactor() { method findBucket (line 35) | private int findBucket(int key) { method get (line 62) | public String get(int key) { method put (line 74) | public void put(int key, String val) { method remove (line 92) | public void remove(int key) { method extend (line 103) | private void extend() { method print (line 119) | public void print() { class hash_map_open_addressing (line 132) | public class hash_map_open_addressing { method main (line 133) | public static void main(String[] args) { FILE: codes/java/chapter_hashing/simple_hash.java class simple_hash (line 9) | public class simple_hash { method addHash (line 11) | static int addHash(String key) { method mulHash (line 21) | static int mulHash(String key) { method xorHash (line 31) | static int xorHash(String key) { method rotHash (line 41) | static int rotHash(String key) { method main (line 50) | public static void main(String[] args) { FILE: codes/java/chapter_heap/heap.java class heap (line 12) | public class heap { method testPush (line 13) | public static void testPush(Queue heap, int val) { method testPop (line 19) | public static void testPop(Queue heap) { method main (line 25) | public static void main(String[] args) { FILE: codes/java/chapter_heap/my_heap.java class MaxHeap (line 13) | class MaxHeap { method MaxHeap (line 18) | public MaxHeap(List nums) { method left (line 28) | private int left(int i) { method right (line 33) | private int right(int i) { method parent (line 38) | private int parent(int i) { method swap (line 43) | private void swap(int i, int j) { method size (line 50) | public int size() { method isEmpty (line 55) | public boolean isEmpty() { method peek (line 60) | public int peek() { method push (line 65) | public void push(int val) { method siftUp (line 73) | private void siftUp(int i) { method pop (line 88) | public int pop() { method siftDown (line 103) | private void siftDown(int i) { method print (line 122) | public void print() { class my_heap (line 129) | public class my_heap { method main (line 130) | public static void main(String[] args) { FILE: codes/java/chapter_heap/top_k.java class top_k (line 12) | public class top_k { method topKHeap (line 14) | static Queue topKHeap(int[] nums, int k) { method main (line 32) | public static void main(String[] args) { FILE: codes/java/chapter_searching/binary_search.java class binary_search (line 9) | public class binary_search { method binarySearch (line 11) | static int binarySearch(int[] nums, int target) { method binarySearchLCRO (line 29) | static int binarySearchLCRO(int[] nums, int target) { method main (line 46) | public static void main(String[] args) { FILE: codes/java/chapter_searching/binary_search_edge.java class binary_search_edge (line 9) | public class binary_search_edge { method binarySearchLeftEdge (line 11) | static int binarySearchLeftEdge(int[] nums, int target) { method binarySearchRightEdge (line 23) | static int binarySearchRightEdge(int[] nums, int target) { method main (line 36) | public static void main(String[] args) { FILE: codes/java/chapter_searching/binary_search_insertion.java class binary_search_insertion (line 9) | class binary_search_insertion { method binarySearchInsertionSimple (line 11) | static int binarySearchInsertionSimple(int[] nums, int target) { method binarySearchInsertion (line 28) | static int binarySearchInsertion(int[] nums, int target) { method main (line 44) | public static void main(String[] args) { FILE: codes/java/chapter_searching/hashing_search.java class hashing_search (line 12) | public class hashing_search { method hashingSearchArray (line 14) | static int hashingSearchArray(Map map, int target) { method hashingSearchLinkedList (line 21) | static ListNode hashingSearchLinkedList(Map map, in... method main (line 27) | public static void main(String[] args) { FILE: codes/java/chapter_searching/linear_search.java class linear_search (line 11) | public class linear_search { method linearSearchArray (line 13) | static int linearSearchArray(int[] nums, int target) { method linearSearchLinkedList (line 25) | static ListNode linearSearchLinkedList(ListNode head, int target) { method main (line 37) | public static void main(String[] args) { FILE: codes/java/chapter_searching/two_sum.java class two_sum (line 11) | public class two_sum { method twoSumBruteForce (line 13) | static int[] twoSumBruteForce(int[] nums, int target) { method twoSumHashTable (line 26) | static int[] twoSumHashTable(int[] nums, int target) { method main (line 40) | public static void main(String[] args) { FILE: codes/java/chapter_sorting/bubble_sort.java class bubble_sort (line 11) | public class bubble_sort { method bubbleSort (line 13) | static void bubbleSort(int[] nums) { method bubbleSortWithFlag (line 29) | static void bubbleSortWithFlag(int[] nums) { method main (line 48) | public static void main(String[] args) { FILE: codes/java/chapter_sorting/bucket_sort.java class bucket_sort (line 11) | public class bucket_sort { method bucketSort (line 13) | static void bucketSort(float[] nums) { method main (line 41) | public static void main(String[] args) { FILE: codes/java/chapter_sorting/counting_sort.java class counting_sort (line 11) | public class counting_sort { method countingSortNaive (line 14) | static void countingSortNaive(int[] nums) { method countingSort (line 37) | static void countingSort(int[] nums) { method main (line 69) | public static void main(String[] args) { FILE: codes/java/chapter_sorting/heap_sort.java class heap_sort (line 11) | public class heap_sort { method siftDown (line 13) | public static void siftDown(int[] nums, int n, int i) { method heapSort (line 36) | public static void heapSort(int[] nums) { method main (line 52) | public static void main(String[] args) { FILE: codes/java/chapter_sorting/insertion_sort.java class insertion_sort (line 11) | public class insertion_sort { method insertionSort (line 13) | static void insertionSort(int[] nums) { method main (line 26) | public static void main(String[] args) { FILE: codes/java/chapter_sorting/merge_sort.java class merge_sort (line 11) | public class merge_sort { method merge (line 13) | static void merge(int[] nums, int left, int mid, int right) { method mergeSort (line 40) | static void mergeSort(int[] nums, int left, int right) { method main (line 52) | public static void main(String[] args) { FILE: codes/java/chapter_sorting/quick_sort.java class QuickSort (line 12) | class QuickSort { method swap (line 14) | static void swap(int[] nums, int i, int j) { method partition (line 21) | static int partition(int[] nums, int left, int right) { method quickSort (line 36) | public static void quickSort(int[] nums, int left, int right) { class QuickSortMedian (line 49) | class QuickSortMedian { method swap (line 51) | static void swap(int[] nums, int i, int j) { method medianThree (line 58) | static int medianThree(int[] nums, int left, int mid, int right) { method partition (line 68) | static int partition(int[] nums, int left, int right) { method quickSort (line 87) | public static void quickSort(int[] nums, int left, int right) { class QuickSortTailCall (line 100) | class QuickSortTailCall { method swap (line 102) | static void swap(int[] nums, int i, int j) { method partition (line 109) | static int partition(int[] nums, int left, int right) { method quickSort (line 124) | public static void quickSort(int[] nums, int left, int right) { class quick_sort (line 141) | public class quick_sort { method main (line 142) | public static void main(String[] args) { FILE: codes/java/chapter_sorting/radix_sort.java class radix_sort (line 11) | public class radix_sort { method digit (line 13) | static int digit(int num, int exp) { method countingSortDigit (line 19) | static void countingSortDigit(int[] nums, int exp) { method radixSort (line 46) | static void radixSort(int[] nums) { method main (line 62) | public static void main(String[] args) { FILE: codes/java/chapter_sorting/selection_sort.java class selection_sort (line 11) | public class selection_sort { method selectionSort (line 13) | public static void selectionSort(int[] nums) { method main (line 30) | public static void main(String[] args) { FILE: codes/java/chapter_stack_and_queue/array_deque.java class ArrayDeque (line 12) | class ArrayDeque { method ArrayDeque (line 18) | public ArrayDeque(int capacity) { method capacity (line 24) | public int capacity() { method size (line 29) | public int size() { method isEmpty (line 34) | public boolean isEmpty() { method index (line 39) | private int index(int i) { method pushFirst (line 47) | public void pushFirst(int num) { method pushLast (line 61) | public void pushLast(int num) { method popFirst (line 74) | public int popFirst() { method popLast (line 83) | public int popLast() { method peekFirst (line 90) | public int peekFirst() { method peekLast (line 97) | public int peekLast() { method toArray (line 106) | public int[] toArray() { class array_deque (line 116) | public class array_deque { method main (line 117) | public static void main(String[] args) { FILE: codes/java/chapter_stack_and_queue/array_queue.java class ArrayQueue (line 12) | class ArrayQueue { method ArrayQueue (line 17) | public ArrayQueue(int capacity) { method capacity (line 23) | public int capacity() { method size (line 28) | public int size() { method isEmpty (line 33) | public boolean isEmpty() { method push (line 38) | public void push(int num) { method pop (line 52) | public int pop() { method peek (line 61) | public int peek() { method toArray (line 68) | public int[] toArray() { class array_queue (line 78) | public class array_queue { method main (line 79) | public static void main(String[] args) { FILE: codes/java/chapter_stack_and_queue/array_stack.java class ArrayStack (line 12) | class ArrayStack { method ArrayStack (line 15) | public ArrayStack() { method size (line 21) | public int size() { method isEmpty (line 26) | public boolean isEmpty() { method push (line 31) | public void push(int num) { method pop (line 36) | public int pop() { method peek (line 43) | public int peek() { method toArray (line 50) | public Object[] toArray() { class array_stack (line 55) | public class array_stack { method main (line 56) | public static void main(String[] args) { FILE: codes/java/chapter_stack_and_queue/deque.java class deque (line 11) | public class deque { method main (line 12) | public static void main(String[] args) { FILE: codes/java/chapter_stack_and_queue/linkedlist_deque.java class ListNode (line 12) | class ListNode { method ListNode (line 17) | ListNode(int val) { class LinkedListDeque (line 24) | class LinkedListDeque { method LinkedListDeque (line 28) | public LinkedListDeque() { method size (line 33) | public int size() { method isEmpty (line 38) | public boolean isEmpty() { method push (line 43) | private void push(int num, boolean isFront) { method pushFirst (line 65) | public void pushFirst(int num) { method pushLast (line 70) | public void pushLast(int num) { method pop (line 75) | private int pop(boolean isFront) { method popFirst (line 105) | public int popFirst() { method popLast (line 110) | public int popLast() { method peekFirst (line 115) | public int peekFirst() { method peekLast (line 122) | public int peekLast() { method toArray (line 129) | public int[] toArray() { class linkedlist_deque (line 140) | public class linkedlist_deque { method main (line 141) | public static void main(String[] args) { FILE: codes/java/chapter_stack_and_queue/linkedlist_queue.java class LinkedListQueue (line 12) | class LinkedListQueue { method LinkedListQueue (line 16) | public LinkedListQueue() { method size (line 22) | public int size() { method isEmpty (line 27) | public boolean isEmpty() { method push (line 32) | public void push(int num) { method pop (line 48) | public int pop() { method peek (line 57) | public int peek() { method toArray (line 64) | public int[] toArray() { class linkedlist_queue (line 75) | public class linkedlist_queue { method main (line 76) | public static void main(String[] args) { FILE: codes/java/chapter_stack_and_queue/linkedlist_stack.java class LinkedListStack (line 13) | class LinkedListStack { method LinkedListStack (line 17) | public LinkedListStack() { method size (line 22) | public int size() { method isEmpty (line 27) | public boolean isEmpty() { method push (line 32) | public void push(int num) { method pop (line 40) | public int pop() { method peek (line 48) | public int peek() { method toArray (line 55) | public int[] toArray() { class linkedlist_stack (line 66) | public class linkedlist_stack { method main (line 67) | public static void main(String[] args) { FILE: codes/java/chapter_stack_and_queue/queue.java class queue (line 11) | public class queue { method main (line 12) | public static void main(String[] args) { FILE: codes/java/chapter_stack_and_queue/stack.java class stack (line 11) | public class stack { method main (line 12) | public static void main(String[] args) { FILE: codes/java/chapter_tree/array_binary_tree.java class ArrayBinaryTree (line 13) | class ArrayBinaryTree { method ArrayBinaryTree (line 17) | public ArrayBinaryTree(List arr) { method size (line 22) | public int size() { method val (line 27) | public Integer val(int i) { method left (line 35) | public Integer left(int i) { method right (line 40) | public Integer right(int i) { method parent (line 45) | public Integer parent(int i) { method levelOrder (line 50) | public List levelOrder() { method dfs (line 61) | private void dfs(Integer i, String order, List res) { method preOrder (line 79) | public List preOrder() { method inOrder (line 86) | public List inOrder() { method postOrder (line 93) | public List postOrder() { class array_binary_tree (line 100) | public class array_binary_tree { method main (line 101) | public static void main(String[] args) { FILE: codes/java/chapter_tree/avl_tree.java class AVLTree (line 12) | class AVLTree { method height (line 16) | public int height(TreeNode node) { method updateHeight (line 22) | private void updateHeight(TreeNode node) { method balanceFactor (line 28) | public int balanceFactor(TreeNode node) { method rightRotate (line 37) | private TreeNode rightRotate(TreeNode node) { method leftRotate (line 51) | private TreeNode leftRotate(TreeNode node) { method rotate (line 65) | private TreeNode rotate(TreeNode node) { method insert (line 95) | public void insert(int val) { method insertHelper (line 100) | private TreeNode insertHelper(TreeNode node, int val) { method remove (line 118) | public void remove(int val) { method removeHelper (line 123) | private TreeNode removeHelper(TreeNode node, int val) { method search (line 158) | public TreeNode search(int val) { class avl_tree (line 177) | public class avl_tree { method testInsert (line 178) | static void testInsert(AVLTree tree, int val) { method testRemove (line 184) | static void testRemove(AVLTree tree, int val) { method main (line 190) | public static void main(String[] args) { FILE: codes/java/chapter_tree/binary_search_tree.java class BinarySearchTree (line 12) | class BinarySearchTree { method BinarySearchTree (line 16) | public BinarySearchTree() { method getRoot (line 22) | public TreeNode getRoot() { method search (line 27) | public TreeNode search(int num) { method insert (line 46) | public void insert(int num) { method remove (line 75) | public void remove(int num) { class binary_search_tree (line 126) | public class binary_search_tree { method main (line 127) | public static void main(String[] args) { FILE: codes/java/chapter_tree/binary_tree.java class binary_tree (line 11) | public class binary_tree { method main (line 12) | public static void main(String[] args) { FILE: codes/java/chapter_tree/binary_tree_bfs.java class binary_tree_bfs (line 12) | public class binary_tree_bfs { method levelOrder (line 14) | static List levelOrder(TreeNode root) { method main (line 31) | public static void main(String[] args) { FILE: codes/java/chapter_tree/binary_tree_dfs.java class binary_tree_dfs (line 12) | public class binary_tree_dfs { method preOrder (line 17) | static void preOrder(TreeNode root) { method inOrder (line 27) | static void inOrder(TreeNode root) { method postOrder (line 37) | static void postOrder(TreeNode root) { method main (line 46) | public static void main(String[] args) { FILE: codes/java/utils/ListNode.java class ListNode (line 10) | public class ListNode { method ListNode (line 14) | public ListNode(int x) { method arrToLinkedList (line 19) | public static ListNode arrToLinkedList(int[] arr) { FILE: codes/java/utils/PrintUtil.java class Trunk (line 11) | class Trunk { method Trunk (line 15) | Trunk(Trunk prev, String str) { class PrintUtil (line 21) | public class PrintUtil { method printMatrix (line 23) | public static void printMatrix(T[][] matrix) { method printMatrix (line 32) | public static void printMatrix(List> matrix) { method printLinkedList (line 41) | public static void printLinkedList(ListNode head) { method printTree (line 51) | public static void printTree(TreeNode root) { method printTree (line 60) | public static void printTree(TreeNode root, Trunk prev, boolean isRigh... method showTrunks (line 91) | public static void showTrunks(Trunk p) { method printHashMap (line 101) | public static void printHashMap(Map map) { method printHeap (line 108) | public static void printHeap(Queue queue) { FILE: codes/java/utils/TreeNode.java class TreeNode (line 12) | public class TreeNode { method TreeNode (line 19) | public TreeNode(int x) { method listToTreeDFS (line 40) | private static TreeNode listToTreeDFS(List arr, int i) { method listToTree (line 51) | public static TreeNode listToTree(List arr) { method treeToListDFS (line 56) | private static void treeToListDFS(TreeNode root, int i, List ... method treeToList (line 68) | public static List treeToList(TreeNode root) { FILE: codes/java/utils/Vertex.java class Vertex (line 12) | public class Vertex { method Vertex (line 15) | public Vertex(int val) { method valsToVets (line 20) | public static Vertex[] valsToVets(int[] vals) { method vetsToVals (line 29) | public static List vetsToVals(List vets) { FILE: codes/javascript/chapter_array_and_linkedlist/array.js function randomAccess (line 8) | function randomAccess(nums) { function extend (line 19) | function extend(nums, enlarge) { function insert (line 31) | function insert(nums, num, index) { function remove (line 41) | function remove(nums, index) { function traverse (line 49) | function traverse(nums) { function find (line 62) | function find(nums, target) { FILE: codes/javascript/chapter_array_and_linkedlist/linked_list.js function insert (line 11) | function insert(n0, P) { function remove (line 18) | function remove(n0) { function access (line 27) | function access(head, index) { function find (line 38) | function find(head, target) { FILE: codes/javascript/chapter_array_and_linkedlist/my_list.js class MyList (line 8) | class MyList { method constructor (line 15) | constructor() { method size (line 20) | size() { method capacity (line 25) | capacity() { method get (line 30) | get(index) { method set (line 37) | set(index, num) { method add (line 43) | add(num) { method insert (line 54) | insert(index, num) { method remove (line 70) | remove(index) { method extendCapacity (line 84) | extendCapacity() { method toArray (line 94) | toArray() { FILE: codes/javascript/chapter_backtracking/n_queens.js function backtrack (line 8) | function backtrack(row, n, state, res, cols, diags1, diags2) { function nQueens (line 34) | function nQueens(n) { FILE: codes/javascript/chapter_backtracking/permutations_i.js function backtrack (line 8) | function backtrack(state, choices, selected, res) { function permutationsI (line 31) | function permutationsI(nums) { FILE: codes/javascript/chapter_backtracking/permutations_ii.js function backtrack (line 8) | function backtrack(state, choices, selected, res) { function permutationsII (line 33) | function permutationsII(nums) { FILE: codes/javascript/chapter_backtracking/preorder_traversal_i_compact.js function preOrder (line 11) | function preOrder(root, res) { FILE: codes/javascript/chapter_backtracking/preorder_traversal_ii_compact.js function preOrder (line 11) | function preOrder(root, path, res) { FILE: codes/javascript/chapter_backtracking/preorder_traversal_iii_compact.js function preOrder (line 11) | function preOrder(root, path, res) { FILE: codes/javascript/chapter_backtracking/preorder_traversal_iii_template.js function isSolution (line 11) | function isSolution(state) { function recordSolution (line 16) | function recordSolution(state, res) { function isValid (line 21) | function isValid(state, choice) { function makeChoice (line 26) | function makeChoice(state, choice) { function undoChoice (line 31) | function undoChoice(state) { function backtrack (line 36) | function backtrack(state, choices, res) { FILE: codes/javascript/chapter_backtracking/subset_sum_i.js function backtrack (line 8) | function backtrack(state, target, choices, start, res) { function subsetSumI (line 32) | function subsetSumI(nums, target) { FILE: codes/javascript/chapter_backtracking/subset_sum_i_naive.js function backtrack (line 8) | function backtrack(state, target, total, choices, res) { function subsetSumINaive (line 30) | function subsetSumINaive(nums, target) { FILE: codes/javascript/chapter_backtracking/subset_sum_ii.js function backtrack (line 8) | function backtrack(state, target, choices, start, res) { function subsetSumII (line 37) | function subsetSumII(nums, target) { FILE: codes/javascript/chapter_computational_complexity/iteration.js function forLoop (line 8) | function forLoop(n) { function whileLoop (line 18) | function whileLoop(n) { function whileLoopII (line 30) | function whileLoopII(n) { function nestedForLoop (line 44) | function nestedForLoop(n) { FILE: codes/javascript/chapter_computational_complexity/recursion.js function recur (line 8) | function recur(n) { function forLoopRecur (line 18) | function forLoopRecur(n) { function tailRecur (line 37) | function tailRecur(n, res) { function fib (line 45) | function fib(n) { FILE: codes/javascript/chapter_computational_complexity/space_complexity.js function constFunc (line 12) | function constFunc() { function constant (line 18) | function constant(n) { function linear (line 35) | function linear(n) { function linearRecur (line 51) | function linearRecur(n) { function quadratic (line 58) | function quadratic(n) { function quadraticRecur (line 75) | function quadraticRecur(n) { function buildTree (line 83) | function buildTree(n) { FILE: codes/javascript/chapter_computational_complexity/time_complexity.js function constant (line 8) | function constant(n) { function linear (line 16) | function linear(n) { function arrayTraversal (line 23) | function arrayTraversal(nums) { function quadratic (line 33) | function quadratic(n) { function bubbleSort (line 45) | function bubbleSort(nums) { function exponential (line 64) | function exponential(n) { function expRecur (line 79) | function expRecur(n) { function logarithmic (line 85) | function logarithmic(n) { function logRecur (line 95) | function logRecur(n) { function linearLogRecur (line 101) | function linearLogRecur(n) { function factorialRecur (line 111) | function factorialRecur(n) { FILE: codes/javascript/chapter_computational_complexity/worst_best_time_complexity.js function randomNumbers (line 8) | function randomNumbers(n) { function findOne (line 25) | function findOne(nums) { FILE: codes/javascript/chapter_divide_and_conquer/binary_search_recur.js function dfs (line 8) | function dfs(nums, target, i, j) { function binarySearch (line 28) | function binarySearch(nums, target) { FILE: codes/javascript/chapter_divide_and_conquer/build_tree.js function dfs (line 11) | function dfs(preorder, inorderMap, i, l, r) { function buildTree (line 27) | function buildTree(preorder, inorder) { FILE: codes/javascript/chapter_divide_and_conquer/hanota.js function move (line 8) | function move(src, tar) { function dfs (line 16) | function dfs(i, src, buf, tar) { function solveHanota (line 31) | function solveHanota(A, B, C) { FILE: codes/javascript/chapter_dynamic_programming/climbing_stairs_backtrack.js function backtrack (line 8) | function backtrack(choices, state, n, res) { function climbingStairsBacktrack (line 22) | function climbingStairsBacktrack(n) { FILE: codes/javascript/chapter_dynamic_programming/climbing_stairs_constraint_dp.js function climbingStairsConstraintDP (line 8) | function climbingStairsConstraintDP(n) { FILE: codes/javascript/chapter_dynamic_programming/climbing_stairs_dfs.js function dfs (line 8) | function dfs(i) { function climbingStairsDFS (line 17) | function climbingStairsDFS(n) { FILE: codes/javascript/chapter_dynamic_programming/climbing_stairs_dfs_mem.js function dfs (line 8) | function dfs(i, mem) { function climbingStairsDFSMem (line 21) | function climbingStairsDFSMem(n) { FILE: codes/javascript/chapter_dynamic_programming/climbing_stairs_dp.js function climbingStairsDP (line 8) | function climbingStairsDP(n) { function climbingStairsDPComp (line 23) | function climbingStairsDPComp(n) { FILE: codes/javascript/chapter_dynamic_programming/coin_change.js function coinChangeDP (line 8) | function coinChangeDP(coins, amt) { function coinChangeDPComp (line 35) | function coinChangeDPComp(coins, amt) { FILE: codes/javascript/chapter_dynamic_programming/coin_change_ii.js function coinChangeIIDP (line 8) | function coinChangeIIDP(coins, amt) { function coinChangeIIDPComp (line 34) | function coinChangeIIDPComp(coins, amt) { FILE: codes/javascript/chapter_dynamic_programming/edit_distance.js function editDistanceDFS (line 8) | function editDistanceDFS(s, t, i, j) { function editDistanceDFSMem (line 31) | function editDistanceDFSMem(s, t, mem, i, j) { function editDistanceDP (line 58) | function editDistanceDP(s, t) { function editDistanceDPComp (line 86) | function editDistanceDPComp(s, t) { FILE: codes/javascript/chapter_dynamic_programming/knapsack.js function knapsackDFS (line 8) | function knapsackDFS(wgt, val, i, c) { function knapsackDFSMem (line 25) | function knapsackDFSMem(wgt, val, mem, i, c) { function knapsackDP (line 48) | function knapsackDP(wgt, val, cap) { function knapsackDPComp (line 73) | function knapsackDPComp(wgt, val, cap) { FILE: codes/javascript/chapter_dynamic_programming/min_cost_climbing_stairs_dp.js function minCostClimbingStairsDP (line 8) | function minCostClimbingStairsDP(cost) { function minCostClimbingStairsDPComp (line 26) | function minCostClimbingStairsDPComp(cost) { FILE: codes/javascript/chapter_dynamic_programming/min_path_sum.js function minPathSumDFS (line 8) | function minPathSumDFS(grid, i, j) { function minPathSumDFSMem (line 25) | function minPathSumDFSMem(grid, mem, i, j) { function minPathSumDP (line 47) | function minPathSumDP(grid) { function minPathSumDPComp (line 73) | function minPathSumDPComp(grid) { FILE: codes/javascript/chapter_dynamic_programming/unbounded_knapsack.js function unboundedKnapsackDP (line 8) | function unboundedKnapsackDP(wgt, val, cap) { function unboundedKnapsackDPComp (line 33) | function unboundedKnapsackDPComp(wgt, val, cap) { FILE: codes/javascript/chapter_graph/graph_adjacency_list.js class GraphAdjList (line 10) | class GraphAdjList { method constructor (line 15) | constructor(edges) { method size (line 26) | size() { method addEdge (line 31) | addEdge(vet1, vet2) { method removeEdge (line 45) | removeEdge(vet1, vet2) { method addVertex (line 60) | addVertex(vet) { method removeVertex (line 67) | removeVertex(vet) { method print (line 83) | print() { FILE: codes/javascript/chapter_graph/graph_adjacency_matrix.js class GraphAdjMat (line 8) | class GraphAdjMat { method constructor (line 13) | constructor(vertices, edges) { method size (line 28) | size() { method addVertex (line 33) | addVertex(val) { method removeVertex (line 50) | removeVertex(index) { method addEdge (line 67) | addEdge(i, j) { method removeEdge (line 79) | removeEdge(i, j) { method print (line 89) | print() { FILE: codes/javascript/chapter_graph/graph_bfs.js function graphBFS (line 12) | function graphBFS(graph, startVet) { FILE: codes/javascript/chapter_graph/graph_dfs.js function dfs (line 12) | function dfs(graph, visited, res, vet) { function graphDFS (line 27) | function graphDFS(graph, startVet) { FILE: codes/javascript/chapter_greedy/coin_change_greedy.js function coinChangeGreedy (line 8) | function coinChangeGreedy(coins, amt) { FILE: codes/javascript/chapter_greedy/fractional_knapsack.js class Item (line 8) | class Item { method constructor (line 9) | constructor(w, v) { function fractionalKnapsack (line 16) | function fractionalKnapsack(wgt, val, cap) { FILE: codes/javascript/chapter_greedy/max_capacity.js function maxCapacity (line 8) | function maxCapacity(ht) { FILE: codes/javascript/chapter_greedy/max_product_cutting.js function maxProductCutting (line 8) | function maxProductCutting(n) { FILE: codes/javascript/chapter_hashing/array_hash_map.js class Pair (line 8) | class Pair { method constructor (line 9) | constructor(key, val) { class ArrayHashMap (line 16) | class ArrayHashMap { method constructor (line 18) | constructor() { method #hashFunc (line 24) | #hashFunc(key) { method get (line 29) | get(key) { method set (line 37) | set(key, val) { method delete (line 43) | delete(key) { method entries (line 50) | entries() { method keys (line 61) | keys() { method values (line 72) | values() { method print (line 83) | print() { FILE: codes/javascript/chapter_hashing/hash_map_chaining.js class Pair (line 8) | class Pair { method constructor (line 9) | constructor(key, val) { class HashMapChaining (line 16) | class HashMapChaining { method constructor (line 24) | constructor() { method #hashFunc (line 33) | #hashFunc(key) { method #loadFactor (line 38) | #loadFactor() { method get (line 43) | get(key) { method put (line 57) | put(key, val) { method remove (line 78) | remove(key) { method #extend (line 92) | #extend() { method print (line 108) | print() { FILE: codes/javascript/chapter_hashing/hash_map_open_addressing.js class Pair (line 8) | class Pair { method constructor (line 9) | constructor(key, val) { class HashMapOpenAddressing (line 16) | class HashMapOpenAddressing { method constructor (line 25) | constructor() { method #hashFunc (line 35) | #hashFunc(key) { method #loadFactor (line 40) | #loadFactor() { method #findBucket (line 45) | #findBucket(key) { method get (line 75) | get(key) { method put (line 90) | put(key, val) { method remove (line 111) | remove(key) { method #extend (line 125) | #extend() { method print (line 141) | print() { FILE: codes/javascript/chapter_hashing/simple_hash.js function addHash (line 8) | function addHash(key) { function mulHash (line 18) | function mulHash(key) { function xorHash (line 28) | function xorHash(key) { function rotHash (line 38) | function rotHash(key) { FILE: codes/javascript/chapter_heap/my_heap.js class MaxHeap (line 10) | class MaxHeap { method constructor (line 14) | constructor(nums) { method #left (line 24) | #left(i) { method #right (line 29) | #right(i) { method #parent (line 34) | #parent(i) { method #swap (line 39) | #swap(i, j) { method size (line 46) | size() { method isEmpty (line 51) | isEmpty() { method peek (line 56) | peek() { method push (line 61) | push(val) { method #siftUp (line 69) | #siftUp(i) { method pop (line 83) | pop() { method #siftDown (line 97) | #siftDown(i) { method print (line 115) | print() { method getMaxHeap (line 120) | getMaxHeap() { FILE: codes/javascript/chapter_heap/top_k.js function pushMinHeap (line 10) | function pushMinHeap(maxHeap, val) { function popMinHeap (line 16) | function popMinHeap(maxHeap) { function peekMinHeap (line 22) | function peekMinHeap(maxHeap) { function getMinHeap (line 28) | function getMinHeap(maxHeap) { function topKHeap (line 34) | function topKHeap(nums, k) { FILE: codes/javascript/chapter_searching/binary_search.js function binarySearch (line 8) | function binarySearch(nums, target) { function binarySearchLCRO (line 29) | function binarySearchLCRO(nums, target) { FILE: codes/javascript/chapter_searching/binary_search_edge.js function binarySearchLeftEdge (line 10) | function binarySearchLeftEdge(nums, target) { function binarySearchRightEdge (line 22) | function binarySearchRightEdge(nums, target) { FILE: codes/javascript/chapter_searching/binary_search_insertion.js function binarySearchInsertionSimple (line 8) | function binarySearchInsertionSimple(nums, target) { function binarySearchInsertion (line 26) | function binarySearchInsertion(nums, target) { FILE: codes/javascript/chapter_searching/hashing_search.js function hashingSearchArray (line 10) | function hashingSearchArray(map, target) { function hashingSearchLinkedList (line 17) | function hashingSearchLinkedList(map, target) { FILE: codes/javascript/chapter_searching/linear_search.js function linearSearchArray (line 10) | function linearSearchArray(nums, target) { function linearSearchLinkedList (line 23) | function linearSearchLinkedList(head, target) { FILE: codes/javascript/chapter_searching/two_sum.js function twoSumBruteForce (line 8) | function twoSumBruteForce(nums, target) { function twoSumHashTable (line 22) | function twoSumHashTable(nums, target) { FILE: codes/javascript/chapter_sorting/bubble_sort.js function bubbleSort (line 8) | function bubbleSort(nums) { function bubbleSortWithFlag (line 24) | function bubbleSortWithFlag(nums) { FILE: codes/javascript/chapter_sorting/bucket_sort.js function bucketSort (line 8) | function bucketSort(nums) { FILE: codes/javascript/chapter_sorting/counting_sort.js function countingSortNaive (line 9) | function countingSortNaive(nums) { function countingSort (line 29) | function countingSort(nums) { FILE: codes/javascript/chapter_sorting/heap_sort.js function siftDown (line 8) | function siftDown(nums, n, i) { function heapSort (line 32) | function heapSort(nums) { FILE: codes/javascript/chapter_sorting/insertion_sort.js function insertionSort (line 8) | function insertionSort(nums) { FILE: codes/javascript/chapter_sorting/merge_sort.js function merge (line 8) | function merge(nums, left, mid, right) { function mergeSort (line 38) | function mergeSort(nums, left, right) { FILE: codes/javascript/chapter_sorting/quick_sort.js class QuickSort (line 8) | class QuickSort { method swap (line 10) | swap(nums, i, j) { method partition (line 17) | partition(nums, left, right) { method quickSort (line 36) | quickSort(nums, left, right) { class QuickSortMedian (line 48) | class QuickSortMedian { method swap (line 50) | swap(nums, i, j) { method medianThree (line 57) | medianThree(nums, left, mid, right) { method partition (line 69) | partition(nums, left, right) { method quickSort (line 92) | quickSort(nums, left, right) { class QuickSortTailCall (line 104) | class QuickSortTailCall { method swap (line 106) | swap(nums, i, j) { method partition (line 113) | partition(nums, left, right) { method quickSort (line 127) | quickSort(nums, left, right) { FILE: codes/javascript/chapter_sorting/radix_sort.js function digit (line 8) | function digit(num, exp) { function countingSortDigit (line 14) | function countingSortDigit(nums, exp) { function radixSort (line 42) | function radixSort(nums) { FILE: codes/javascript/chapter_sorting/selection_sort.js function selectionSort (line 8) | function selectionSort(nums) { FILE: codes/javascript/chapter_stack_and_queue/array_deque.js class ArrayDeque (line 8) | class ArrayDeque { method constructor (line 14) | constructor(capacity) { method capacity (line 21) | capacity() { method size (line 26) | size() { method isEmpty (line 31) | isEmpty() { method index (line 36) | index(i) { method pushFirst (line 44) | pushFirst(num) { method pushLast (line 58) | pushLast(num) { method popFirst (line 71) | popFirst() { method popLast (line 80) | popLast() { method peekFirst (line 87) | peekFirst() { method peekLast (line 93) | peekLast() { method toArray (line 101) | toArray() { FILE: codes/javascript/chapter_stack_and_queue/array_queue.js class ArrayQueue (line 8) | class ArrayQueue { method constructor (line 13) | constructor(capacity) { method capacity (line 18) | get capacity() { method size (line 23) | get size() { method isEmpty (line 28) | isEmpty() { method push (line 33) | push(num) { method pop (line 47) | pop() { method peek (line 56) | peek() { method toArray (line 62) | toArray() { FILE: codes/javascript/chapter_stack_and_queue/array_stack.js class ArrayStack (line 8) | class ArrayStack { method constructor (line 10) | constructor() { method size (line 15) | get size() { method isEmpty (line 20) | isEmpty() { method push (line 25) | push(num) { method pop (line 30) | pop() { method top (line 36) | top() { method toArray (line 42) | toArray() { FILE: codes/javascript/chapter_stack_and_queue/linkedlist_deque.js class ListNode (line 8) | class ListNode { method constructor (line 13) | constructor(val) { class LinkedListDeque (line 21) | class LinkedListDeque { method constructor (line 26) | constructor() { method pushLast (line 33) | pushLast(val) { method pushFirst (line 49) | pushFirst(val) { method popLast (line 65) | popLast() { method popFirst (line 82) | popFirst() { method peekLast (line 99) | peekLast() { method peekFirst (line 104) | peekFirst() { method size (line 109) | size() { method isEmpty (line 114) | isEmpty() { method print (line 119) | print() { FILE: codes/javascript/chapter_stack_and_queue/linkedlist_queue.js class LinkedListQueue (line 10) | class LinkedListQueue { method constructor (line 15) | constructor() { method size (line 21) | get size() { method isEmpty (line 26) | isEmpty() { method push (line 31) | push(num) { method pop (line 47) | pop() { method peek (line 56) | peek() { method toArray (line 62) | toArray() { FILE: codes/javascript/chapter_stack_and_queue/linkedlist_stack.js class LinkedListStack (line 10) | class LinkedListStack { method constructor (line 14) | constructor() { method size (line 19) | get size() { method isEmpty (line 24) | isEmpty() { method push (line 29) | push(num) { method pop (line 37) | pop() { method peek (line 45) | peek() { method toArray (line 51) | toArray() { FILE: codes/javascript/chapter_tree/array_binary_tree.js class ArrayBinaryTree (line 11) | class ArrayBinaryTree { method constructor (line 15) | constructor(arr) { method size (line 20) | size() { method val (line 25) | val(i) { method left (line 32) | left(i) { method right (line 37) | right(i) { method parent (line 42) | parent(i) { method levelOrder (line 47) | levelOrder() { method #dfs (line 57) | #dfs(i, order, res) { method preOrder (line 71) | preOrder() { method inOrder (line 78) | inOrder() { method postOrder (line 85) | postOrder() { FILE: codes/javascript/chapter_tree/avl_tree.js class AVLTree (line 11) | class AVLTree { method constructor (line 13) | constructor() { method height (line 18) | height(node) { method #updateHeight (line 24) | #updateHeight(node) { method balanceFactor (line 31) | balanceFactor(node) { method #rightRotate (line 39) | #rightRotate(node) { method #leftRotate (line 53) | #leftRotate(node) { method #rotate (line 67) | #rotate(node) { method insert (line 97) | insert(val) { method #insertHelper (line 102) | #insertHelper(node, val) { method remove (line 117) | remove(val) { method #removeHelper (line 122) | #removeHelper(node, val) { method search (line 153) | search(val) { function testInsert (line 169) | function testInsert(tree, val) { function testRemove (line 175) | function testRemove(tree, val) { FILE: codes/javascript/chapter_tree/binary_search_tree.js class BinarySearchTree (line 11) | class BinarySearchTree { method constructor (line 13) | constructor() { method getRoot (line 19) | getRoot() { method search (line 24) | search(num) { method insert (line 40) | insert(num) { method remove (line 65) | remove(num) { FILE: codes/javascript/chapter_tree/binary_tree_bfs.js function levelOrder (line 11) | function levelOrder(root) { FILE: codes/javascript/chapter_tree/binary_tree_dfs.js function preOrder (line 14) | function preOrder(root) { function inOrder (line 23) | function inOrder(root) { function postOrder (line 32) | function postOrder(root) { FILE: codes/javascript/modules/ListNode.js class ListNode (line 8) | class ListNode { method constructor (line 11) | constructor(val, next) { function arrToLinkedList (line 18) | function arrToLinkedList(arr) { FILE: codes/javascript/modules/PrintUtil.js function printLinkedList (line 10) | function printLinkedList(head) { function Trunk (line 19) | function Trunk(prev, str) { function printTree (line 29) | function printTree(root) { function printTree (line 34) | function printTree(root, prev, isRight) { function showTrunks (line 65) | function showTrunks(p) { function printHeap (line 75) | function printHeap(arr) { FILE: codes/javascript/modules/TreeNode.js class TreeNode (line 8) | class TreeNode { method constructor (line 13) | constructor(val, left, right, height) { function arrToTree (line 22) | function arrToTree(arr, i = 0) { FILE: codes/javascript/modules/Vertex.js class Vertex (line 8) | class Vertex { method constructor (line 10) | constructor(val) { method valsToVets (line 15) | static valsToVets(vals) { method vetsToVals (line 24) | static vetsToVals(vets) { FILE: codes/python/chapter_array_and_linkedlist/array.py function random_access (line 10) | def random_access(nums: list[int]) -> int: function extend (line 21) | def extend(nums: list[int], enlarge: int) -> list[int]: function insert (line 32) | def insert(nums: list[int], num: int, index: int): function remove (line 41) | def remove(nums: list[int], index: int): function traverse (line 48) | def traverse(nums: list[int]): function find (line 63) | def find(nums: list[int], target: int) -> int: FILE: codes/python/chapter_array_and_linkedlist/linked_list.py function insert (line 14) | def insert(n0: ListNode, P: ListNode): function remove (line 21) | def remove(n0: ListNode): function access (line 31) | def access(head: ListNode, index: int) -> ListNode | None: function find (line 40) | def find(head: ListNode, target: int) -> int: FILE: codes/python/chapter_array_and_linkedlist/my_list.py class MyList (line 8) | class MyList: method __init__ (line 11) | def __init__(self): method size (line 18) | def size(self) -> int: method capacity (line 22) | def capacity(self) -> int: method get (line 26) | def get(self, index: int) -> int: method set (line 33) | def set(self, num: int, index: int): method add (line 39) | def add(self, num: int): method insert (line 47) | def insert(self, num: int, index: int): method remove (line 61) | def remove(self, index: int) -> int: method extend_capacity (line 74) | def extend_capacity(self): method to_array (line 81) | def to_array(self) -> list[int]: FILE: codes/python/chapter_backtracking/n_queens.py function backtrack (line 8) | def backtrack( function n_queens (line 39) | def n_queens(n: int) -> list[list[list[str]]]: FILE: codes/python/chapter_backtracking/permutations_i.py function backtrack (line 8) | def backtrack( function permutations_i (line 30) | def permutations_i(nums: list[int]) -> list[list[int]]: FILE: codes/python/chapter_backtracking/permutations_ii.py function backtrack (line 8) | def backtrack( function permutations_ii (line 32) | def permutations_ii(nums: list[int]) -> list[list[int]]: FILE: codes/python/chapter_backtracking/preorder_traversal_i_compact.py function pre_order (line 14) | def pre_order(root: TreeNode): FILE: codes/python/chapter_backtracking/preorder_traversal_ii_compact.py function pre_order (line 14) | def pre_order(root: TreeNode): FILE: codes/python/chapter_backtracking/preorder_traversal_iii_compact.py function pre_order (line 14) | def pre_order(root: TreeNode): FILE: codes/python/chapter_backtracking/preorder_traversal_iii_template.py function is_solution (line 14) | def is_solution(state: list[TreeNode]) -> bool: function record_solution (line 19) | def record_solution(state: list[TreeNode], res: list[list[TreeNode]]): function is_valid (line 24) | def is_valid(state: list[TreeNode], choice: TreeNode) -> bool: function make_choice (line 29) | def make_choice(state: list[TreeNode], choice: TreeNode): function undo_choice (line 34) | def undo_choice(state: list[TreeNode], choice: TreeNode): function backtrack (line 39) | def backtrack( FILE: codes/python/chapter_backtracking/subset_sum_i.py function backtrack (line 8) | def backtrack( function subset_sum_i (line 31) | def subset_sum_i(nums: list[int], target: int) -> list[list[int]]: FILE: codes/python/chapter_backtracking/subset_sum_i_naive.py function backtrack (line 8) | def backtrack( function subset_sum_i_naive (line 33) | def subset_sum_i_naive(nums: list[int], target: int) -> list[list[int]]: FILE: codes/python/chapter_backtracking/subset_sum_ii.py function backtrack (line 8) | def backtrack( function subset_sum_ii (line 35) | def subset_sum_ii(nums: list[int], target: int) -> list[list[int]]: FILE: codes/python/chapter_computational_complexity/iteration.py function for_loop (line 8) | def for_loop(n: int) -> int: function while_loop (line 17) | def while_loop(n: int) -> int: function while_loop_ii (line 28) | def while_loop_ii(n: int) -> int: function nested_for_loop (line 41) | def nested_for_loop(n: int) -> str: FILE: codes/python/chapter_computational_complexity/recursion.py function recur (line 8) | def recur(n: int) -> int: function for_loop_recur (line 19) | def for_loop_recur(n: int) -> int: function tail_recur (line 36) | def tail_recur(n, res): function fib (line 45) | def fib(n: int) -> int: FILE: codes/python/chapter_computational_complexity/space_complexity.py function function (line 14) | def function() -> int: function constant (line 20) | def constant(n: int): function linear (line 34) | def linear(n: int): function linear_recur (line 44) | def linear_recur(n: int): function quadratic (line 52) | def quadratic(n: int): function quadratic_recur (line 58) | def quadratic_recur(n: int) -> int: function build_tree (line 67) | def build_tree(n: int) -> TreeNode | None: FILE: codes/python/chapter_computational_complexity/time_complexity.py function constant (line 8) | def constant(n: int) -> int: function linear (line 17) | def linear(n: int) -> int: function array_traversal (line 25) | def array_traversal(nums: list[int]) -> int: function quadratic (line 34) | def quadratic(n: int) -> int: function bubble_sort (line 44) | def bubble_sort(nums: list[int]) -> int: function exponential (line 60) | def exponential(n: int) -> int: function exp_recur (line 73) | def exp_recur(n: int) -> int: function logarithmic (line 80) | def logarithmic(n: int) -> int: function log_recur (line 89) | def log_recur(n: int) -> int: function linear_log_recur (line 96) | def linear_log_recur(n: int) -> int: function factorial_recur (line 108) | def factorial_recur(n: int) -> int: FILE: codes/python/chapter_computational_complexity/worst_best_time_complexity.py function random_numbers (line 10) | def random_numbers(n: int) -> list[int]: function find_one (line 19) | def find_one(nums: list[int]) -> int: FILE: codes/python/chapter_divide_and_conquer/binary_search_recur.py function dfs (line 8) | def dfs(nums: list[int], target: int, i: int, j: int) -> int: function binary_search (line 26) | def binary_search(nums: list[int], target: int) -> int: FILE: codes/python/chapter_divide_and_conquer/build_tree.py function dfs (line 14) | def dfs( function build_tree (line 37) | def build_tree(preorder: list[int], inorder: list[int]) -> TreeNode | None: FILE: codes/python/chapter_divide_and_conquer/hanota.py function move (line 8) | def move(src: list[int], tar: list[int]): function dfs (line 16) | def dfs(i: int, src: list[int], buf: list[int], tar: list[int]): function solve_hanota (line 30) | def solve_hanota(A: list[int], B: list[int], C: list[int]): FILE: codes/python/chapter_dynamic_programming/climbing_stairs_backtrack.py function backtrack (line 8) | def backtrack(choices: list[int], state: int, n: int, res: list[int]) ->... function climbing_stairs_backtrack (line 23) | def climbing_stairs_backtrack(n: int) -> int: FILE: codes/python/chapter_dynamic_programming/climbing_stairs_constraint_dp.py function climbing_stairs_constraint_dp (line 8) | def climbing_stairs_constraint_dp(n: int) -> int: FILE: codes/python/chapter_dynamic_programming/climbing_stairs_dfs.py function dfs (line 8) | def dfs(i: int) -> int: function climbing_stairs_dfs (line 18) | def climbing_stairs_dfs(n: int) -> int: FILE: codes/python/chapter_dynamic_programming/climbing_stairs_dfs_mem.py function dfs (line 8) | def dfs(i: int, mem: list[int]) -> int: function climbing_stairs_dfs_mem (line 23) | def climbing_stairs_dfs_mem(n: int) -> int: FILE: codes/python/chapter_dynamic_programming/climbing_stairs_dp.py function climbing_stairs_dp (line 8) | def climbing_stairs_dp(n: int) -> int: function climbing_stairs_dp_comp (line 22) | def climbing_stairs_dp_comp(n: int) -> int: FILE: codes/python/chapter_dynamic_programming/coin_change.py function coin_change_dp (line 8) | def coin_change_dp(coins: list[int], amt: int) -> int: function coin_change_dp_comp (line 29) | def coin_change_dp_comp(coins: list[int], amt: int) -> int: FILE: codes/python/chapter_dynamic_programming/coin_change_ii.py function coin_change_ii_dp (line 8) | def coin_change_ii_dp(coins: list[int], amt: int) -> int: function coin_change_ii_dp_comp (line 28) | def coin_change_ii_dp_comp(coins: list[int], amt: int) -> int: FILE: codes/python/chapter_dynamic_programming/edit_distance.py function edit_distance_dfs (line 8) | def edit_distance_dfs(s: str, t: str, i: int, j: int) -> int: function edit_distance_dfs_mem (line 30) | def edit_distance_dfs_mem(s: str, t: str, mem: list[list[int]], i: int, ... function edit_distance_dp (line 56) | def edit_distance_dp(s: str, t: str) -> int: function edit_distance_dp_comp (line 77) | def edit_distance_dp_comp(s: str, t: str) -> int: FILE: codes/python/chapter_dynamic_programming/knapsack.py function knapsack_dfs (line 8) | def knapsack_dfs(wgt: list[int], val: list[int], i: int, c: int) -> int: function knapsack_dfs_mem (line 23) | def knapsack_dfs_mem( function knapsack_dp (line 44) | def knapsack_dp(wgt: list[int], val: list[int], cap: int) -> int: function knapsack_dp_comp (line 61) | def knapsack_dp_comp(wgt: list[int], val: list[int], cap: int) -> int: FILE: codes/python/chapter_dynamic_programming/min_cost_climbing_stairs_dp.py function min_cost_climbing_stairs_dp (line 8) | def min_cost_climbing_stairs_dp(cost: list[int]) -> int: function min_cost_climbing_stairs_dp_comp (line 23) | def min_cost_climbing_stairs_dp_comp(cost: list[int]) -> int: FILE: codes/python/chapter_dynamic_programming/min_path_sum.py function min_path_sum_dfs (line 10) | def min_path_sum_dfs(grid: list[list[int]], i: int, j: int) -> int: function min_path_sum_dfs_mem (line 25) | def min_path_sum_dfs_mem( function min_path_sum_dp (line 46) | def min_path_sum_dp(grid: list[list[int]]) -> int: function min_path_sum_dp_comp (line 65) | def min_path_sum_dp_comp(grid: list[list[int]]) -> int: FILE: codes/python/chapter_dynamic_programming/unbounded_knapsack.py function unbounded_knapsack_dp (line 8) | def unbounded_knapsack_dp(wgt: list[int], val: list[int], cap: int) -> int: function unbounded_knapsack_dp_comp (line 25) | def unbounded_knapsack_dp_comp(wgt: list[int], val: list[int], cap: int)... FILE: codes/python/chapter_graph/graph_adjacency_list.py class GraphAdjList (line 14) | class GraphAdjList: method __init__ (line 17) | def __init__(self, edges: list[list[Vertex]]): method size (line 27) | def size(self) -> int: method add_edge (line 31) | def add_edge(self, vet1: Vertex, vet2: Vertex): method remove_edge (line 39) | def remove_edge(self, vet1: Vertex, vet2: Vertex): method add_vertex (line 47) | def add_vertex(self, vet: Vertex): method remove_vertex (line 54) | def remove_vertex(self, vet: Vertex): method print (line 65) | def print(self): FILE: codes/python/chapter_graph/graph_adjacency_matrix.py class GraphAdjMat (line 14) | class GraphAdjMat: method __init__ (line 17) | def __init__(self, vertices: list[int], edges: list[list[int]]): method size (line 31) | def size(self) -> int: method add_vertex (line 35) | def add_vertex(self, val: int): method remove_vertex (line 47) | def remove_vertex(self, index: int): method add_edge (line 59) | def add_edge(self, i: int, j: int): method remove_edge (line 69) | def remove_edge(self, i: int, j: int): method print (line 78) | def print(self): FILE: codes/python/chapter_graph/graph_bfs.py function graph_bfs (line 16) | def graph_bfs(graph: GraphAdjList, start_vet: Vertex) -> list[Vertex]: FILE: codes/python/chapter_graph/graph_dfs.py function dfs (line 15) | def dfs(graph: GraphAdjList, visited: set[Vertex], res: list[Vertex], ve... function graph_dfs (line 27) | def graph_dfs(graph: GraphAdjList, start_vet: Vertex) -> list[Vertex]: FILE: codes/python/chapter_greedy/coin_change_greedy.py function coin_change_greedy (line 8) | def coin_change_greedy(coins: list[int], amt: int) -> int: FILE: codes/python/chapter_greedy/fractional_knapsack.py class Item (line 8) | class Item: method __init__ (line 11) | def __init__(self, w: int, v: int): function fractional_knapsack (line 16) | def fractional_knapsack(wgt: list[int], val: list[int], cap: int) -> int: FILE: codes/python/chapter_greedy/max_capacity.py function max_capacity (line 8) | def max_capacity(ht: list[int]) -> int: FILE: codes/python/chapter_greedy/max_product_cutting.py function max_product_cutting (line 10) | def max_product_cutting(n: int) -> int: FILE: codes/python/chapter_hashing/array_hash_map.py class Pair (line 8) | class Pair: method __init__ (line 11) | def __init__(self, key: int, val: str): class ArrayHashMap (line 16) | class ArrayHashMap: method __init__ (line 19) | def __init__(self): method hash_func (line 24) | def hash_func(self, key: int) -> int: method get (line 29) | def get(self, key: int) -> str | None: method put (line 37) | def put(self, key: int, val: str): method remove (line 43) | def remove(self, key: int): method entry_set (line 49) | def entry_set(self) -> list[Pair]: method key_set (line 57) | def key_set(self) -> list[int]: method value_set (line 65) | def value_set(self) -> list[str]: method print (line 73) | def print(self): FILE: codes/python/chapter_hashing/hash_map_chaining.py class HashMapChaining (line 14) | class HashMapChaining: method __init__ (line 17) | def __init__(self): method hash_func (line 25) | def hash_func(self, key: int) -> int: method load_factor (line 29) | def load_factor(self) -> float: method get (line 33) | def get(self, key: int) -> str | None: method put (line 44) | def put(self, key: int, val: str): method remove (line 61) | def remove(self, key: int): method extend (line 72) | def extend(self): method print (line 85) | def print(self): FILE: codes/python/chapter_hashing/hash_map_open_addressing.py class HashMapOpenAddressing (line 14) | class HashMapOpenAddressing: method __init__ (line 17) | def __init__(self): method hash_func (line 26) | def hash_func(self, key: int) -> int: method load_factor (line 30) | def load_factor(self) -> float: method find_bucket (line 34) | def find_bucket(self, key: int) -> int: method get (line 56) | def get(self, key: int) -> str: method put (line 66) | def put(self, key: int, val: str): method remove (line 81) | def remove(self, key: int): method extend (line 90) | def extend(self): method print (line 103) | def print(self): FILE: codes/python/chapter_hashing/simple_hash.py function add_hash (line 8) | def add_hash(key: str) -> int: function mul_hash (line 17) | def mul_hash(key: str) -> int: function xor_hash (line 26) | def xor_hash(key: str) -> int: function rot_hash (line 35) | def rot_hash(key: str) -> int: FILE: codes/python/chapter_heap/heap.py function test_push (line 16) | def test_push(heap: list, val: int, flag: int = 1): function test_pop (line 22) | def test_pop(heap: list, flag: int = 1): FILE: codes/python/chapter_heap/my_heap.py class MaxHeap (line 14) | class MaxHeap: method __init__ (line 17) | def __init__(self, nums: list[int]): method left (line 25) | def left(self, i: int) -> int: method right (line 29) | def right(self, i: int) -> int: method parent (line 33) | def parent(self, i: int) -> int: method swap (line 37) | def swap(self, i: int, j: int): method size (line 41) | def size(self) -> int: method is_empty (line 45) | def is_empty(self) -> bool: method peek (line 49) | def peek(self) -> int: method push (line 53) | def push(self, val: int): method sift_up (line 60) | def sift_up(self, i: int): method pop (line 73) | def pop(self) -> int: method sift_down (line 87) | def sift_down(self, i: int): method print (line 104) | def print(self): FILE: codes/python/chapter_heap/top_k.py function top_k_heap (line 16) | def top_k_heap(nums: list[int], k: int) -> list[int]: FILE: codes/python/chapter_searching/binary_search.py function binary_search (line 8) | def binary_search(nums: list[int], target: int) -> int: function binary_search_lcro (line 25) | def binary_search_lcro(nums: list[int], target: int) -> int: FILE: codes/python/chapter_searching/binary_search_edge.py function binary_search_left_edge (line 14) | def binary_search_left_edge(nums: list[int], target: int) -> int: function binary_search_right_edge (line 25) | def binary_search_right_edge(nums: list[int], target: int) -> int: FILE: codes/python/chapter_searching/binary_search_insertion.py function binary_search_insertion_simple (line 8) | def binary_search_insertion_simple(nums: list[int], target: int) -> int: function binary_search_insertion (line 23) | def binary_search_insertion(nums: list[int], target: int) -> int: FILE: codes/python/chapter_searching/hashing_search.py function hashing_search_array (line 14) | def hashing_search_array(hmap: dict[int, int], target: int) -> int: function hashing_search_linkedlist (line 21) | def hashing_search_linkedlist( FILE: codes/python/chapter_searching/linear_search.py function linear_search_array (line 14) | def linear_search_array(nums: list[int], target: int) -> int: function linear_search_linkedlist (line 23) | def linear_search_linkedlist(head: ListNode, target: int) -> ListNode | ... FILE: codes/python/chapter_searching/two_sum.py function two_sum_brute_force (line 8) | def two_sum_brute_force(nums: list[int], target: int) -> list[int]: function two_sum_hash_table (line 18) | def two_sum_hash_table(nums: list[int], target: int) -> list[int]: FILE: codes/python/chapter_sorting/bubble_sort.py function bubble_sort (line 8) | def bubble_sort(nums: list[int]): function bubble_sort_with_flag (line 20) | def bubble_sort_with_flag(nums: list[int]): FILE: codes/python/chapter_sorting/bucket_sort.py function bucket_sort (line 8) | def bucket_sort(nums: list[float]): FILE: codes/python/chapter_sorting/counting_sort.py function counting_sort_naive (line 8) | def counting_sort_naive(nums: list[int]): function counting_sort (line 26) | def counting_sort(nums: list[int]): FILE: codes/python/chapter_sorting/heap_sort.py function sift_down (line 8) | def sift_down(nums: list[int], n: int, i: int): function heap_sort (line 28) | def heap_sort(nums: list[int]): FILE: codes/python/chapter_sorting/insertion_sort.py function insertion_sort (line 8) | def insertion_sort(nums: list[int]): FILE: codes/python/chapter_sorting/merge_sort.py function merge (line 8) | def merge(nums: list[int], left: int, mid: int, right: int): function merge_sort (line 38) | def merge_sort(nums: list[int], left: int, right: int): FILE: codes/python/chapter_sorting/quick_sort.py class QuickSort (line 8) | class QuickSort: method partition (line 11) | def partition(self, nums: list[int], left: int, right: int) -> int: method quick_sort (line 26) | def quick_sort(self, nums: list[int], left: int, right: int): class QuickSortMedian (line 38) | class QuickSortMedian: method median_three (line 41) | def median_three(self, nums: list[int], left: int, mid: int, right: in... method partition (line 50) | def partition(self, nums: list[int], left: int, right: int) -> int: method quick_sort (line 69) | def quick_sort(self, nums: list[int], left: int, right: int): class QuickSortTailCall (line 81) | class QuickSortTailCall: method partition (line 84) | def partition(self, nums: list[int], left: int, right: int) -> int: method quick_sort (line 99) | def quick_sort(self, nums: list[int], left: int, right: int): FILE: codes/python/chapter_sorting/radix_sort.py function digit (line 8) | def digit(num: int, exp: int) -> int: function counting_sort_digit (line 14) | def counting_sort_digit(nums: list[int], exp: int): function radix_sort (line 38) | def radix_sort(nums: list[int]): FILE: codes/python/chapter_sorting/selection_sort.py function selection_sort (line 8) | def selection_sort(nums: list[int]): FILE: codes/python/chapter_stack_and_queue/array_deque.py class ArrayDeque (line 8) | class ArrayDeque: method __init__ (line 11) | def __init__(self, capacity: int): method capacity (line 17) | def capacity(self) -> int: method size (line 21) | def size(self) -> int: method is_empty (line 25) | def is_empty(self) -> bool: method index (line 29) | def index(self, i: int) -> int: method push_first (line 36) | def push_first(self, num: int): method push_last (line 48) | def push_last(self, num: int): method pop_first (line 59) | def pop_first(self) -> int: method pop_last (line 67) | def pop_last(self) -> int: method peek_first (line 73) | def peek_first(self) -> int: method peek_last (line 79) | def peek_last(self) -> int: method to_array (line 87) | def to_array(self) -> list[int]: FILE: codes/python/chapter_stack_and_queue/array_queue.py class ArrayQueue (line 8) | class ArrayQueue: method __init__ (line 11) | def __init__(self, size: int): method capacity (line 17) | def capacity(self) -> int: method size (line 21) | def size(self) -> int: method is_empty (line 25) | def is_empty(self) -> bool: method push (line 29) | def push(self, num: int): method pop (line 40) | def pop(self) -> int: method peek (line 48) | def peek(self) -> int: method to_list (line 54) | def to_list(self) -> list[int]: FILE: codes/python/chapter_stack_and_queue/array_stack.py class ArrayStack (line 8) | class ArrayStack: method __init__ (line 11) | def __init__(self): method size (line 15) | def size(self) -> int: method is_empty (line 19) | def is_empty(self) -> bool: method push (line 23) | def push(self, item: int): method pop (line 27) | def pop(self) -> int: method peek (line 33) | def peek(self) -> int: method to_list (line 39) | def to_list(self) -> list[int]: FILE: codes/python/chapter_stack_and_queue/linkedlist_deque.py class ListNode (line 8) | class ListNode: method __init__ (line 11) | def __init__(self, val: int): class LinkedListDeque (line 18) | class LinkedListDeque: method __init__ (line 21) | def __init__(self): method size (line 27) | def size(self) -> int: method is_empty (line 31) | def is_empty(self) -> bool: method push (line 35) | def push(self, num: int, is_front: bool): method push_first (line 55) | def push_first(self, num: int): method push_last (line 59) | def push_last(self, num: int): method pop (line 63) | def pop(self, is_front: bool) -> int: method pop_first (line 88) | def pop_first(self) -> int: method pop_last (line 92) | def pop_last(self) -> int: method peek_first (line 96) | def peek_first(self) -> int: method peek_last (line 102) | def peek_last(self) -> int: method to_array (line 108) | def to_array(self) -> list[int]: FILE: codes/python/chapter_stack_and_queue/linkedlist_queue.py class LinkedListQueue (line 14) | class LinkedListQueue: method __init__ (line 17) | def __init__(self): method size (line 23) | def size(self) -> int: method is_empty (line 27) | def is_empty(self) -> bool: method push (line 31) | def push(self, num: int): method pop (line 45) | def pop(self) -> int: method peek (line 53) | def peek(self) -> int: method to_list (line 59) | def to_list(self) -> list[int]: FILE: codes/python/chapter_stack_and_queue/linkedlist_stack.py class LinkedListStack (line 14) | class LinkedListStack: method __init__ (line 17) | def __init__(self): method size (line 22) | def size(self) -> int: method is_empty (line 26) | def is_empty(self) -> bool: method push (line 30) | def push(self, val: int): method pop (line 37) | def pop(self) -> int: method peek (line 44) | def peek(self) -> int: method to_list (line 50) | def to_list(self) -> list[int]: FILE: codes/python/chapter_tree/array_binary_tree.py class ArrayBinaryTree (line 14) | class ArrayBinaryTree: method __init__ (line 17) | def __init__(self, arr: list[int | None]): method size (line 21) | def size(self): method val (line 25) | def val(self, i: int) -> int | None: method left (line 32) | def left(self, i: int) -> int | None: method right (line 36) | def right(self, i: int) -> int | None: method parent (line 40) | def parent(self, i: int) -> int | None: method level_order (line 44) | def level_order(self) -> list[int]: method dfs (line 53) | def dfs(self, i: int, order: str): method pre_order (line 69) | def pre_order(self) -> list[int]: method in_order (line 75) | def in_order(self) -> list[int]: method post_order (line 81) | def post_order(self) -> list[int]: FILE: codes/python/chapter_tree/avl_tree.py class AVLTree (line 14) | class AVLTree: method __init__ (line 17) | def __init__(self): method get_root (line 21) | def get_root(self) -> TreeNode | None: method height (line 25) | def height(self, node: TreeNode | None) -> int: method update_height (line 32) | def update_height(self, node: TreeNode | None): method balance_factor (line 37) | def balance_factor(self, node: TreeNode | None) -> int: method right_rotate (line 45) | def right_rotate(self, node: TreeNode | None) -> TreeNode | None: method left_rotate (line 58) | def left_rotate(self, node: TreeNode | None) -> TreeNode | None: method rotate (line 71) | def rotate(self, node: TreeNode | None) -> TreeNode | None: method insert (line 96) | def insert(self, val): method insert_helper (line 100) | def insert_helper(self, node: TreeNode | None, val: int) -> TreeNode: method remove (line 117) | def remove(self, val: int): method remove_helper (line 121) | def remove_helper(self, node: TreeNode | None, val: int) -> TreeNode |... method search (line 151) | def search(self, val: int) -> TreeNode | None: function test_insert (line 172) | def test_insert(tree: AVLTree, val: int): function test_remove (line 177) | def test_remove(tree: AVLTree, val: int): FILE: codes/python/chapter_tree/binary_search_tree.py class BinarySearchTree (line 14) | class BinarySearchTree: method __init__ (line 17) | def __init__(self): method get_root (line 22) | def get_root(self) -> TreeNode | None: method search (line 26) | def search(self, num: int) -> TreeNode | None: method insert (line 42) | def insert(self, num: int): method remove (line 68) | def remove(self, num: int): FILE: codes/python/chapter_tree/binary_tree_bfs.py function level_order (line 15) | def level_order(root: TreeNode | None) -> list[int]: FILE: codes/python/chapter_tree/binary_tree_dfs.py function pre_order (line 14) | def pre_order(root: TreeNode | None): function in_order (line 24) | def in_order(root: TreeNode | None): function post_order (line 34) | def post_order(root: TreeNode | None): FILE: codes/python/modules/list_node.py class ListNode (line 8) | class ListNode: method __init__ (line 11) | def __init__(self, val: int): function list_to_linked_list (line 16) | def list_to_linked_list(arr: list[int]) -> ListNode | None: function linked_list_to_list (line 26) | def linked_list_to_list(head: ListNode | None) -> list[int]: FILE: codes/python/modules/print_util.py function print_matrix (line 11) | def print_matrix(mat: list[list[int]]): function print_linked_list (line 19) | def print_linked_list(head: ListNode | None): class Trunk (line 25) | class Trunk: method __init__ (line 26) | def __init__(self, prev, string: str | None = None): function show_trunks (line 31) | def show_trunks(p: Trunk | None): function print_tree (line 38) | def print_tree( function print_dict (line 70) | def print_dict(hmap: dict): function print_heap (line 76) | def print_heap(heap: list[int]): FILE: codes/python/modules/tree_node.py class TreeNode (line 10) | class TreeNode: method __init__ (line 13) | def __init__(self, val: int = 0): function list_to_tree_dfs (line 36) | def list_to_tree_dfs(arr: list[int], i: int) -> TreeNode | None: function list_to_tree (line 49) | def list_to_tree(arr: list[int]) -> TreeNode | None: function tree_to_list_dfs (line 54) | def tree_to_list_dfs(root: TreeNode, i: int, res: list[int]) -> list[int]: function tree_to_list (line 65) | def tree_to_list(root: TreeNode | None) -> list[int]: FILE: codes/python/modules/vertex.py class Vertex (line 6) | class Vertex: method __init__ (line 9) | def __init__(self, val: int): function vals_to_vets (line 13) | def vals_to_vets(vals: list[int]) -> list["Vertex"]: function vets_to_vals (line 18) | def vets_to_vals(vets: list["Vertex"]) -> list[int]: FILE: codes/ruby/chapter_array_and_linkedlist/array.rb function random_access (line 8) | def random_access(nums) function extend (line 20) | def extend(nums, enlarge) function insert (line 34) | def insert(nums, num, index) function remove (line 46) | def remove(nums, index) function traverse (line 54) | def traverse(nums) function find (line 69) | def find(nums, target) FILE: codes/ruby/chapter_array_and_linkedlist/linked_list.rb function insert (line 12) | def insert(n0, _p) function remove (line 19) | def remove(n0) function access (line 29) | def access(head, index) function find (line 39) | def find(head, target) FILE: codes/ruby/chapter_array_and_linkedlist/my_list.rb class MyList (line 8) | class MyList method initialize (line 13) | def initialize method get (line 21) | def get(index) method set (line 28) | def set(index, num) method add (line 34) | def add(num) method insert (line 44) | def insert(index, num) method remove (line 61) | def remove(index) method extend_capacity (line 78) | def extend_capacity method to_array (line 86) | def to_array FILE: codes/ruby/chapter_backtracking/n_queens.rb function backtrack (line 8) | def backtrack(row, n, state, res, cols, diags1, diags2) function n_queens (line 35) | def n_queens(n) FILE: codes/ruby/chapter_backtracking/permutations_i.rb function backtrack (line 8) | def backtrack(state, choices, selected, res) function permutations_i (line 32) | def permutations_i(nums) FILE: codes/ruby/chapter_backtracking/permutations_ii.rb function backtrack (line 8) | def backtrack(state, choices, selected, res) function permutations_ii (line 34) | def permutations_ii(nums) FILE: codes/ruby/chapter_backtracking/preorder_traversal_i_compact.rb function pre_order (line 11) | def pre_order(root) FILE: codes/ruby/chapter_backtracking/preorder_traversal_ii_compact.rb function pre_order (line 11) | def pre_order(root) FILE: codes/ruby/chapter_backtracking/preorder_traversal_iii_compact.rb function pre_order (line 11) | def pre_order(root) FILE: codes/ruby/chapter_backtracking/preorder_traversal_iii_template.rb function is_solution? (line 11) | def is_solution?(state) function record_solution (line 16) | def record_solution(state, res) function is_valid? (line 21) | def is_valid?(state, choice) function make_choice (line 26) | def make_choice(state, choice) function undo_choice (line 31) | def undo_choice(state, choice) function backtrack (line 36) | def backtrack(state, choices, res) FILE: codes/ruby/chapter_backtracking/subset_sum_i.rb function backtrack (line 8) | def backtrack(state, target, choices, start, res) function subset_sum_i (line 30) | def subset_sum_i(nums, target) FILE: codes/ruby/chapter_backtracking/subset_sum_i_naive.rb function backtrack (line 8) | def backtrack(state, target, total, choices, res) function subset_sum_i_naive (line 29) | def subset_sum_i_naive(nums, target) FILE: codes/ruby/chapter_backtracking/subset_sum_ii.rb function backtrack (line 8) | def backtrack(state, target, choices, start, res) function subset_sum_ii (line 34) | def subset_sum_ii(nums, target) FILE: codes/ruby/chapter_computational_complexity/iteration.rb function for_loop (line 8) | def for_loop(n) function while_loop (line 20) | def while_loop(n) function while_loop_ii (line 34) | def while_loop_ii(n) function nested_for_loop (line 50) | def nested_for_loop(n) FILE: codes/ruby/chapter_computational_complexity/recursion.rb function recur (line 8) | def recur(n) function for_loop_recur (line 18) | def for_loop_recur(n) function tail_recur (line 38) | def tail_recur(n, res) function fib (line 46) | def fib(n) FILE: codes/ruby/chapter_computational_complexity/space_complexity.rb function function (line 12) | def function function constant (line 18) | def constant(n) function linear (line 31) | def linear(n) function linear_recur (line 43) | def linear_recur(n) function quadratic (line 50) | def quadratic(n) function quadratic_recur (line 56) | def quadratic_recur(n) function build_tree (line 65) | def build_tree(n) FILE: codes/ruby/chapter_computational_complexity/time_complexity.rb function constant (line 8) | def constant(n) function linear (line 18) | def linear(n) function array_traversal (line 25) | def array_traversal(nums) function quadratic (line 37) | def quadratic(n) function bubble_sort (line 51) | def bubble_sort(nums) function exponential (line 72) | def exponential(n) function exp_recur (line 86) | def exp_recur(n) function logarithmic (line 92) | def logarithmic(n) function log_recur (line 104) | def log_recur(n) function linear_log_recur (line 110) | def linear_log_recur(n) function factorial_recur (line 120) | def factorial_recur(n) FILE: codes/ruby/chapter_computational_complexity/worst_best_time_complexity.rb function random_numbers (line 8) | def random_numbers(n) function find_one (line 16) | def find_one(nums) FILE: codes/ruby/chapter_divide_and_conquer/binary_search_recur.rb function dfs (line 8) | def dfs(nums, target, i, j) function binary_search (line 28) | def binary_search(nums, target) FILE: codes/ruby/chapter_divide_and_conquer/build_tree.rb function dfs (line 11) | def dfs(preorder, inorder_map, i, l, r) function build_tree (line 29) | def build_tree(preorder, inorder) FILE: codes/ruby/chapter_divide_and_conquer/hanota.rb function move (line 8) | def move(src, tar) function dfs (line 16) | def dfs(i, src, buf, tar) function solve_hanota (line 32) | def solve_hanota(_A, _B, _C) FILE: codes/ruby/chapter_dynamic_programming/climbing_stairs_backtrack.rb function backtrack (line 8) | def backtrack(choices, state, n, res) function climbing_stairs_backtrack (line 23) | def climbing_stairs_backtrack(n) FILE: codes/ruby/chapter_dynamic_programming/climbing_stairs_constraint_dp.rb function climbing_stairs_constraint_dp (line 8) | def climbing_stairs_constraint_dp(n) FILE: codes/ruby/chapter_dynamic_programming/climbing_stairs_dfs.rb function dfs (line 8) | def dfs(i) function climbing_stairs_dfs (line 16) | def climbing_stairs_dfs(n) FILE: codes/ruby/chapter_dynamic_programming/climbing_stairs_dfs_mem.rb function dfs (line 8) | def dfs(i, mem) function climbing_stairs_dfs_mem (line 21) | def climbing_stairs_dfs_mem(n) FILE: codes/ruby/chapter_dynamic_programming/climbing_stairs_dp.rb function climbing_stairs_dp (line 8) | def climbing_stairs_dp(n) function climbing_stairs_dp_comp (line 22) | def climbing_stairs_dp_comp(n) FILE: codes/ruby/chapter_dynamic_programming/coin_change.rb function coin_change_dp (line 8) | def coin_change_dp(coins, amt) function coin_change_dp_comp (line 31) | def coin_change_dp_comp(coins, amt) FILE: codes/ruby/chapter_dynamic_programming/coin_change_ii.rb function coin_change_ii_dp (line 8) | def coin_change_ii_dp(coins, amt) function coin_change_ii_dp_comp (line 30) | def coin_change_ii_dp_comp(coins, amt) FILE: codes/ruby/chapter_dynamic_programming/edit_distance.rb function edit_distance_dfs (line 8) | def edit_distance_dfs(s, t, i, j) function edit_distance_dfs_mem (line 25) | def edit_distance_dfs_mem(s, t, mem, i, j) function edit_distance_dp (line 45) | def edit_distance_dp(s, t) function edit_distance_dp_comp (line 67) | def edit_distance_dp_comp(s, t) FILE: codes/ruby/chapter_dynamic_programming/knapsack.rb function knapsack_dfs (line 8) | def knapsack_dfs(wgt, val, i, c) function knapsack_dfs_mem (line 21) | def knapsack_dfs_mem(wgt, val, mem, i, c) function knapsack_dp (line 36) | def knapsack_dp(wgt, val, cap) function knapsack_dp_comp (line 56) | def knapsack_dp_comp(wgt, val, cap) FILE: codes/ruby/chapter_dynamic_programming/min_cost_climbing_stairs_dp.rb function min_cost_climbing_stairs_dp (line 8) | def min_cost_climbing_stairs_dp(cost) function min_cost_climbing_stairs_dp_comp (line 21) | def min_cost_climbing_stairs_dp_comp(cost) FILE: codes/ruby/chapter_dynamic_programming/min_path_sum.rb function min_path_sum_dfs (line 8) | def min_path_sum_dfs(grid, i, j) function min_path_sum_dfs_mem (line 21) | def min_path_sum_dfs_mem(grid, mem, i, j) function min_path_sum_dp (line 36) | def min_path_sum_dp(grid) function min_path_sum_dp_comp (line 55) | def min_path_sum_dp_comp(grid) FILE: codes/ruby/chapter_dynamic_programming/unbounded_knapsack.rb function unbounded_knapsack_dp (line 8) | def unbounded_knapsack_dp(wgt, val, cap) function unbounded_knapsack_dp_comp (line 28) | def unbounded_knapsack_dp_comp(wgt, val, cap) FILE: codes/ruby/chapter_graph/graph_adjacency_list.rb class GraphAdjList (line 10) | class GraphAdjList method initialize (line 14) | def initialize(edges) method size (line 26) | def size method add_edge (line 31) | def add_edge(vet1, vet2) method remove_edge (line 39) | def remove_edge(vet1, vet2) method add_vertex (line 48) | def add_vertex(vet) method remove_vertex (line 56) | def remove_vertex(vet) method __print__ (line 68) | def __print__ FILE: codes/ruby/chapter_graph/graph_adjacency_matrix.rb class GraphAdjMat (line 10) | class GraphAdjMat method initialize (line 11) | def initialize(vertices, edges) method size (line 25) | def size method add_vertex (line 30) | def add_vertex(val) method remove_vertex (line 42) | def remove_vertex(index) method add_edge (line 54) | def add_edge(i, j) method remove_edge (line 66) | def remove_edge(i, j) method __print__ (line 77) | def __print__ FILE: codes/ruby/chapter_graph/graph_bfs.rb function graph_bfs (line 12) | def graph_bfs(graph, start_vet) FILE: codes/ruby/chapter_graph/graph_dfs.rb function dfs (line 12) | def dfs(graph, visited, res, vet) function graph_dfs (line 24) | def graph_dfs(graph, start_vet) FILE: codes/ruby/chapter_greedy/coin_change_greedy.rb function coin_change_greedy (line 8) | def coin_change_greedy(coins, amt) FILE: codes/ruby/chapter_greedy/fractional_knapsack.rb class Item (line 8) | class Item method initialize (line 12) | def initialize(w, v) function fractional_knapsack (line 19) | def fractional_knapsack(wgt, val, cap) FILE: codes/ruby/chapter_greedy/max_capacity.rb function max_capacity (line 8) | def max_capacity(ht) FILE: codes/ruby/chapter_greedy/max_product_cutting.rb function max_product_cutting (line 8) | def max_product_cutting(n) FILE: codes/ruby/chapter_hashing/array_hash_map.rb class Pair (line 8) | class Pair method initialize (line 11) | def initialize(key, val) class ArrayHashMap (line 18) | class ArrayHashMap method initialize (line 20) | def initialize method hash_func (line 26) | def hash_func(key) method get (line 31) | def get(key) method put (line 40) | def put(key, val) method remove (line 47) | def remove(key) method entry_set (line 54) | def entry_set method key_set (line 61) | def key_set method value_set (line 68) | def value_set method print (line 75) | def print FILE: codes/ruby/chapter_hashing/hash_map_chaining.rb class HashMapChaining (line 10) | class HashMapChaining method initialize (line 12) | def initialize method hash_func (line 21) | def hash_func(key) method load_factor (line 26) | def load_factor method get (line 31) | def get(key) method put (line 43) | def put(key, val) method remove (line 62) | def remove(key) method extend (line 76) | def extend method print (line 92) | def print FILE: codes/ruby/chapter_hashing/hash_map_open_addressing.rb class HashMapOpenAddressing (line 10) | class HashMapOpenAddressing method initialize (line 14) | def initialize method hash_func (line 23) | def hash_func(key) method load_factor (line 28) | def load_factor method find_bucket (line 33) | def find_bucket(key) method get (line 58) | def get(key) method put (line 68) | def put(key, val) method remove (line 84) | def remove(key) method extend (line 95) | def extend method print (line 109) | def print FILE: codes/ruby/chapter_hashing/simple_hash.rb function add_hash (line 8) | def add_hash(key) function mul_hash (line 18) | def mul_hash(key) function xor_hash (line 28) | def xor_hash(key) function rot_hash (line 38) | def rot_hash(key) FILE: codes/ruby/chapter_heap/my_heap.rb class MaxHeap (line 10) | class MaxHeap method initialize (line 14) | def initialize(nums) method left (line 24) | def left(i) method right (line 29) | def right(i) method parent (line 34) | def parent(i) method swap (line 39) | def swap(i, j) method size (line 44) | def size method is_empty? (line 49) | def is_empty? method peek (line 54) | def peek method push (line 59) | def push(val) method sift_up (line 67) | def sift_up(i) method pop (line 81) | def pop method sift_down (line 95) | def sift_down(i) method __print__ (line 113) | def __print__ FILE: codes/ruby/chapter_heap/top_k.rb function push_min_heap (line 10) | def push_min_heap(heap, val) function pop_min_heap (line 16) | def pop_min_heap(heap) function peek_min_heap (line 22) | def peek_min_heap(heap) function get_min_heap (line 28) | def get_min_heap(heap) function top_k_heap (line 34) | def top_k_heap(nums, k) FILE: codes/ruby/chapter_searching/binary_search.rb function binary_search (line 8) | def binary_search(nums, target) function binary_search_lcro (line 30) | def binary_search_lcro(nums, target) FILE: codes/ruby/chapter_searching/binary_search_edge.rb function binary_search_left_edge (line 10) | def binary_search_left_edge(nums, target) function binary_search_right_edge (line 21) | def binary_search_right_edge(nums, target) FILE: codes/ruby/chapter_searching/binary_search_insertion.rb function binary_search_insertion_simple (line 8) | def binary_search_insertion_simple(nums, target) function binary_search_insertion (line 29) | def binary_search_insertion(nums, target) FILE: codes/ruby/chapter_searching/hashing_search.rb function hashing_search_array (line 10) | def hashing_search_array(hmap, target) function hashing_search_linkedlist (line 17) | def hashing_search_linkedlist(hmap, target) FILE: codes/ruby/chapter_searching/linear_search.rb function linear_search_array (line 10) | def linear_search_array(nums, target) function linear_search_linkedlist (line 20) | def linear_search_linkedlist(head, target) FILE: codes/ruby/chapter_searching/two_sum.rb function two_sum_brute_force (line 8) | def two_sum_brute_force(nums, target) function two_sum_hash_table (line 20) | def two_sum_hash_table(nums, target) FILE: codes/ruby/chapter_sorting/bubble_sort.rb function bubble_sort (line 8) | def bubble_sort(nums) function bubble_sort_with_flag (line 23) | def bubble_sort_with_flag(nums) FILE: codes/ruby/chapter_sorting/bucket_sort.rb function bucket_sort (line 8) | def bucket_sort(nums) FILE: codes/ruby/chapter_sorting/counting_sort.rb function counting_sort_naive (line 8) | def counting_sort_naive(nums) function counting_sort (line 28) | def counting_sort(nums) FILE: codes/ruby/chapter_sorting/heap_sort.rb function sift_down (line 8) | def sift_down(nums, n, i) function heap_sort (line 26) | def heap_sort(nums) FILE: codes/ruby/chapter_sorting/insertion_sort.rb function insertion_sort (line 8) | def insertion_sort(nums) FILE: codes/ruby/chapter_sorting/merge_sort.rb function merge (line 8) | def merge(nums, left, mid, right) function merge_sort (line 43) | def merge_sort(nums, left, right) FILE: codes/ruby/chapter_sorting/quick_sort.rb class QuickSort (line 8) | class QuickSort method partition (line 11) | def partition(nums, left, right) method quick_sort (line 30) | def quick_sort(nums, left, right) class QuickSortMedian (line 45) | class QuickSortMedian method median_three (line 48) | def median_three(nums, left, mid, right) method partition (line 59) | def partition(nums, left, right) method quick_sort (line 81) | def quick_sort(nums, left, right) class QuickSortTailCall (line 96) | class QuickSortTailCall method partition (line 99) | def partition(nums, left, right) method quick_sort (line 119) | def quick_sort(nums, left, right) FILE: codes/ruby/chapter_sorting/radix_sort.rb function digit (line 8) | def digit(num, exp) function counting_sort_digit (line 14) | def counting_sort_digit(nums, exp) function radix_sort (line 38) | def radix_sort(nums) FILE: codes/ruby/chapter_sorting/selection_sort.rb function selection_sort (line 8) | def selection_sort(nums) FILE: codes/ruby/chapter_stack_and_queue/array_deque.rb class ArrayDeque (line 8) | class ArrayDeque method initialize (line 13) | def initialize(capacity) method capacity (line 20) | def capacity method is_empty? (line 25) | def is_empty? method push_first (line 30) | def push_first(num) method push_last (line 45) | def push_last(num) method pop_first (line 59) | def pop_first method pop_last (line 68) | def pop_last method peek_first (line 75) | def peek_first method peek_last (line 82) | def peek_last method to_array (line 91) | def to_array method index (line 103) | def index(i) FILE: codes/ruby/chapter_stack_and_queue/array_queue.rb class ArrayQueue (line 8) | class ArrayQueue method initialize (line 13) | def initialize(size) method capacity (line 20) | def capacity method is_empty? (line 25) | def is_empty? method push (line 30) | def push(num) method pop (line 42) | def pop method peek (line 51) | def peek method to_array (line 58) | def to_array FILE: codes/ruby/chapter_stack_and_queue/array_stack.rb class ArrayStack (line 8) | class ArrayStack method initialize (line 10) | def initialize method size (line 15) | def size method is_empty? (line 20) | def is_empty? method push (line 25) | def push(item) method pop (line 30) | def pop method peek (line 37) | def peek method to_array (line 44) | def to_array FILE: codes/ruby/chapter_stack_and_queue/linkedlist_deque.rb class ListNode (line 8) | class ListNode method initialize (line 14) | def initialize(val) class LinkedListDeque (line 20) | class LinkedListDeque method initialize (line 25) | def initialize method is_empty? (line 32) | def is_empty? method push (line 37) | def push(num, is_front) method push_first (line 59) | def push_first(num) method push_last (line 64) | def push_last(num) method pop (line 69) | def pop(is_front) method pop_first (line 99) | def pop_first method pop_last (line 104) | def pop_last method peek_first (line 109) | def peek_first method peek_last (line 116) | def peek_last method to_array (line 123) | def to_array FILE: codes/ruby/chapter_stack_and_queue/linkedlist_queue.rb class LinkedListQueue (line 10) | class LinkedListQueue method initialize (line 15) | def initialize method is_empty? (line 22) | def is_empty? method push (line 27) | def push(num) method pop (line 45) | def pop method peek (line 54) | def peek method to_array (line 61) | def to_array FILE: codes/ruby/chapter_stack_and_queue/linkedlist_stack.rb class LinkedListStack (line 10) | class LinkedListStack method initialize (line 14) | def initialize method is_empty? (line 19) | def is_empty? method push (line 24) | def push(val) method pop (line 32) | def pop method peek (line 40) | def peek method to_array (line 47) | def to_array FILE: codes/ruby/chapter_tree/array_binary_tree.rb class ArrayBinaryTree (line 11) | class ArrayBinaryTree method initialize (line 13) | def initialize(arr) method size (line 18) | def size method val (line 23) | def val(i) method left (line 31) | def left(i) method right (line 36) | def right(i) method parent (line 41) | def parent(i) method level_order (line 46) | def level_order method dfs (line 58) | def dfs(i, order) method pre_order (line 71) | def pre_order method in_order (line 78) | def in_order method post_order (line 85) | def post_order FILE: codes/ruby/chapter_tree/avl_tree.rb class AVLTree (line 11) | class AVLTree method initialize (line 13) | def initialize method get_root (line 18) | def get_root method height (line 23) | def height(node) method update_height (line 31) | def update_height(node) method balance_factor (line 37) | def balance_factor(node) method right_rotate (line 46) | def right_rotate(node) method left_rotate (line 60) | def left_rotate(node) method rotate (line 74) | def rotate(node) method insert (line 103) | def insert(val) method insert_helper (line 108) | def insert_helper(node, val) method remove (line 126) | def remove(val) method remove_helper (line 131) | def remove_helper(node, val) method search (line 162) | def search(val) function test_insert (line 184) | def test_insert(tree, val) function test_remove (line 190) | def test_remove(tree, val) FILE: codes/ruby/chapter_tree/binary_search_tree.rb class BinarySearchTree (line 11) | class BinarySearchTree method initialize (line 13) | def initialize method get_root (line 19) | def get_root method search (line 24) | def search(num) method insert (line 45) | def insert(num) method remove (line 78) | def remove(num) FILE: codes/ruby/chapter_tree/binary_tree_bfs.rb function level_order (line 11) | def level_order(root) FILE: codes/ruby/chapter_tree/binary_tree_dfs.rb function pre_order (line 11) | def pre_order(root) function in_order (line 21) | def in_order(root) function post_order (line 31) | def post_order(root) FILE: codes/ruby/utils/list_node.rb class ListNode (line 8) | class ListNode method initialize (line 12) | def initialize(val=0, next_node=nil) function arr_to_linked_list (line 19) | def arr_to_linked_list(arr) function linked_list_to_arr (line 31) | def linked_list_to_arr(head) FILE: codes/ruby/utils/print_util.rb function print_matrix (line 10) | def print_matrix(mat) function print_linked_list (line 17) | def print_linked_list(head) class Trunk (line 26) | class Trunk method initialize (line 29) | def initialize(prev, str) function show_trunk (line 35) | def show_trunk(p) function print_tree (line 45) | def print_tree(root, prev=nil, is_right=false) function print_hash_map (line 70) | def print_hash_map(hmap) function print_heap (line 75) | def print_heap(heap) FILE: codes/ruby/utils/tree_node.rb class TreeNode (line 8) | class TreeNode method initialize (line 14) | def initialize(val=0) function arr_to_tree_dfs (line 21) | def arr_to_tree_dfs(arr, i) function arr_to_tree (line 33) | def arr_to_tree(arr) function tree_to_arr_dfs (line 38) | def tree_to_arr_dfs(root, i, res) function tree_to_arr (line 49) | def tree_to_arr(root) FILE: codes/ruby/utils/vertex.rb class Vertex (line 8) | class Vertex method initialize (line 11) | def initialize(val) function vals_to_vets (line 17) | def vals_to_vets(vals) function vets_to_vals (line 22) | def vets_to_vals(vets) FILE: codes/rust/chapter_array_and_linkedlist/array.rs function random_access (line 11) | fn random_access(nums: &[i32]) -> i32 { function extend (line 20) | fn extend(nums: &[i32], enlarge: usize) -> Vec { function insert (line 31) | fn insert(nums: &mut [i32], num: i32, index: usize) { function remove (line 41) | fn remove(nums: &mut [i32], index: usize) { function traverse (line 49) | fn traverse(nums: &[i32]) { function find (line 63) | fn find(nums: &[i32], target: i32) -> Option { function main (line 73) | fn main() { FILE: codes/rust/chapter_array_and_linkedlist/linked_list.rs function insert (line 13) | pub fn insert(n0: &Rc>>, P: Rc(n0: &Rc>>) { function access (line 31) | pub fn access(head: Rc>>, index: i32) -> Option(head: Rc>>, target: T) -> ... function main (line 67) | fn main() { FILE: codes/rust/chapter_array_and_linkedlist/list.rs function main (line 9) | fn main() { FILE: codes/rust/chapter_array_and_linkedlist/my_list.rs type MyList (line 11) | struct MyList { method new (line 21) | pub fn new(capacity: usize) -> Self { method size (line 32) | pub fn size(&self) -> usize { method capacity (line 37) | pub fn capacity(&self) -> usize { method get (line 42) | pub fn get(&self, index: usize) -> i32 { method set (line 51) | pub fn set(&mut self, index: usize, num: i32) { method add (line 59) | pub fn add(&mut self, num: i32) { method insert (line 70) | pub fn insert(&mut self, index: usize, num: i32) { method remove (line 88) | pub fn remove(&mut self, index: usize) -> i32 { method extend_capacity (line 104) | pub fn extend_capacity(&mut self) { method to_array (line 113) | pub fn to_array(&self) -> Vec { function main (line 124) | fn main() { FILE: codes/rust/chapter_backtracking/n_queens.rs function backtrack (line 8) | fn backtrack( function n_queens (line 42) | fn n_queens(n: usize) -> Vec>> { function main (line 64) | pub fn main() { FILE: codes/rust/chapter_backtracking/permutations_i.rs function backtrack (line 8) | fn backtrack(mut state: Vec, choices: &[i32], selected: &mut [bool]... function permutations_i (line 32) | fn permutations_i(nums: &mut [i32]) -> Vec> { function main (line 39) | pub fn main() { FILE: codes/rust/chapter_backtracking/permutations_ii.rs function backtrack (line 10) | fn backtrack(mut state: Vec, choices: &[i32], selected: &mut [bool]... function permutations_ii (line 36) | fn permutations_ii(nums: &mut [i32]) -> Vec> { function main (line 43) | pub fn main() { FILE: codes/rust/chapter_backtracking/preorder_traversal_i_compact.rs function pre_order (line 11) | fn pre_order(res: &mut Vec>>, root: Option<&Rc>>) -> bool { function record_solution (line 16) | fn record_solution( function is_valid (line 24) | fn is_valid(_: &mut Vec>>, choice: Option<&Rc>>, choice: Rc>>, _: Rc Vec> { function main (line 48) | pub fn main() { FILE: codes/rust/chapter_backtracking/subset_sum_i_naive.rs function backtrack (line 8) | fn backtrack( function subset_sum_i_naive (line 36) | fn subset_sum_i_naive(nums: &[i32], target: i32) -> Vec> { function main (line 45) | pub fn main() { FILE: codes/rust/chapter_backtracking/subset_sum_ii.rs function backtrack (line 8) | fn backtrack( function subset_sum_ii (line 43) | fn subset_sum_ii(nums: &mut [i32], target: i32) -> Vec> { function main (line 53) | pub fn main() { FILE: codes/rust/chapter_computational_complexity/iteration.rs function for_loop (line 8) | fn for_loop(n: i32) -> i32 { function while_loop (line 18) | fn while_loop(n: i32) -> i32 { function while_loop_ii (line 31) | fn while_loop_ii(n: i32) -> i32 { function nested_for_loop (line 46) | fn nested_for_loop(n: i32) -> String { function main (line 59) | fn main() { FILE: codes/rust/chapter_computational_complexity/recursion.rs function recur (line 8) | fn recur(n: i32) -> i32 { function for_loop_recur (line 20) | fn for_loop_recur(n: i32) -> i32 { function tail_recur (line 39) | fn tail_recur(n: i32, res: i32) -> i32 { function fib (line 49) | fn fib(n: i32) -> i32 { function main (line 61) | fn main() { FILE: codes/rust/chapter_computational_complexity/space_complexity.rs function function (line 13) | fn function() -> i32 { function constant (line 20) | fn constant(n: i32) { function linear (line 38) | fn linear(n: i32) { function linear_recur (line 54) | fn linear_recur(n: i32) { function quadratic (line 64) | fn quadratic(n: i32) { function quadratic_recur (line 79) | fn quadratic_recur(n: i32) -> i32 { function build_tree (line 90) | fn build_tree(n: i32) -> Option>> { function main (line 101) | fn main() { FILE: codes/rust/chapter_computational_complexity/time_complexity.rs function constant (line 8) | fn constant(n: i32) -> i32 { function linear (line 19) | fn linear(n: i32) -> i32 { function array_traversal (line 28) | fn array_traversal(nums: &[i32]) -> i32 { function quadratic (line 38) | fn quadratic(n: i32) -> i32 { function bubble_sort (line 50) | fn bubble_sort(nums: &mut [i32]) -> i32 { function exponential (line 70) | fn exponential(n: i32) -> i32 { function exp_recur (line 85) | fn exp_recur(n: i32) -> i32 { function logarithmic (line 93) | fn logarithmic(mut n: i32) -> i32 { function log_recur (line 103) | fn log_recur(n: i32) -> i32 { function linear_log_recur (line 111) | fn linear_log_recur(n: i32) -> i32 { function factorial_recur (line 123) | fn factorial_recur(n: i32) -> i32 { function main (line 136) | fn main() { FILE: codes/rust/chapter_computational_complexity/worst_best_time_complexity.rs function random_numbers (line 12) | fn random_numbers(n: i32) -> Vec { function find_one (line 21) | fn find_one(nums: &[i32]) -> Option { function main (line 33) | fn main() { FILE: codes/rust/chapter_divide_and_conquer/binary_search_recur.rs function dfs (line 8) | fn dfs(nums: &[i32], target: i32, i: i32, j: i32) -> i32 { function binary_search (line 27) | fn binary_search(nums: &[i32], target: i32) -> i32 { function main (line 34) | pub fn main() { FILE: codes/rust/chapter_divide_and_conquer/build_tree.rs function dfs (line 12) | fn dfs( function build_tree (line 36) | fn build_tree(preorder: &[i32], inorder: &[i32]) -> Option, tar: &mut Vec) { function dfs (line 18) | fn dfs(i: i32, src: &mut Vec, buf: &mut Vec, tar: &mut Vec, B: &mut Vec, C: &mut Vec) { function main (line 40) | pub fn main() { FILE: codes/rust/chapter_dynamic_programming/climbing_stairs_backtrack.rs function backtrack (line 8) | fn backtrack(choices: &[i32], state: i32, n: i32, res: &mut [i32]) { function climbing_stairs_backtrack (line 26) | fn climbing_stairs_backtrack(n: usize) -> i32 { function main (line 36) | pub fn main() { FILE: codes/rust/chapter_dynamic_programming/climbing_stairs_constraint_dp.rs function climbing_stairs_constraint_dp (line 8) | fn climbing_stairs_constraint_dp(n: usize) -> i32 { function main (line 28) | pub fn main() { FILE: codes/rust/chapter_dynamic_programming/climbing_stairs_dfs.rs function dfs (line 8) | fn dfs(i: usize) -> i32 { function climbing_stairs_dfs (line 19) | fn climbing_stairs_dfs(n: usize) -> i32 { function main (line 24) | pub fn main() { FILE: codes/rust/chapter_dynamic_programming/climbing_stairs_dfs_mem.rs function dfs (line 8) | fn dfs(i: usize, mem: &mut [i32]) -> i32 { function climbing_stairs_dfs_mem (line 25) | fn climbing_stairs_dfs_mem(n: usize) -> i32 { function main (line 32) | pub fn main() { FILE: codes/rust/chapter_dynamic_programming/climbing_stairs_dp.rs function climbing_stairs_dp (line 8) | fn climbing_stairs_dp(n: usize) -> i32 { function climbing_stairs_dp_comp (line 26) | fn climbing_stairs_dp_comp(n: usize) -> i32 { function main (line 40) | pub fn main() { FILE: codes/rust/chapter_dynamic_programming/coin_change.rs function coin_change_dp (line 8) | fn coin_change_dp(coins: &[i32], amt: usize) -> i32 { function coin_change_dp_comp (line 37) | fn coin_change_dp_comp(coins: &[i32], amt: usize) -> i32 { function main (line 64) | pub fn main() { FILE: codes/rust/chapter_dynamic_programming/coin_change_ii.rs function coin_change_ii_dp (line 8) | fn coin_change_ii_dp(coins: &[i32], amt: usize) -> i32 { function coin_change_ii_dp_comp (line 32) | fn coin_change_ii_dp_comp(coins: &[i32], amt: usize) -> i32 { function main (line 53) | pub fn main() { FILE: codes/rust/chapter_dynamic_programming/edit_distance.rs function edit_distance_dfs (line 8) | fn edit_distance_dfs(s: &str, t: &str, i: usize, j: usize) -> i32 { function edit_distance_dfs_mem (line 34) | fn edit_distance_dfs_mem(s: &str, t: &str, mem: &mut Vec>, i: u... function edit_distance_dp (line 65) | fn edit_distance_dp(s: &str, t: &str) -> i32 { function edit_distance_dp_comp (line 92) | fn edit_distance_dp_comp(s: &str, t: &str) -> i32 { function main (line 121) | pub fn main() { FILE: codes/rust/chapter_dynamic_programming/knapsack.rs function knapsack_dfs (line 8) | fn knapsack_dfs(wgt: &[i32], val: &[i32], i: usize, c: usize) -> i32 { function knapsack_dfs_mem (line 25) | fn knapsack_dfs_mem(wgt: &[i32], val: &[i32], mem: &mut Vec>, i... function knapsack_dp (line 47) | fn knapsack_dp(wgt: &[i32], val: &[i32], cap: usize) -> i32 { function knapsack_dp_comp (line 70) | fn knapsack_dp_comp(wgt: &[i32], val: &[i32], cap: usize) -> i32 { function main (line 88) | pub fn main() { FILE: codes/rust/chapter_dynamic_programming/min_cost_climbing_stairs_dp.rs function min_cost_climbing_stairs_dp (line 10) | fn min_cost_climbing_stairs_dp(cost: &[i32]) -> i32 { function min_cost_climbing_stairs_dp_comp (line 28) | fn min_cost_climbing_stairs_dp_comp(cost: &[i32]) -> i32 { function main (line 43) | pub fn main() { FILE: codes/rust/chapter_dynamic_programming/min_path_sum.rs function min_path_sum_dfs (line 8) | fn min_path_sum_dfs(grid: &Vec>, i: i32, j: i32) -> i32 { function min_path_sum_dfs_mem (line 25) | fn min_path_sum_dfs_mem(grid: &Vec>, mem: &mut Vec>, i... function min_path_sum_dp (line 47) | fn min_path_sum_dp(grid: &Vec>) -> i32 { function min_path_sum_dp_comp (line 70) | fn min_path_sum_dp_comp(grid: &Vec>) -> i32 { function main (line 92) | pub fn main() { FILE: codes/rust/chapter_dynamic_programming/unbounded_knapsack.rs function unbounded_knapsack_dp (line 8) | fn unbounded_knapsack_dp(wgt: &[i32], val: &[i32], cap: usize) -> i32 { function unbounded_knapsack_dp_comp (line 28) | fn unbounded_knapsack_dp_comp(wgt: &[i32], val: &[i32], cap: usize) -> i... function main (line 48) | pub fn main() { FILE: codes/rust/chapter_graph/graph_adjacency_list.rs type GraphAdjList (line 12) | pub struct GraphAdjList { method new (line 19) | pub fn new(edges: Vec<[Vertex; 2]>) -> Self { method size (line 35) | pub fn size(&self) -> usize { method add_edge (line 40) | pub fn add_edge(&mut self, vet1: Vertex, vet2: Vertex) { method remove_edge (line 51) | pub fn remove_edge(&mut self, vet1: Vertex, vet2: Vertex) { method add_vertex (line 65) | pub fn add_vertex(&mut self, vet: Vertex) { method remove_vertex (line 75) | pub fn remove_vertex(&mut self, vet: Vertex) { method print (line 85) | pub fn print(&self) { function main (line 96) | fn main() { FILE: codes/rust/chapter_graph/graph_adjacency_matrix.rs type GraphAdjMat (line 8) | pub struct GraphAdjMat { method new (line 17) | pub fn new(vertices: Vec, edges: Vec<[usize; 2]>) -> Self { method size (line 36) | pub fn size(&self) -> usize { method add_vertex (line 41) | pub fn add_vertex(&mut self, val: i32) { method remove_vertex (line 54) | pub fn remove_vertex(&mut self, index: usize) { method add_edge (line 69) | pub fn add_edge(&mut self, i: usize, j: usize) { method remove_edge (line 82) | pub fn remove_edge(&mut self, i: usize, j: usize) { method print (line 93) | pub fn print(&self) { function main (line 105) | fn main() { FILE: codes/rust/chapter_graph/graph_bfs.rs function graph_bfs (line 15) | fn graph_bfs(graph: GraphAdjList, start_vet: Vertex) -> Vec { function main (line 44) | fn main() { FILE: codes/rust/chapter_graph/graph_dfs.rs function dfs (line 14) | fn dfs(graph: &GraphAdjList, visited: &mut HashSet, res: &mut Ve... function graph_dfs (line 31) | fn graph_dfs(graph: GraphAdjList, start_vet: Vertex) -> Vec { function main (line 42) | fn main() { FILE: codes/rust/chapter_greedy/coin_change_greedy.rs function coin_change_greedy (line 8) | fn coin_change_greedy(coins: &[i32], mut amt: i32) -> i32 { function main (line 31) | fn main() { FILE: codes/rust/chapter_greedy/fractional_knapsack.rs type Item (line 8) | struct Item { method new (line 14) | fn new(w: i32, v: i32) -> Self { function fractional_knapsack (line 20) | fn fractional_knapsack(wgt: &[i32], val: &[i32], mut cap: i32) -> f64 { function main (line 51) | fn main() { FILE: codes/rust/chapter_greedy/max_capacity.rs function max_capacity (line 8) | fn max_capacity(ht: &[i32]) -> i32 { function main (line 30) | fn main() { FILE: codes/rust/chapter_greedy/max_product_cutting.rs function max_product_cutting (line 8) | fn max_product_cutting(n: i32) -> i32 { function main (line 29) | fn main() { FILE: codes/rust/chapter_hashing/array_hash_map.rs type Pair (line 9) | pub struct Pair { type ArrayHashMap (line 14) | pub struct ArrayHashMap { method new (line 19) | pub fn new() -> ArrayHashMap { method hash_func (line 27) | fn hash_func(&self, key: i32) -> usize { method get (line 32) | pub fn get(&self, key: i32) -> Option<&String> { method put (line 38) | pub fn put(&mut self, key: i32, val: &str) { method remove (line 47) | pub fn remove(&mut self, key: i32) { method entry_set (line 54) | pub fn entry_set(&self) -> Vec<&Pair> { method key_set (line 62) | pub fn key_set(&self) -> Vec<&i32> { method value_set (line 70) | pub fn value_set(&self) -> Vec<&String> { method print (line 78) | pub fn print(&self) { function main (line 85) | fn main() { FILE: codes/rust/chapter_hashing/build_in_hash.rs function main (line 13) | fn main() { FILE: codes/rust/chapter_hashing/hash_map.rs function main (line 12) | pub fn main() { FILE: codes/rust/chapter_hashing/hash_map_chaining.rs type Pair (line 9) | struct Pair { type HashMapChaining (line 15) | struct HashMapChaining { method new (line 25) | fn new() -> Self { method hash_func (line 36) | fn hash_func(&self, key: i32) -> usize { method load_factor (line 41) | fn load_factor(&self) -> f32 { method remove (line 46) | fn remove(&mut self, key: i32) -> Option { method extend (line 63) | fn extend(&mut self) { method print (line 81) | fn print(&self) { method put (line 92) | fn put(&mut self, key: i32, val: String) { method get (line 115) | fn get(&self, key: i32) -> Option<&str> { function main (line 131) | pub fn main() { FILE: codes/rust/chapter_hashing/hash_map_open_addressing.rs type HashMapOpenAddressing (line 14) | struct HashMapOpenAddressing { method new (line 25) | fn new() -> Self { method hash_func (line 40) | fn hash_func(&self, key: i32) -> usize { method load_factor (line 45) | fn load_factor(&self) -> f64 { method find_bucket (line 50) | fn find_bucket(&mut self, key: i32) -> usize { method get (line 81) | fn get(&mut self, key: i32) -> Option<&str> { method put (line 93) | fn put(&mut self, key: i32, val: String) { method remove (line 111) | fn remove(&mut self, key: i32) { method extend (line 122) | fn extend(&mut self) { method print (line 141) | fn print(&self) { function main (line 156) | fn main() { FILE: codes/rust/chapter_hashing/simple_hash.rs function add_hash (line 8) | fn add_hash(key: &str) -> i32 { function mul_hash (line 20) | fn mul_hash(key: &str) -> i32 { function xor_hash (line 32) | fn xor_hash(key: &str) -> i32 { function rot_hash (line 44) | fn rot_hash(key: &str) -> i32 { function main (line 56) | fn main() { FILE: codes/rust/chapter_heap/heap.rs function test_push_max (line 11) | fn test_push_max(heap: &mut BinaryHeap, val: i32) { function test_pop_max (line 17) | fn test_pop_max(heap: &mut BinaryHeap) { function main (line 24) | fn main() { FILE: codes/rust/chapter_heap/my_heap.rs type MaxHeap (line 10) | struct MaxHeap { method new (line 17) | fn new(nums: Vec) -> Self { method left (line 28) | fn left(i: usize) -> usize { method right (line 33) | fn right(i: usize) -> usize { method parent (line 38) | fn parent(i: usize) -> usize { method swap (line 43) | fn swap(&mut self, i: usize, j: usize) { method size (line 48) | fn size(&self) -> usize { method is_empty (line 53) | fn is_empty(&self) -> bool { method peek (line 58) | fn peek(&self) -> Option { method push (line 63) | fn push(&mut self, val: i32) { method sift_up (line 71) | fn sift_up(&mut self, mut i: usize) { method pop (line 91) | fn pop(&mut self) -> i32 { method sift_down (line 107) | fn sift_down(&mut self, mut i: usize) { method print (line 129) | fn print(&self) { function main (line 135) | fn main() { FILE: codes/rust/chapter_heap/top_k.rs function top_k_heap (line 13) | fn top_k_heap(nums: Vec, k: usize) -> BinaryHeap> { function main (line 32) | fn main() { FILE: codes/rust/chapter_searching/binary_search.rs function binary_search (line 8) | fn binary_search(nums: &[i32], target: i32) -> i32 { function binary_search_lcro (line 31) | fn binary_search_lcro(nums: &[i32], target: i32) -> i32 { function main (line 54) | pub fn main() { FILE: codes/rust/chapter_searching/binary_search_edge.rs function binary_search_left_edge (line 12) | fn binary_search_left_edge(nums: &[i32], target: i32) -> i32 { function binary_search_right_edge (line 24) | fn binary_search_right_edge(nums: &[i32], target: i32) -> i32 { function main (line 38) | fn main() { FILE: codes/rust/chapter_searching/binary_search_insertion.rs function binary_search_insertion_simple (line 9) | fn binary_search_insertion_simple(nums: &[i32], target: i32) -> i32 { function binary_search_insertion (line 26) | pub fn binary_search_insertion(nums: &[i32], target: i32) -> i32 { function main (line 43) | fn main() { FILE: codes/rust/chapter_searching/hashing_search.rs function hashing_search_array (line 13) | fn hashing_search_array<'a>(map: &'a HashMap, target: i32) -... function hashing_search_linked_list (line 20) | fn hashing_search_linked_list( function main (line 30) | pub fn main() { FILE: codes/rust/chapter_searching/linear_search.rs function linear_search_array (line 12) | fn linear_search_array(nums: &[i32], target: i32) -> i32 { function linear_search_linked_list (line 25) | fn linear_search_linked_list( function main (line 42) | pub fn main() { FILE: codes/rust/chapter_searching/two_sum.rs function two_sum_brute_force (line 11) | pub fn two_sum_brute_force(nums: &Vec, target: i32) -> Option, target: i32) -> Option usize { method quick_sort (line 29) | pub fn quick_sort(left: i32, right: i32, nums: &mut [i32]) { type QuickSortMedian (line 43) | struct QuickSortMedian; method median_three (line 47) | fn median_three(nums: &mut [i32], left: usize, mid: usize, right: usiz... method partition (line 59) | fn partition(nums: &mut [i32], left: usize, right: usize) -> usize { method quick_sort (line 80) | pub fn quick_sort(left: i32, right: i32, nums: &mut [i32]) { type QuickSortTailCall (line 94) | struct QuickSortTailCall; method partition (line 98) | fn partition(nums: &mut [i32], left: usize, right: usize) -> usize { method quick_sort (line 115) | pub fn quick_sort(mut left: i32, mut right: i32, nums: &mut [i32]) { function main (line 133) | fn main() { FILE: codes/rust/chapter_sorting/radix_sort.rs function digit (line 10) | fn digit(num: i32, exp: i32) -> usize { function counting_sort_digit (line 16) | fn counting_sort_digit(nums: &mut [i32], exp: i32) { function radix_sort (line 42) | fn radix_sort(nums: &mut [i32]) { function main (line 54) | fn main() { FILE: codes/rust/chapter_sorting/selection_sort.rs function selection_sort (line 10) | fn selection_sort(nums: &mut [i32]) { function main (line 30) | pub fn main() { FILE: codes/rust/chapter_stack_and_queue/array_deque.rs type ArrayDeque (line 8) | struct ArrayDeque { function new (line 16) | pub fn new(capacity: usize) -> Self { function capacity (line 25) | pub fn capacity(&self) -> usize { function size (line 30) | pub fn size(&self) -> usize { function is_empty (line 35) | pub fn is_empty(&self) -> bool { function index (line 40) | fn index(&self, i: i32) -> usize { function push_first (line 48) | pub fn push_first(&mut self, num: T) { function push_last (line 62) | pub fn push_last(&mut self, num: T) { function pop_first (line 75) | fn pop_first(&mut self) -> T { function pop_last (line 84) | fn pop_last(&mut self) -> T { function peek_first (line 91) | fn peek_first(&self) -> T { function peek_last (line 99) | fn peek_last(&self) -> T { function to_array (line 109) | fn to_array(&self) -> Vec { function main (line 122) | fn main() { FILE: codes/rust/chapter_stack_and_queue/array_queue.rs type ArrayQueue (line 8) | struct ArrayQueue { function new (line 17) | fn new(capacity: i32) -> ArrayQueue { function capacity (line 27) | fn capacity(&self) -> i32 { function size (line 32) | fn size(&self) -> i32 { function is_empty (line 37) | fn is_empty(&self) -> bool { function push (line 42) | fn push(&mut self, num: T) { function pop (line 56) | fn pop(&mut self) -> T { function peek (line 65) | fn peek(&self) -> T { function to_vector (line 73) | fn to_vector(&self) -> Vec { function main (line 86) | fn main() { FILE: codes/rust/chapter_stack_and_queue/array_stack.rs type ArrayStack (line 10) | struct ArrayStack { function new (line 16) | fn new() -> ArrayStack { function size (line 23) | fn size(&self) -> usize { function is_empty (line 28) | fn is_empty(&self) -> bool { function push (line 33) | fn push(&mut self, num: T) { function pop (line 38) | fn pop(&mut self) -> Option { function peek (line 43) | fn peek(&self) -> Option<&T> { function to_array (line 51) | fn to_array(&self) -> &Vec { function main (line 57) | fn main() { FILE: codes/rust/chapter_stack_and_queue/deque.rs function main (line 11) | pub fn main() { FILE: codes/rust/chapter_stack_and_queue/linkedlist_deque.rs type ListNode (line 13) | pub struct ListNode { function new (line 20) | pub fn new(val: T) -> Rc>> { type LinkedListDeque (line 31) | pub struct LinkedListDeque { function new (line 38) | pub fn new() -> Self { function size (line 47) | pub fn size(&self) -> usize { function is_empty (line 52) | pub fn is_empty(&self) -> bool { function push (line 57) | fn push(&mut self, num: T, is_front: bool) { function push_first (line 95) | pub fn push_first(&mut self, num: T) { function push_last (line 100) | pub fn push_last(&mut self, num: T) { function pop (line 105) | fn pop(&mut self, is_front: bool) -> Option { function pop_first (line 145) | pub fn pop_first(&mut self) -> Option { function pop_last (line 150) | pub fn pop_last(&mut self) -> Option { function peek_first (line 155) | pub fn peek_first(&self) -> Option<&Rc>>> { function peek_last (line 160) | pub fn peek_last(&self) -> Option<&Rc>>> { function to_array (line 165) | pub fn to_array(&self, head: Option<&Rc>>>) -> Vec { function main (line 180) | fn main() { FILE: codes/rust/chapter_stack_and_queue/linkedlist_queue.rs type LinkedListQueue (line 14) | pub struct LinkedListQueue { function new (line 21) | pub fn new() -> Self { function size (line 30) | pub fn size(&self) -> usize { function is_empty (line 35) | pub fn is_empty(&self) -> bool { function push (line 40) | pub fn push(&mut self, num: T) { function pop (line 59) | pub fn pop(&mut self) -> Option { function peek (line 75) | pub fn peek(&self) -> Option<&Rc>>> { function to_array (line 80) | pub fn to_array(&self, head: Option<&Rc>>>) -> Vec { function main (line 97) | fn main() { FILE: codes/rust/chapter_stack_and_queue/linkedlist_stack.rs type LinkedListStack (line 14) | pub struct LinkedListStack { function new (line 20) | pub fn new() -> Self { function size (line 28) | pub fn size(&self) -> usize { function is_empty (line 33) | pub fn is_empty(&self) -> bool { function push (line 38) | pub fn push(&mut self, num: T) { function pop (line 46) | pub fn pop(&mut self) -> Option { function peek (line 56) | pub fn peek(&self) -> Option<&Rc>>> { function to_array (line 61) | pub fn to_array(&self) -> Vec { function main (line 76) | fn main() { FILE: codes/rust/chapter_stack_and_queue/queue.rs function main (line 12) | pub fn main() { FILE: codes/rust/chapter_stack_and_queue/stack.rs function main (line 10) | pub fn main() { FILE: codes/rust/chapter_tree/array_binary_tree.rs type ArrayBinaryTree (line 10) | struct ArrayBinaryTree { method new (line 16) | fn new(arr: Vec>) -> Self { method size (line 21) | fn size(&self) -> i32 { method val (line 26) | fn val(&self, i: i32) -> Option { method left (line 36) | fn left(&self, i: i32) -> i32 { method right (line 41) | fn right(&self, i: i32) -> i32 { method parent (line 46) | fn parent(&self, i: i32) -> i32 { method level_order (line 51) | fn level_order(&self) -> Vec { method dfs (line 56) | fn dfs(&self, i: i32, order: &'static str, res: &mut Vec) { method pre_order (line 78) | fn pre_order(&self) -> Vec { method in_order (line 85) | fn in_order(&self) -> Vec { method post_order (line 92) | fn post_order(&self) -> Vec { function main (line 100) | fn main() { FILE: codes/rust/chapter_tree/avl_tree.rs type OptionTreeNodeRc (line 13) | type OptionTreeNodeRc = Option>>; type AVLTree (line 16) | struct AVLTree { method new (line 22) | fn new() -> Self { method height (line 27) | fn height(node: OptionTreeNodeRc) -> i32 { method update_height (line 36) | fn update_height(node: OptionTreeNodeRc) { method balance_factor (line 46) | fn balance_factor(node: OptionTreeNodeRc) -> i32 { method right_rotate (line 58) | fn right_rotate(node: OptionTreeNodeRc) -> OptionTreeNodeRc { method left_rotate (line 77) | fn left_rotate(node: OptionTreeNodeRc) -> OptionTreeNodeRc { method rotate (line 96) | fn rotate(node: OptionTreeNodeRc) -> OptionTreeNodeRc { method insert (line 131) | fn insert(&mut self, val: i32) { method insert_helper (line 136) | fn insert_helper(node: OptionTreeNodeRc, val: i32) -> OptionTreeNodeRc { method remove (line 170) | fn remove(&self, val: i32) { method remove_helper (line 175) | fn remove_helper(node: OptionTreeNodeRc, val: i32) -> OptionTreeNodeRc { method search (line 225) | fn search(&self, val: i32) -> OptionTreeNodeRc { function main (line 250) | fn main() { FILE: codes/rust/chapter_tree/binary_search_tree.rs type OptionTreeNodeRc (line 15) | type OptionTreeNodeRc = Option>>; type BinarySearchTree (line 18) | pub struct BinarySearchTree { method new (line 24) | pub fn new() -> Self { method get_root (line 30) | pub fn get_root(&self) -> OptionTreeNodeRc { method search (line 35) | pub fn search(&self, num: i32) -> OptionTreeNodeRc { method insert (line 54) | pub fn insert(&mut self, num: i32) { method remove (line 90) | pub fn remove(&mut self, num: i32) { function main (line 161) | fn main() { FILE: codes/rust/chapter_tree/binary_tree.rs function main (line 10) | fn main() { FILE: codes/rust/chapter_tree/binary_tree_bfs.rs function level_order (line 14) | fn level_order(root: &Rc>) -> Vec { function main (line 35) | fn main() { FILE: codes/rust/chapter_tree/binary_tree_dfs.rs function pre_order (line 14) | fn pre_order(root: Option<&Rc>>) -> Vec { function in_order (line 32) | fn in_order(root: Option<&Rc>>) -> Vec { function post_order (line 50) | fn post_order(root: Option<&Rc>>) -> Vec { function main (line 69) | fn main() { FILE: codes/rust/src/include/list_node.rs type ListNode (line 12) | pub struct ListNode { function new (line 18) | pub fn new(val: T) -> Rc>> { function arr_to_linked_list (line 23) | pub fn arr_to_linked_list(array: &[T]) -> Option>>> function linked_list_to_hashmap (line 40) | pub fn linked_list_to_hashmap( FILE: codes/rust/src/include/print_util.rs type Trunk (line 15) | struct Trunk<'a, 'b> { function print_array (line 21) | pub fn print_array(nums: &[T]) { function print_hash_map (line 33) | pub fn print_hash_map(map: &HashMap(queue: &VecDeque) { function print_linked_list (line 49) | pub fn print_linked_list(head: &Rc>>) { function print_tree (line 57) | pub fn print_tree(root: &Rc>) { function _print_tree (line 62) | fn _print_tree(root: Option<&Rc>>, prev: Option<&Trunk... function show_trunks (line 89) | fn show_trunks(trunk: Option<&Trunk>) { function print_heap (line 97) | pub fn print_heap(heap: Vec) { FILE: codes/rust/src/include/tree_node.rs type TreeNode (line 12) | pub struct TreeNode { method new (line 22) | pub fn new(val: i32) -> Rc> { function vec_to_tree_dfs (line 59) | fn vec_to_tree_dfs(arr: &[Option], i: usize) -> Option>) -> Option... function tree_to_vec_dfs (line 75) | fn tree_to_vec_dfs(root: Option<&Rc>>, i: usize, res: ... function tree_to_vec (line 88) | pub fn tree_to_vec(root: Option>>) -> Vec Self { function vals_to_vets (line 20) | pub fn vals_to_vets(vals: Vec) -> Vec { function vets_to_vals (line 25) | pub fn vets_to_vals(vets: Vec) -> Vec { FILE: codes/typescript/chapter_array_and_linkedlist/array.ts function randomAccess (line 8) | function randomAccess(nums: number[]): number { function extend (line 19) | function extend(nums: number[], enlarge: number): number[] { function insert (line 31) | function insert(nums: number[], num: number, index: number): void { function remove (line 41) | function remove(nums: number[], index: number): void { function traverse (line 49) | function traverse(nums: number[]): void { function find (line 62) | function find(nums: number[], target: number): number { FILE: codes/typescript/chapter_array_and_linkedlist/linked_list.ts function insert (line 11) | function insert(n0: ListNode, P: ListNode): void { function remove (line 18) | function remove(n0: ListNode): void { function access (line 29) | function access(head: ListNode | null, index: number): ListNode | null { function find (line 40) | function find(head: ListNode | null, target: number): number { FILE: codes/typescript/chapter_array_and_linkedlist/my_list.ts class MyList (line 8) | class MyList { method constructor (line 15) | constructor() { method size (line 20) | public size(): number { method capacity (line 25) | public capacity(): number { method get (line 30) | public get(index: number): number { method set (line 37) | public set(index: number, num: number): void { method add (line 43) | public add(num: number): void { method insert (line 52) | public insert(index: number, num: number): void { method remove (line 68) | public remove(index: number): number { method extendCapacity (line 82) | public extendCapacity(): void { method toArray (line 92) | public toArray(): number[] { FILE: codes/typescript/chapter_backtracking/n_queens.ts function backtrack (line 8) | function backtrack( function nQueens (line 42) | function nQueens(n: number): string[][][] { FILE: codes/typescript/chapter_backtracking/permutations_i.ts function backtrack (line 8) | function backtrack( function permutationsI (line 36) | function permutationsI(nums: number[]): number[][] { FILE: codes/typescript/chapter_backtracking/permutations_ii.ts function backtrack (line 8) | function backtrack( function permutationsII (line 38) | function permutationsII(nums: number[]): number[][] { FILE: codes/typescript/chapter_backtracking/preorder_traversal_i_compact.ts function preOrder (line 12) | function preOrder(root: TreeNode | null, res: TreeNode[]): void { FILE: codes/typescript/chapter_backtracking/preorder_traversal_ii_compact.ts function preOrder (line 12) | function preOrder( FILE: codes/typescript/chapter_backtracking/preorder_traversal_iii_compact.ts function preOrder (line 12) | function preOrder( FILE: codes/typescript/chapter_backtracking/preorder_traversal_iii_template.ts function isSolution (line 12) | function isSolution(state: TreeNode[]): boolean { function recordSolution (line 17) | function recordSolution(state: TreeNode[], res: TreeNode[][]): void { function isValid (line 22) | function isValid(state: TreeNode[], choice: TreeNode): boolean { function makeChoice (line 27) | function makeChoice(state: TreeNode[], choice: TreeNode): void { function undoChoice (line 32) | function undoChoice(state: TreeNode[]): void { function backtrack (line 37) | function backtrack( FILE: codes/typescript/chapter_backtracking/subset_sum_i.ts function backtrack (line 8) | function backtrack( function subsetSumI (line 38) | function subsetSumI(nums: number[], target: number): number[][] { FILE: codes/typescript/chapter_backtracking/subset_sum_i_naive.ts function backtrack (line 8) | function backtrack( function subsetSumINaive (line 36) | function subsetSumINaive(nums: number[], target: number): number[][] { FILE: codes/typescript/chapter_backtracking/subset_sum_ii.ts function backtrack (line 8) | function backtrack( function subsetSumII (line 43) | function subsetSumII(nums: number[], target: number): number[][] { FILE: codes/typescript/chapter_computational_complexity/iteration.ts function forLoop (line 8) | function forLoop(n: number): number { function whileLoop (line 18) | function whileLoop(n: number): number { function whileLoopII (line 30) | function whileLoopII(n: number): number { function nestedForLoop (line 44) | function nestedForLoop(n: number): string { FILE: codes/typescript/chapter_computational_complexity/recursion.ts function recur (line 8) | function recur(n: number): number { function forLoopRecur (line 18) | function forLoopRecur(n: number): number { function tailRecur (line 37) | function tailRecur(n: number, res: number): number { function fib (line 45) | function fib(n: number): number { FILE: codes/typescript/chapter_computational_complexity/space_complexity.ts function constFunc (line 12) | function constFunc(): number { function constant (line 18) | function constant(n: number): void { function linear (line 35) | function linear(n: number): void { function linearRecur (line 51) | function linearRecur(n: number): void { function quadratic (line 58) | function quadratic(n: number): void { function quadraticRecur (line 75) | function quadraticRecur(n: number): number { function buildTree (line 83) | function buildTree(n: number): TreeNode | null { FILE: codes/typescript/chapter_computational_complexity/time_complexity.ts function constant (line 8) | function constant(n: number): number { function linear (line 16) | function linear(n: number): number { function arrayTraversal (line 23) | function arrayTraversal(nums: number[]): number { function quadratic (line 33) | function quadratic(n: number): number { function bubbleSort (line 45) | function bubbleSort(nums: number[]): number { function exponential (line 64) | function exponential(n: number): number { function expRecur (line 79) | function expRecur(n: number): number { function logarithmic (line 85) | function logarithmic(n: number): number { function logRecur (line 95) | function logRecur(n: number): number { function linearLogRecur (line 101) | function linearLogRecur(n: number): number { function factorialRecur (line 111) | function factorialRecur(n: number): number { FILE: codes/typescript/chapter_computational_complexity/worst_best_time_complexity.ts function randomNumbers (line 8) | function randomNumbers(n: number): number[] { function findOne (line 25) | function findOne(nums: number[]): number { FILE: codes/typescript/chapter_divide_and_conquer/binary_search_recur.ts function dfs (line 8) | function dfs(nums: number[], target: number, i: number, j: number): numb... function binarySearch (line 28) | function binarySearch(nums: number[], target: number): number { FILE: codes/typescript/chapter_divide_and_conquer/build_tree.ts function dfs (line 11) | function dfs( function buildTree (line 33) | function buildTree(preorder: number[], inorder: number[]): TreeNode | nu... FILE: codes/typescript/chapter_divide_and_conquer/hanota.ts function move (line 8) | function move(src: number[], tar: number[]): void { function dfs (line 16) | function dfs(i: number, src: number[], buf: number[], tar: number[]): vo... function solveHanota (line 31) | function solveHanota(A: number[], B: number[], C: number[]): void { FILE: codes/typescript/chapter_dynamic_programming/climbing_stairs_backtrack.ts function backtrack (line 8) | function backtrack( function climbingStairsBacktrack (line 27) | function climbingStairsBacktrack(n: number): number { FILE: codes/typescript/chapter_dynamic_programming/climbing_stairs_constraint_dp.ts function climbingStairsConstraintDP (line 8) | function climbingStairsConstraintDP(n: number): number { FILE: codes/typescript/chapter_dynamic_programming/climbing_stairs_dfs.ts function dfs (line 8) | function dfs(i: number): number { function climbingStairsDFS (line 17) | function climbingStairsDFS(n: number): number { FILE: codes/typescript/chapter_dynamic_programming/climbing_stairs_dfs_mem.ts function dfs (line 8) | function dfs(i: number, mem: number[]): number { function climbingStairsDFSMem (line 21) | function climbingStairsDFSMem(n: number): number { FILE: codes/typescript/chapter_dynamic_programming/climbing_stairs_dp.ts function climbingStairsDP (line 8) | function climbingStairsDP(n: number): number { function climbingStairsDPComp (line 23) | function climbingStairsDPComp(n: number): number { FILE: codes/typescript/chapter_dynamic_programming/coin_change.ts function coinChangeDP (line 8) | function coinChangeDP(coins: Array, amt: number): number { function coinChangeDPComp (line 35) | function coinChangeDPComp(coins: Array, amt: number): number { FILE: codes/typescript/chapter_dynamic_programming/coin_change_ii.ts function coinChangeIIDP (line 8) | function coinChangeIIDP(coins: Array, amt: number): number { function coinChangeIIDPComp (line 34) | function coinChangeIIDPComp(coins: Array, amt: number): number { FILE: codes/typescript/chapter_dynamic_programming/edit_distance.ts function editDistanceDFS (line 8) | function editDistanceDFS(s: string, t: string, i: number, j: number): nu... function editDistanceDFSMem (line 31) | function editDistanceDFSMem( function editDistanceDP (line 64) | function editDistanceDP(s: string, t: string): number { function editDistanceDPComp (line 94) | function editDistanceDPComp(s: string, t: string): number { FILE: codes/typescript/chapter_dynamic_programming/knapsack.ts function knapsackDFS (line 8) | function knapsackDFS( function knapsackDFSMem (line 30) | function knapsackDFSMem( function knapsackDP (line 59) | function knapsackDP( function knapsackDPComp (line 88) | function knapsackDPComp( FILE: codes/typescript/chapter_dynamic_programming/min_cost_climbing_stairs_dp.ts function minCostClimbingStairsDP (line 8) | function minCostClimbingStairsDP(cost: Array): number { function minCostClimbingStairsDPComp (line 26) | function minCostClimbingStairsDPComp(cost: Array): number { FILE: codes/typescript/chapter_dynamic_programming/min_path_sum.ts function minPathSumDFS (line 8) | function minPathSumDFS( function minPathSumDFSMem (line 29) | function minPathSumDFSMem( function minPathSumDP (line 56) | function minPathSumDP(grid: Array>): number { function minPathSumDPComp (line 82) | function minPathSumDPComp(grid: Array>): number { FILE: codes/typescript/chapter_dynamic_programming/unbounded_knapsack.ts function unboundedKnapsackDP (line 8) | function unboundedKnapsackDP( function unboundedKnapsackDPComp (line 37) | function unboundedKnapsackDPComp( FILE: codes/typescript/chapter_graph/graph_adjacency_list.ts class GraphAdjList (line 10) | class GraphAdjList { method constructor (line 15) | constructor(edges: Vertex[][]) { method size (line 26) | size(): number { method addEdge (line 31) | addEdge(vet1: Vertex, vet2: Vertex): void { method removeEdge (line 45) | removeEdge(vet1: Vertex, vet2: Vertex): void { method addVertex (line 60) | addVertex(vet: Vertex): void { method removeVertex (line 67) | removeVertex(vet: Vertex): void { method print (line 83) | print(): void { FILE: codes/typescript/chapter_graph/graph_adjacency_matrix.ts class GraphAdjMat (line 8) | class GraphAdjMat { method constructor (line 13) | constructor(vertices: number[], edges: number[][]) { method size (line 28) | size(): number { method addVertex (line 33) | addVertex(val: number): void { method removeVertex (line 50) | removeVertex(index: number): void { method addEdge (line 67) | addEdge(i: number, j: number): void { method removeEdge (line 79) | removeEdge(i: number, j: number): void { method print (line 89) | print(): void { FILE: codes/typescript/chapter_graph/graph_bfs.ts function graphBFS (line 12) | function graphBFS(graph: GraphAdjList, startVet: Vertex): Vertex[] { FILE: codes/typescript/chapter_graph/graph_dfs.ts function dfs (line 11) | function dfs( function graphDFS (line 31) | function graphDFS(graph: GraphAdjList, startVet: Vertex): Vertex[] { FILE: codes/typescript/chapter_greedy/coin_change_greedy.ts function coinChangeGreedy (line 8) | function coinChangeGreedy(coins: number[], amt: number): number { FILE: codes/typescript/chapter_greedy/fractional_knapsack.ts class Item (line 8) | class Item { method constructor (line 12) | constructor(w: number, v: number) { function fractionalKnapsack (line 19) | function fractionalKnapsack(wgt: number[], val: number[], cap: number): ... FILE: codes/typescript/chapter_greedy/max_capacity.ts function maxCapacity (line 8) | function maxCapacity(ht: number[]): number { FILE: codes/typescript/chapter_greedy/max_product_cutting.ts function maxProductCutting (line 8) | function maxProductCutting(n: number): number { FILE: codes/typescript/chapter_hashing/array_hash_map.ts class Pair (line 8) | class Pair { method constructor (line 12) | constructor(key: number, val: string) { class ArrayHashMap (line 19) | class ArrayHashMap { method constructor (line 22) | constructor() { method hashFunc (line 28) | private hashFunc(key: number): number { method get (line 33) | public get(key: number): string | null { method set (line 41) | public set(key: number, val: string) { method delete (line 47) | public delete(key: number) { method entries (line 54) | public entries(): (Pair | null)[] { method keys (line 65) | public keys(): (number | undefined)[] { method values (line 76) | public values(): (string | undefined)[] { method print (line 87) | public print() { FILE: codes/typescript/chapter_hashing/hash_map_chaining.ts class Pair (line 8) | class Pair { method constructor (line 11) | constructor(key: number, val: string) { class HashMapChaining (line 18) | class HashMapChaining { method constructor (line 26) | constructor() { method #hashFunc (line 35) | #hashFunc(key: number): number { method #loadFactor (line 40) | #loadFactor(): number { method get (line 45) | get(key: number): string | null { method put (line 59) | put(key: number, val: string): void { method remove (line 80) | remove(key: number): void { method #extend (line 94) | #extend(): void { method print (line 110) | print(): void { FILE: codes/typescript/chapter_hashing/hash_map_open_addressing.ts class Pair (line 8) | class Pair { method constructor (line 12) | constructor(key: number, val: string) { class HashMapOpenAddressing (line 19) | class HashMapOpenAddressing { method constructor (line 28) | constructor() { method hashFunc (line 38) | private hashFunc(key: number): number { method loadFactor (line 43) | private loadFactor(): number { method findBucket (line 48) | private findBucket(key: number): number { method get (line 78) | get(key: number): string | null { method put (line 93) | put(key: number, val: string): void { method remove (line 114) | remove(key: number): void { method extend (line 128) | private extend(): void { method print (line 144) | print(): void { FILE: codes/typescript/chapter_hashing/simple_hash.ts function addHash (line 8) | function addHash(key: string): number { function mulHash (line 18) | function mulHash(key: string): number { function xorHash (line 28) | function xorHash(key: string): number { function rotHash (line 38) | function rotHash(key: string): number { FILE: codes/typescript/chapter_heap/my_heap.ts class MaxHeap (line 10) | class MaxHeap { method constructor (line 13) | constructor(nums?: number[]) { method left (line 23) | private left(i: number): number { method right (line 28) | private right(i: number): number { method parent (line 33) | private parent(i: number): number { method swap (line 38) | private swap(i: number, j: number): void { method size (line 45) | public size(): number { method isEmpty (line 50) | public isEmpty(): boolean { method peek (line 55) | public peek(): number { method push (line 60) | public push(val: number): void { method siftUp (line 68) | private siftUp(i: number): void { method pop (line 82) | public pop(): number { method siftDown (line 96) | private siftDown(i: number): void { method print (line 114) | public print(): void { method getMaxHeap (line 119) | public getMaxHeap(): number[] { FILE: codes/typescript/chapter_heap/top_k.ts function pushMinHeap (line 10) | function pushMinHeap(maxHeap: MaxHeap, val: number): void { function popMinHeap (line 16) | function popMinHeap(maxHeap: MaxHeap): number { function peekMinHeap (line 22) | function peekMinHeap(maxHeap: MaxHeap): number { function getMinHeap (line 28) | function getMinHeap(maxHeap: MaxHeap): number[] { function topKHeap (line 34) | function topKHeap(nums: number[], k: number): number[] { FILE: codes/typescript/chapter_searching/binary_search.ts function binarySearch (line 8) | function binarySearch(nums: number[], target: number): number { function binarySearchLCRO (line 31) | function binarySearchLCRO(nums: number[], target: number): number { FILE: codes/typescript/chapter_searching/binary_search_edge.ts function binarySearchLeftEdge (line 9) | function binarySearchLeftEdge(nums: Array, target: number): numb... function binarySearchRightEdge (line 21) | function binarySearchRightEdge(nums: Array, target: number): num... FILE: codes/typescript/chapter_searching/binary_search_insertion.ts function binarySearchInsertionSimple (line 8) | function binarySearchInsertionSimple( function binarySearchInsertion (line 29) | function binarySearchInsertion(nums: Array, target: number): num... FILE: codes/typescript/chapter_searching/hashing_search.ts function hashingSearchArray (line 10) | function hashingSearchArray(map: Map, target: number): n... function hashingSearchLinkedList (line 17) | function hashingSearchLinkedList( FILE: codes/typescript/chapter_searching/linear_search.ts function linearSearchArray (line 10) | function linearSearchArray(nums: number[], target: number): number { function linearSearchLinkedList (line 23) | function linearSearchLinkedList( FILE: codes/typescript/chapter_searching/two_sum.ts function twoSumBruteForce (line 8) | function twoSumBruteForce(nums: number[], target: number): number[] { function twoSumHashTable (line 22) | function twoSumHashTable(nums: number[], target: number): number[] { FILE: codes/typescript/chapter_sorting/bubble_sort.ts function bubbleSort (line 8) | function bubbleSort(nums: number[]): void { function bubbleSortWithFlag (line 24) | function bubbleSortWithFlag(nums: number[]): void { FILE: codes/typescript/chapter_sorting/bucket_sort.ts function bucketSort (line 8) | function bucketSort(nums: number[]): void { FILE: codes/typescript/chapter_sorting/counting_sort.ts function countingSortNaive (line 9) | function countingSortNaive(nums: number[]): void { function countingSort (line 29) | function countingSort(nums: number[]): void { FILE: codes/typescript/chapter_sorting/heap_sort.ts function siftDown (line 8) | function siftDown(nums: number[], n: number, i: number): void { function heapSort (line 32) | function heapSort(nums: number[]): void { FILE: codes/typescript/chapter_sorting/insertion_sort.ts function insertionSort (line 8) | function insertionSort(nums: number[]): void { FILE: codes/typescript/chapter_sorting/merge_sort.ts function merge (line 8) | function merge(nums: number[], left: number, mid: number, right: number)... function mergeSort (line 38) | function mergeSort(nums: number[], left: number, right: number): void { FILE: codes/typescript/chapter_sorting/quick_sort.ts class QuickSort (line 8) | class QuickSort { method swap (line 10) | swap(nums: number[], i: number, j: number): void { method partition (line 17) | partition(nums: number[], left: number, right: number): number { method quickSort (line 36) | quickSort(nums: number[], left: number, right: number): void { class QuickSortMedian (line 50) | class QuickSortMedian { method swap (line 52) | swap(nums: number[], i: number, j: number): void { method medianThree (line 59) | medianThree( method partition (line 76) | partition(nums: number[], left: number, right: number): number { method quickSort (line 103) | quickSort(nums: number[], left: number, right: number): void { class QuickSortTailCall (line 117) | class QuickSortTailCall { method swap (line 119) | swap(nums: number[], i: number, j: number): void { method partition (line 126) | partition(nums: number[], left: number, right: number): number { method quickSort (line 144) | quickSort(nums: number[], left: number, right: number): void { FILE: codes/typescript/chapter_sorting/radix_sort.ts function digit (line 8) | function digit(num: number, exp: number): number { function countingSortDigit (line 14) | function countingSortDigit(nums: number[], exp: number): void { function radixSort (line 42) | function radixSort(nums: number[]): void { FILE: codes/typescript/chapter_sorting/selection_sort.ts function selectionSort (line 8) | function selectionSort(nums: number[]): void { FILE: codes/typescript/chapter_stack_and_queue/array_deque.ts class ArrayDeque (line 8) | class ArrayDeque { method constructor (line 14) | constructor(capacity: number) { method capacity (line 21) | capacity(): number { method size (line 26) | size(): number { method isEmpty (line 31) | isEmpty(): boolean { method index (line 36) | index(i: number): number { method pushFirst (line 44) | pushFirst(num: number): void { method pushLast (line 58) | pushLast(num: number): void { method popFirst (line 71) | popFirst(): number { method popLast (line 80) | popLast(): number { method peekFirst (line 87) | peekFirst(): number { method peekLast (line 93) | peekLast(): number { method toArray (line 101) | toArray(): number[] { FILE: codes/typescript/chapter_stack_and_queue/array_queue.ts class ArrayQueue (line 8) | class ArrayQueue { method constructor (line 13) | constructor(capacity: number) { method capacity (line 19) | get capacity(): number { method size (line 24) | get size(): number { method isEmpty (line 29) | isEmpty(): boolean { method push (line 34) | push(num: number): void { method pop (line 48) | pop(): number { method peek (line 57) | peek(): number { method toArray (line 63) | toArray(): number[] { FILE: codes/typescript/chapter_stack_and_queue/array_stack.ts class ArrayStack (line 8) | class ArrayStack { method constructor (line 10) | constructor() { method size (line 15) | get size(): number { method isEmpty (line 20) | isEmpty(): boolean { method push (line 25) | push(num: number): void { method pop (line 30) | pop(): number | undefined { method top (line 36) | top(): number | undefined { method toArray (line 42) | toArray() { FILE: codes/typescript/chapter_stack_and_queue/linkedlist_deque.ts class ListNode (line 8) | class ListNode { method constructor (line 13) | constructor(val: number) { class LinkedListDeque (line 21) | class LinkedListDeque { method constructor (line 26) | constructor() { method pushLast (line 33) | pushLast(val: number): void { method pushFirst (line 49) | pushFirst(val: number): void { method popLast (line 65) | popLast(): number { method popFirst (line 82) | popFirst(): number { method peekLast (line 99) | peekLast(): number { method peekFirst (line 104) | peekFirst(): number { method size (line 109) | size(): number { method isEmpty (line 114) | isEmpty(): boolean { method print (line 119) | print(): void { FILE: codes/typescript/chapter_stack_and_queue/linkedlist_queue.ts class LinkedListQueue (line 10) | class LinkedListQueue { method constructor (line 15) | constructor() { method size (line 21) | get size(): number { method isEmpty (line 26) | isEmpty(): boolean { method push (line 31) | push(num: number): void { method pop (line 47) | pop(): number { method peek (line 57) | peek(): number { method toArray (line 63) | toArray(): number[] { FILE: codes/typescript/chapter_stack_and_queue/linkedlist_stack.ts class LinkedListStack (line 10) | class LinkedListStack { method constructor (line 14) | constructor() { method size (line 19) | get size(): number { method isEmpty (line 24) | isEmpty(): boolean { method push (line 29) | push(num: number): void { method pop (line 37) | pop(): number { method peek (line 46) | peek(): number { method toArray (line 52) | toArray(): number[] { FILE: codes/typescript/chapter_tree/array_binary_tree.ts type Order (line 10) | type Order = 'pre' | 'in' | 'post'; class ArrayBinaryTree (line 13) | class ArrayBinaryTree { method constructor (line 17) | constructor(arr: (number | null)[]) { method size (line 22) | size(): number { method val (line 27) | val(i: number): number | null { method left (line 34) | left(i: number): number { method right (line 39) | right(i: number): number { method parent (line 44) | parent(i: number): number { method levelOrder (line 49) | levelOrder(): number[] { method #dfs (line 59) | #dfs(i: number, order: Order, res: (number | null)[]): void { method preOrder (line 73) | preOrder(): (number | null)[] { method inOrder (line 80) | inOrder(): (number | null)[] { method postOrder (line 87) | postOrder(): (number | null)[] { FILE: codes/typescript/chapter_tree/avl_tree.ts class AVLTree (line 11) | class AVLTree { method constructor (line 14) | constructor() { method height (line 19) | height(node: TreeNode): number { method updateHeight (line 25) | private updateHeight(node: TreeNode): void { method balanceFactor (line 32) | balanceFactor(node: TreeNode): number { method rightRotate (line 40) | private rightRotate(node: TreeNode): TreeNode { method leftRotate (line 54) | private leftRotate(node: TreeNode): TreeNode { method rotate (line 68) | private rotate(node: TreeNode): TreeNode { method insert (line 98) | insert(val: number): void { method insertHelper (line 103) | private insertHelper(node: TreeNode, val: number): TreeNode { method remove (line 121) | remove(val: number): void { method removeHelper (line 126) | private removeHelper(node: TreeNode, val: number): TreeNode { method search (line 161) | search(val: number): TreeNode { function testInsert (line 181) | function testInsert(tree: AVLTree, val: number): void { function testRemove (line 187) | function testRemove(tree: AVLTree, val: number): void { FILE: codes/typescript/chapter_tree/binary_search_tree.ts class BinarySearchTree (line 11) | class BinarySearchTree { method constructor (line 15) | constructor() { method getRoot (line 21) | getRoot(): TreeNode | null { method search (line 26) | search(num: number): TreeNode | null { method insert (line 42) | insert(num: number): void { method remove (line 67) | remove(num: number): void { FILE: codes/typescript/chapter_tree/binary_tree_bfs.ts function levelOrder (line 12) | function levelOrder(root: TreeNode | null): number[] { FILE: codes/typescript/chapter_tree/binary_tree_dfs.ts function preOrder (line 15) | function preOrder(root: TreeNode | null): void { function inOrder (line 26) | function inOrder(root: TreeNode | null): void { function postOrder (line 37) | function postOrder(root: TreeNode | null): void { FILE: codes/typescript/modules/ListNode.ts class ListNode (line 8) | class ListNode { method constructor (line 11) | constructor(val?: number, next?: ListNode | null) { function arrToLinkedList (line 18) | function arrToLinkedList(arr: number[]): ListNode | null { FILE: codes/typescript/modules/PrintUtil.ts function printLinkedList (line 11) | function printLinkedList(head: ListNode | null): void { class Trunk (line 20) | class Trunk { method constructor (line 24) | constructor(prev: Trunk | null, str: string) { function printTree (line 35) | function printTree(root: TreeNode | null) { function printTreeHelper (line 40) | function printTreeHelper( function showTrunks (line 75) | function showTrunks(p: Trunk | null) { function printHeap (line 85) | function printHeap(arr: number[]): void { FILE: codes/typescript/modules/TreeNode.ts class TreeNode (line 8) | class TreeNode { method constructor (line 13) | constructor( function arrToTree (line 27) | function arrToTree(arr: (number | null)[], i: number = 0): TreeNode | nu... FILE: codes/typescript/modules/Vertex.ts class Vertex (line 8) | class Vertex { method constructor (line 10) | constructor(val: number) { method valsToVets (line 15) | public static valsToVets(vals: number[]): Vertex[] { method vetsToVals (line 24) | public static vetsToVals(vets: Vertex[]): number[] { FILE: en/codes/c/chapter_array_and_linkedlist/array.c function randomAccess (line 10) | int randomAccess(int *nums, int size) { function insert (line 35) | void insert(int *nums, int size, int num, int index) { function removeItem (line 46) | void removeItem(int *nums, int size, int index) { function traverse (line 54) | void traverse(int *nums, int size) { function find (line 63) | int find(int *nums, int size, int target) { function main (line 72) | int main() { FILE: en/codes/c/chapter_array_and_linkedlist/linked_list.c function insert (line 10) | void insert(ListNode *n0, ListNode *P) { function removeItem (line 18) | void removeItem(ListNode *n0) { function ListNode (line 30) | ListNode *access(ListNode *head, int index) { function find (line 40) | int find(ListNode *head, int target) { function main (line 52) | int main() { FILE: en/codes/c/chapter_array_and_linkedlist/my_list.c type MyList (line 10) | typedef struct { function MyList (line 20) | MyList *newMyList() { function delMyList (line 30) | void delMyList(MyList *nums) { function size (line 36) | int size(MyList *nums) { function capacity (line 41) | int capacity(MyList *nums) { function get (line 46) | int get(MyList *nums, int index) { function set (line 52) | void set(MyList *nums, int index, int num) { function add (line 58) | void add(MyList *nums, int num) { function insert (line 67) | void insert(MyList *nums, int index, int num) { function removeItem (line 82) | int removeItem(MyList *nums, int index) { function extendCapacity (line 93) | void extendCapacity(MyList *nums) { function main (line 117) | int main() { FILE: en/codes/c/chapter_backtracking/n_queens.c function backtrack (line 12) | void backtrack(int row, int n, char state[MAX_SIZE][MAX_SIZE], char ***r... function main (line 64) | int main() { FILE: en/codes/c/chapter_backtracking/permutations_i.c function backtrack (line 13) | void backtrack(int *state, int stateSize, int *choices, int choicesSize,... function main (line 58) | int main() { FILE: en/codes/c/chapter_backtracking/permutations_ii.c function backtrack (line 13) | void backtrack(int *state, int stateSize, int *choices, int choicesSize,... function main (line 60) | int main() { FILE: en/codes/c/chapter_backtracking/preorder_traversal_i_compact.c function preOrder (line 16) | void preOrder(TreeNode *root) { function main (line 29) | int main() { FILE: en/codes/c/chapter_backtracking/preorder_traversal_ii_compact.c function preOrder (line 18) | void preOrder(TreeNode *root) { function main (line 38) | int main() { FILE: en/codes/c/chapter_backtracking/preorder_traversal_iii_compact.c function preOrder (line 18) | void preOrder(TreeNode *root) { function main (line 39) | int main() { FILE: en/codes/c/chapter_backtracking/preorder_traversal_iii_template.c function isSolution (line 18) | bool isSolution(void) { function recordSolution (line 23) | void recordSolution(void) { function isValid (line 31) | bool isValid(TreeNode *choice) { function makeChoice (line 36) | void makeChoice(TreeNode *choice) { function undoChoice (line 41) | void undoChoice(void) { function backtrack (line 46) | void backtrack(TreeNode *choices[2]) { function main (line 69) | int main() { FILE: en/codes/c/chapter_backtracking/subset_sum_i.c function backtrack (line 22) | void backtrack(int target, int *choices, int choicesSize, int start) { function cmp (line 50) | int cmp(const void *a, const void *b) { function subsetSumI (line 55) | void subsetSumI(int *nums, int numsSize, int target) { function main (line 62) | int main() { FILE: en/codes/c/chapter_backtracking/subset_sum_i_naive.c function backtrack (line 22) | void backtrack(int target, int total, int *choices, int choicesSize) { function subsetSumINaive (line 47) | void subsetSumINaive(int *nums, int numsSize, int target) { function main (line 53) | int main() { FILE: en/codes/c/chapter_backtracking/subset_sum_ii.c function backtrack (line 22) | void backtrack(int target, int *choices, int choicesSize, int start) { function cmp (line 54) | int cmp(const void *a, const void *b) { function subsetSumII (line 59) | void subsetSumII(int *nums, int numsSize, int target) { function main (line 67) | int main() { FILE: en/codes/c/chapter_computational_complexity/iteration.c function forLoop (line 10) | int forLoop(int n) { function whileLoop (line 20) | int whileLoop(int n) { function whileLoopII (line 32) | int whileLoopII(int n) { function main (line 63) | int main() { FILE: en/codes/c/chapter_computational_complexity/recursion.c function recur (line 10) | int recur(int n) { function forLoopRecur (line 21) | int forLoopRecur(int n) { function tailRecur (line 40) | int tailRecur(int n, int res) { function fib (line 49) | int fib(int n) { function main (line 60) | int main() { FILE: en/codes/c/chapter_computational_complexity/space_complexity.c function func (line 10) | int func() { function constant (line 16) | void constant(int n) { type HashTable (line 34) | typedef struct { function linear (line 41) | void linear(int n) { function linearRecur (line 75) | void linearRecur(int n) { function quadratic (line 83) | void quadratic(int n) { function quadraticRecur (line 102) | int quadraticRecur(int n) { function TreeNode (line 113) | TreeNode *buildTree(int n) { function main (line 123) | int main() { FILE: en/codes/c/chapter_computational_complexity/time_complexity.c function constant (line 10) | int constant(int n) { function linear (line 21) | int linear(int n) { function arrayTraversal (line 30) | int arrayTraversal(int *nums, int n) { function quadratic (line 40) | int quadratic(int n) { function bubbleSort (line 52) | int bubbleSort(int *nums, int n) { function exponential (line 71) | int exponential(int n) { function expRecur (line 86) | int expRecur(int n) { function logarithmic (line 93) | int logarithmic(int n) { function logRecur (line 103) | int logRecur(int n) { function linearLogRecur (line 110) | int linearLogRecur(int n) { function factorialRecur (line 121) | int factorialRecur(int n) { function main (line 132) | int main(int argc, char *argv[]) { FILE: en/codes/c/chapter_computational_complexity/worst_best_time_complexity.c function findOne (line 28) | int findOne(int *nums, int n) { function main (line 39) | int main(int argc, char *argv[]) { FILE: en/codes/c/chapter_divide_and_conquer/binary_search_recur.c function dfs (line 10) | int dfs(int nums[], int target, int i, int j) { function binarySearch (line 30) | int binarySearch(int nums[], int target, int numsSize) { function main (line 37) | int main() { FILE: en/codes/c/chapter_divide_and_conquer/build_tree.c function TreeNode (line 13) | TreeNode *dfs(int *preorder, int *inorderMap, int i, int l, int r, int s... function TreeNode (line 33) | TreeNode *buildTree(int *preorder, int preorderSize, int *inorder, int i... function main (line 45) | int main() { FILE: en/codes/c/chapter_divide_and_conquer/hanota.c function move (line 13) | void move(int *src, int *srcSize, int *tar, int *tarSize) { function dfs (line 24) | void dfs(int i, int *src, int *srcSize, int *buf, int *bufSize, int *tar... function solveHanota (line 39) | void solveHanota(int *A, int *ASize, int *B, int *BSize, int *C, int *CS... function main (line 45) | int main() { FILE: en/codes/c/chapter_dynamic_programming/climbing_stairs_backtrack.c function backtrack (line 10) | void backtrack(int *choices, int state, int n, int *res, int len) { function climbingStairsBacktrack (line 27) | int climbingStairsBacktrack(int n) { function main (line 40) | int main() { FILE: en/codes/c/chapter_dynamic_programming/climbing_stairs_constraint_dp.c function climbingStairsConstraintDP (line 10) | int climbingStairsConstraintDP(int n) { function main (line 39) | int main() { FILE: en/codes/c/chapter_dynamic_programming/climbing_stairs_dfs.c function dfs (line 10) | int dfs(int i) { function climbingStairsDFS (line 20) | int climbingStairsDFS(int n) { function main (line 25) | int main() { FILE: en/codes/c/chapter_dynamic_programming/climbing_stairs_dfs_mem.c function dfs (line 10) | int dfs(int i, int *mem) { function climbingStairsDFSMem (line 25) | int climbingStairsDFSMem(int n) { function main (line 37) | int main() { FILE: en/codes/c/chapter_dynamic_programming/climbing_stairs_dp.c function climbingStairsDP (line 10) | int climbingStairsDP(int n) { function climbingStairsDPComp (line 28) | int climbingStairsDPComp(int n) { function main (line 41) | int main() { FILE: en/codes/c/chapter_dynamic_programming/coin_change.c function myMin (line 10) | int myMin(int a, int b) { function coinChangeDP (line 15) | int coinChangeDP(int coins[], int amt, int coinsSize) { function coinChangeDPComp (line 49) | int coinChangeDPComp(int coins[], int amt, int coinsSize) { function main (line 78) | int main() { FILE: en/codes/c/chapter_dynamic_programming/coin_change_ii.c function coinChangeIIDP (line 10) | int coinChangeIIDP(int coins[], int amt, int coinsSize) { function coinChangeIIDPComp (line 43) | int coinChangeIIDPComp(int coins[], int amt, int coinsSize) { function main (line 67) | int main() { FILE: en/codes/c/chapter_dynamic_programming/edit_distance.c function myMin (line 10) | int myMin(int a, int b) { function editDistanceDFS (line 15) | int editDistanceDFS(char *s, char *t, int i, int j) { function editDistanceDFSMem (line 37) | int editDistanceDFSMem(char *s, char *t, int memCols, int **mem, int i, ... function editDistanceDP (line 63) | int editDistanceDP(char *s, char *t, int n, int m) { function editDistanceDPComp (line 96) | int editDistanceDPComp(char *s, char *t, int n, int m) { function main (line 127) | int main() { FILE: en/codes/c/chapter_dynamic_programming/knapsack.c function myMax (line 10) | int myMax(int a, int b) { function knapsackDFS (line 15) | int knapsackDFS(int wgt[], int val[], int i, int c) { function knapsackDFSMem (line 32) | int knapsackDFSMem(int wgt[], int val[], int memCols, int **mem, int i, ... function knapsackDP (line 54) | int knapsackDP(int wgt[], int val[], int cap, int wgtSize) { function knapsackDPComp (line 82) | int knapsackDPComp(int wgt[], int val[], int cap, int wgtSize) { function main (line 103) | int main() { FILE: en/codes/c/chapter_dynamic_programming/min_cost_climbing_stairs_dp.c function myMin (line 10) | int myMin(int a, int b) { function minCostClimbingStairsDP (line 15) | int minCostClimbingStairsDP(int cost[], int costSize) { function minCostClimbingStairsDPComp (line 35) | int minCostClimbingStairsDPComp(int cost[], int costSize) { function main (line 49) | int main() { FILE: en/codes/c/chapter_dynamic_programming/min_path_sum.c function myMin (line 13) | int myMin(int a, int b) { function minPathSumDFS (line 18) | int minPathSumDFS(int grid[MAX_SIZE][MAX_SIZE], int i, int j) { function minPathSumDFSMem (line 35) | int minPathSumDFSMem(int grid[MAX_SIZE][MAX_SIZE], int mem[MAX_SIZE][MAX... function minPathSumDP (line 57) | int minPathSumDP(int grid[MAX_SIZE][MAX_SIZE], int n, int m) { function minPathSumDPComp (line 87) | int minPathSumDPComp(int grid[MAX_SIZE][MAX_SIZE], int n, int m) { function main (line 111) | int main() { FILE: en/codes/c/chapter_dynamic_programming/unbounded_knapsack.c function myMax (line 10) | int myMax(int a, int b) { function unboundedKnapsackDP (line 15) | int unboundedKnapsackDP(int wgt[], int val[], int cap, int wgtSize) { function unboundedKnapsackDPComp (line 43) | int unboundedKnapsackDPComp(int wgt[], int val[], int cap, int wgtSize) { function main (line 66) | int main() { FILE: en/codes/c/chapter_graph/graph_adjacency_list.c type AdjListNode (line 13) | typedef struct AdjListNode { type GraphAdjList (line 19) | typedef struct { function GraphAdjList (line 25) | GraphAdjList *newGraphAdjList() { function delGraphAdjList (line 38) | void delGraphAdjList(GraphAdjList *graph) { function AdjListNode (line 55) | AdjListNode *findNode(GraphAdjList *graph, Vertex *vet) { function addEdgeHelper (line 65) | void addEdgeHelper(AdjListNode *head, Vertex *vet) { function addEdge (line 74) | void addEdge(GraphAdjList *graph, Vertex *vet1, Vertex *vet2) { function removeEdgeHelper (line 84) | void removeEdgeHelper(AdjListNode *head, Vertex *vet) { function removeEdge (line 101) | void removeEdge(GraphAdjList *graph, Vertex *vet1, Vertex *vet2) { function addVertex (line 111) | void addVertex(GraphAdjList *graph, Vertex *vet) { function removeVertex (line 121) | void removeVertex(GraphAdjList *graph, Vertex *vet) { function printGraph (line 159) | void printGraph(const GraphAdjList *graph) { FILE: en/codes/c/chapter_graph/graph_adjacency_list_test.c function main (line 10) | int main() { FILE: en/codes/c/chapter_graph/graph_adjacency_matrix.c type GraphAdjMat (line 13) | typedef struct { function GraphAdjMat (line 20) | GraphAdjMat *newGraphAdjMat() { function delGraphAdjMat (line 32) | void delGraphAdjMat(GraphAdjMat *graph) { function addVertex (line 37) | void addVertex(GraphAdjMat *graph, int val) { function removeVertex (line 52) | void removeVertex(GraphAdjMat *graph, int index) { function addEdge (line 78) | void addEdge(GraphAdjMat *graph, int i, int j) { function removeEdge (line 89) | void removeEdge(GraphAdjMat *graph, int i, int j) { function printGraphAdjMat (line 99) | void printGraphAdjMat(GraphAdjMat *graph) { function main (line 109) | int main() { FILE: en/codes/c/chapter_graph/graph_bfs.c type Queue (line 13) | typedef struct { function Queue (line 19) | Queue *newQueue() { function isEmpty (line 26) | int isEmpty(Queue *q) { function enqueue (line 31) | void enqueue(Queue *q, Vertex *vet) { function Vertex (line 38) | Vertex *dequeue(Queue *q) { function isVisited (line 46) | int isVisited(Vertex **visited, int size, Vertex *vet) { function graphBFS (line 57) | void graphBFS(GraphAdjList *graph, Vertex *startVet, Vertex **res, int *... function main (line 82) | int main() { FILE: en/codes/c/chapter_graph/graph_dfs.c function isVisited (line 13) | int isVisited(Vertex **res, int size, Vertex *vet) { function dfs (line 24) | void dfs(GraphAdjList *graph, Vertex **res, int *resSize, Vertex *vet) { function graphDFS (line 41) | void graphDFS(GraphAdjList *graph, Vertex *startVet, Vertex **res, int *... function main (line 46) | int main() { FILE: en/codes/c/chapter_greedy/coin_change_greedy.c function coinChangeGreedy (line 10) | int coinChangeGreedy(int *coins, int size, int amt) { function main (line 29) | int main() { FILE: en/codes/c/chapter_greedy/fractional_knapsack.c type Item (line 10) | typedef struct { function sortByValueDensity (line 16) | int sortByValueDensity(const void *a, const void *b) { function fractionalKnapsack (line 23) | float fractionalKnapsack(int wgt[], int val[], int itemCount, int cap) { function main (line 50) | int main(void) { FILE: en/codes/c/chapter_greedy/max_capacity.c function myMin (line 10) | int myMin(int a, int b) { function myMax (line 14) | int myMax(int a, int b) { function maxCapacity (line 19) | int maxCapacity(int ht[], int htLength) { function main (line 41) | int main(void) { FILE: en/codes/c/chapter_greedy/max_product_cutting.c function maxProductCutting (line 10) | int maxProductCutting(int n) { function main (line 31) | int main(void) { FILE: en/codes/c/chapter_hashing/array_hash_map.c type Pair (line 13) | typedef struct { type MapSet (line 19) | typedef struct { type ArrayHashMap (line 25) | typedef struct { function ArrayHashMap (line 30) | ArrayHashMap *newArrayHashMap() { function delArrayHashMap (line 39) | void delArrayHashMap(ArrayHashMap *hmap) { function hashFunc (line 50) | int hashFunc(int key) { function put (line 65) | void put(ArrayHashMap *hmap, const int key, const char *val) { function removeItem (line 76) | void removeItem(ArrayHashMap *hmap, const int key) { function pairSet (line 84) | void pairSet(ArrayHashMap *hmap, MapSet *set) { function keySet (line 108) | void keySet(ArrayHashMap *hmap, MapSet *set) { function valueSet (line 130) | void valueSet(ArrayHashMap *hmap, MapSet *set) { function print (line 152) | void print(ArrayHashMap *hmap) { function main (line 164) | int main() { FILE: en/codes/c/chapter_hashing/hash_map_chaining.c type Pair (line 15) | typedef struct { type Node (line 21) | typedef struct Node { type HashMapChaining (line 27) | typedef struct { function HashMapChaining (line 36) | HashMapChaining *newHashMapChaining() { function delHashMapChaining (line 50) | void delHashMapChaining(HashMapChaining *hashMap) { function hashFunc (line 65) | int hashFunc(HashMapChaining *hashMap, int key) { function loadFactor (line 70) | double loadFactor(HashMapChaining *hashMap) { function extend (line 92) | void extend(HashMapChaining *hashMap) { function put (line 120) | void put(HashMapChaining *hashMap, int key, const char *val) { function removeItem (line 147) | void removeItem(HashMapChaining *hashMap, int key) { function print (line 171) | void print(HashMapChaining *hashMap) { function main (line 184) | int main() { FILE: en/codes/c/chapter_hashing/hash_map_open_addressing.c type Pair (line 10) | typedef struct { type HashMapOpenAddressing (line 16) | typedef struct { function HashMapOpenAddressing (line 29) | HashMapOpenAddressing *newHashMapOpenAddressing() { function delHashMapOpenAddressing (line 44) | void delHashMapOpenAddressing(HashMapOpenAddressing *hashMap) { function hashFunc (line 58) | int hashFunc(HashMapOpenAddressing *hashMap, int key) { function loadFactor (line 63) | double loadFactor(HashMapOpenAddressing *hashMap) { function findBucket (line 68) | int findBucket(HashMapOpenAddressing *hashMap, int key) { function put (line 107) | void put(HashMapOpenAddressing *hashMap, int key, char *val) { function removeItem (line 134) | void removeItem(HashMapOpenAddressing *hashMap, int key) { function extend (line 148) | void extend(HashMapOpenAddressing *hashMap) { function print (line 169) | void print(HashMapOpenAddressing *hashMap) { function main (line 183) | int main() { FILE: en/codes/c/chapter_hashing/simple_hash.c function addHash (line 10) | int addHash(char *key) { function mulHash (line 20) | int mulHash(char *key) { function xorHash (line 30) | int xorHash(char *key) { function rotHash (line 41) | int rotHash(char *key) { function main (line 52) | int main() { FILE: en/codes/c/chapter_heap/my_heap.c type MaxHeap (line 12) | typedef struct { function MaxHeap (line 25) | MaxHeap *newMaxHeap(int nums[], int size) { function delMaxHeap (line 38) | void delMaxHeap(MaxHeap *maxHeap) { function left (line 44) | int left(MaxHeap *maxHeap, int i) { function right (line 49) | int right(MaxHeap *maxHeap, int i) { function parent (line 54) | int parent(MaxHeap *maxHeap, int i) { function swap (line 59) | void swap(MaxHeap *maxHeap, int i, int j) { function size (line 66) | int size(MaxHeap *maxHeap) { function isEmpty (line 71) | int isEmpty(MaxHeap *maxHeap) { function peek (line 76) | int peek(MaxHeap *maxHeap) { function push (line 81) | void push(MaxHeap *maxHeap, int val) { function pop (line 96) | int pop(MaxHeap *maxHeap) { function siftDown (line 115) | void siftDown(MaxHeap *maxHeap, int i) { function siftUp (line 139) | void siftUp(MaxHeap *maxHeap, int i) { FILE: en/codes/c/chapter_heap/my_heap_test.c function main (line 10) | int main() { FILE: en/codes/c/chapter_heap/top_k.c function pushMinHeap (line 10) | void pushMinHeap(MaxHeap *maxHeap, int val) { function popMinHeap (line 16) | int popMinHeap(MaxHeap *maxHeap) { function peekMinHeap (line 22) | int peekMinHeap(MaxHeap *maxHeap) { function main (line 62) | int main() { FILE: en/codes/c/chapter_searching/binary_search.c function binarySearch (line 10) | int binarySearch(int *nums, int len, int target) { function binarySearchLCRO (line 28) | int binarySearchLCRO(int *nums, int len, int target) { function main (line 46) | int main() { FILE: en/codes/c/chapter_searching/binary_search_edge.c function binarySearchInsertion (line 10) | int binarySearchInsertion(int *nums, int numSize, int target) { function binarySearchLeftEdge (line 25) | int binarySearchLeftEdge(int *nums, int numSize, int target) { function binarySearchRightEdge (line 37) | int binarySearchRightEdge(int *nums, int numSize, int target) { function main (line 51) | int main() { FILE: en/codes/c/chapter_searching/binary_search_insertion.c function binarySearchInsertionSimple (line 10) | int binarySearchInsertionSimple(int *nums, int numSize, int target) { function binarySearchInsertion (line 27) | int binarySearchInsertion(int *nums, int numSize, int target) { function main (line 44) | int main() { FILE: en/codes/c/chapter_searching/two_sum.c type HashTable (line 26) | typedef struct { function HashTable (line 33) | HashTable *find(HashTable *h, int key) { function insert (line 40) | void insert(HashTable **h, int key, int val) { function main (line 69) | int main() { FILE: en/codes/c/chapter_sorting/bubble_sort.c function bubbleSort (line 10) | void bubbleSort(int nums[], int size) { function bubbleSortWithFlag (line 25) | void bubbleSortWithFlag(int nums[], int size) { function main (line 44) | int main() { FILE: en/codes/c/chapter_sorting/bucket_sort.c function compare (line 12) | int compare(const void *a, const void *b) { function bucketSort (line 19) | void bucketSort(float nums[], int n) { function main (line 49) | int main() { FILE: en/codes/c/chapter_sorting/counting_sort.c function countingSortNaive (line 11) | void countingSortNaive(int nums[], int size) { function countingSort (line 38) | void countingSort(int nums[], int size) { function main (line 73) | int main() { FILE: en/codes/c/chapter_sorting/heap_sort.c function siftDown (line 10) | void siftDown(int nums[], int n, int i) { function heapSort (line 34) | void heapSort(int nums[], int n) { function main (line 51) | int main() { FILE: en/codes/c/chapter_sorting/insertion_sort.c function insertionSort (line 10) | void insertionSort(int nums[], int size) { function main (line 26) | int main() { FILE: en/codes/c/chapter_sorting/merge_sort.c function merge (line 10) | void merge(int *nums, int left, int mid, int right) { function mergeSort (line 41) | void mergeSort(int *nums, int left, int right) { function main (line 54) | int main() { FILE: en/codes/c/chapter_sorting/quick_sort.c function swap (line 10) | void swap(int nums[], int i, int j) { function partition (line 17) | int partition(int nums[], int left, int right) { function quickSort (line 37) | void quickSort(int nums[], int left, int right) { function medianThree (line 52) | int medianThree(int nums[], int left, int mid, int right) { function partitionMedian (line 62) | int partitionMedian(int nums[], int left, int right) { function quickSortMedian (line 81) | void quickSortMedian(int nums[], int left, int right) { function quickSortTailCall (line 95) | void quickSortTailCall(int nums[], int left, int right) { function main (line 116) | int main() { FILE: en/codes/c/chapter_sorting/radix_sort.c function digit (line 10) | int digit(int num, int exp) { function countingSortDigit (line 16) | void countingSortDigit(int nums[], int size, int exp) { function radixSort (line 49) | void radixSort(int nums[], int size) { function main (line 67) | int main() { FILE: en/codes/c/chapter_sorting/selection_sort.c function selectionSort (line 10) | void selectionSort(int nums[], int n) { function main (line 27) | int main() { FILE: en/codes/c/chapter_stack_and_queue/array_deque.c type ArrayDeque (line 10) | typedef struct { function ArrayDeque (line 18) | ArrayDeque *newArrayDeque(int capacity) { function delArrayDeque (line 28) | void delArrayDeque(ArrayDeque *deque) { function capacity (line 34) | int capacity(ArrayDeque *deque) { function size (line 39) | int size(ArrayDeque *deque) { function empty (line 44) | bool empty(ArrayDeque *deque) { function dequeIndex (line 49) | int dequeIndex(ArrayDeque *deque, int i) { function pushFirst (line 57) | void pushFirst(ArrayDeque *deque, int num) { function pushLast (line 71) | void pushLast(ArrayDeque *deque, int num) { function peekFirst (line 84) | int peekFirst(ArrayDeque *deque) { function peekLast (line 91) | int peekLast(ArrayDeque *deque) { function popFirst (line 99) | int popFirst(ArrayDeque *deque) { function popLast (line 108) | int popLast(ArrayDeque *deque) { function main (line 127) | int main() { FILE: en/codes/c/chapter_stack_and_queue/array_queue.c type ArrayQueue (line 10) | typedef struct { function ArrayQueue (line 18) | ArrayQueue *newArrayQueue(int capacity) { function delArrayQueue (line 28) | void delArrayQueue(ArrayQueue *queue) { function capacity (line 34) | int capacity(ArrayQueue *queue) { function size (line 39) | int size(ArrayQueue *queue) { function empty (line 44) | bool empty(ArrayQueue *queue) { function peek (line 49) | int peek(ArrayQueue *queue) { function push (line 55) | void push(ArrayQueue *queue, int num) { function pop (line 69) | int pop(ArrayQueue *queue) { function main (line 90) | int main() { FILE: en/codes/c/chapter_stack_and_queue/array_stack.c type ArrayStack (line 12) | typedef struct { function ArrayStack (line 18) | ArrayStack *newArrayStack() { function delArrayStack (line 27) | void delArrayStack(ArrayStack *stack) { function size (line 33) | int size(ArrayStack *stack) { function isEmpty (line 38) | bool isEmpty(ArrayStack *stack) { function push (line 43) | void push(ArrayStack *stack, int num) { function peek (line 53) | int peek(ArrayStack *stack) { function pop (line 62) | int pop(ArrayStack *stack) { function main (line 69) | int main() { FILE: en/codes/c/chapter_stack_and_queue/linkedlist_deque.c type DoublyListNode (line 10) | typedef struct DoublyListNode { function DoublyListNode (line 17) | DoublyListNode *newDoublyListNode(int num) { function delDoublyListNode (line 26) | void delDoublyListNode(DoublyListNode *node) { type LinkedListDeque (line 31) | typedef struct { function LinkedListDeque (line 37) | LinkedListDeque *newLinkedListDeque() { function delLinkedListdeque (line 46) | void delLinkedListdeque(LinkedListDeque *deque) { function size (line 58) | int size(LinkedListDeque *deque) { function empty (line 63) | bool empty(LinkedListDeque *deque) { function push (line 68) | void push(LinkedListDeque *deque, int num, bool isFront) { function pushFirst (line 92) | void pushFirst(LinkedListDeque *deque, int num) { function pushLast (line 97) | void pushLast(LinkedListDeque *deque, int num) { function peekFirst (line 102) | int peekFirst(LinkedListDeque *deque) { function peekLast (line 108) | int peekLast(LinkedListDeque *deque) { function pop (line 114) | int pop(LinkedListDeque *deque, bool isFront) { function popFirst (line 145) | int popFirst(LinkedListDeque *deque) { function popLast (line 150) | int popLast(LinkedListDeque *deque) { function printLinkedListDeque (line 155) | void printLinkedListDeque(LinkedListDeque *deque) { function main (line 169) | int main() { FILE: en/codes/c/chapter_stack_and_queue/linkedlist_queue.c type LinkedListQueue (line 10) | typedef struct { function LinkedListQueue (line 16) | LinkedListQueue *newLinkedListQueue() { function delLinkedListQueue (line 25) | void delLinkedListQueue(LinkedListQueue *queue) { function size (line 37) | int size(LinkedListQueue *queue) { function empty (line 42) | bool empty(LinkedListQueue *queue) { function push (line 47) | void push(LinkedListQueue *queue, int num) { function peek (line 64) | int peek(LinkedListQueue *queue) { function pop (line 70) | int pop(LinkedListQueue *queue) { function printLinkedListQueue (line 80) | void printLinkedListQueue(LinkedListQueue *queue) { function main (line 94) | int main() { FILE: en/codes/c/chapter_stack_and_queue/linkedlist_stack.c type LinkedListStack (line 10) | typedef struct { function LinkedListStack (line 16) | LinkedListStack *newLinkedListStack() { function delLinkedListStack (line 24) | void delLinkedListStack(LinkedListStack *s) { function size (line 34) | int size(LinkedListStack *s) { function isEmpty (line 39) | bool isEmpty(LinkedListStack *s) { function push (line 44) | void push(LinkedListStack *s, int num) { function peek (line 53) | int peek(LinkedListStack *s) { function pop (line 62) | int pop(LinkedListStack *s) { function main (line 73) | int main() { FILE: en/codes/c/chapter_tree/array_binary_tree.c type ArrayBinaryTree (line 10) | typedef struct { function ArrayBinaryTree (line 16) | ArrayBinaryTree *newArrayBinaryTree(int *arr, int arrSize) { function delArrayBinaryTree (line 25) | void delArrayBinaryTree(ArrayBinaryTree *abt) { function size (line 31) | int size(ArrayBinaryTree *abt) { function val (line 36) | int val(ArrayBinaryTree *abt, int i) { function left (line 44) | int left(int i) { function right (line 49) | int right(int i) { function parent (line 54) | int parent(int i) { function dfs (line 72) | void dfs(ArrayBinaryTree *abt, int i, char *order, int *res, int *index) { function main (line 117) | int main() { FILE: en/codes/c/chapter_tree/avl_tree.c type AVLTree (line 10) | typedef struct { function AVLTree (line 15) | AVLTree *newAVLTree() { function delAVLTree (line 22) | void delAVLTree(AVLTree *tree) { function height (line 28) | int height(TreeNode *node) { function updateHeight (line 37) | void updateHeight(TreeNode *node) { function balanceFactor (line 49) | int balanceFactor(TreeNode *node) { function TreeNode (line 59) | TreeNode *rightRotate(TreeNode *node) { function TreeNode (line 74) | TreeNode *leftRotate(TreeNode *node) { function TreeNode (line 89) | TreeNode *rotate(TreeNode *node) { function TreeNode (line 119) | TreeNode *insertHelper(TreeNode *node, int val) { function insert (line 141) | void insert(AVLTree *tree, int val) { function TreeNode (line 146) | TreeNode *removeHelper(TreeNode *node, int val) { function removeItem (line 190) | void removeItem(AVLTree *tree, int val) { function TreeNode (line 195) | TreeNode *search(AVLTree *tree, int val) { function testInsert (line 214) | void testInsert(AVLTree *tree, int val) { function testRemove (line 220) | void testRemove(AVLTree *tree, int val) { function main (line 227) | int main() { FILE: en/codes/c/chapter_tree/binary_search_tree.c type BinarySearchTree (line 10) | typedef struct { function BinarySearchTree (line 15) | BinarySearchTree *newBinarySearchTree() { function delBinarySearchTree (line 23) | void delBinarySearchTree(BinarySearchTree *bst) { function TreeNode (line 29) | TreeNode *getRoot(BinarySearchTree *bst) { function TreeNode (line 34) | TreeNode *search(BinarySearchTree *bst, int num) { function insert (line 54) | void insert(BinarySearchTree *bst, int num) { function removeItem (line 87) | void removeItem(BinarySearchTree *bst, int num) { function main (line 138) | int main() { FILE: en/codes/c/chapter_tree/binary_tree.c function main (line 10) | int main() { FILE: en/codes/c/chapter_tree/binary_tree_bfs.c function main (line 54) | int main() { FILE: en/codes/c/chapter_tree/binary_tree_dfs.c function preOrder (line 15) | void preOrder(TreeNode *root, int *size) { function inOrder (line 25) | void inOrder(TreeNode *root, int *size) { function postOrder (line 35) | void postOrder(TreeNode *root, int *size) { function main (line 45) | int main() { FILE: en/codes/c/utils/common_test.c function testListNode (line 9) | void testListNode() { function testTreeNode (line 16) | void testTreeNode() { function main (line 29) | int main(int argc, char *argv[]) { FILE: en/codes/c/utils/list_node.h type ListNode (line 15) | typedef struct ListNode { function ListNode (line 21) | ListNode *newListNode(int val) { function ListNode (line 30) | ListNode *arrToLinkedList(const int *arr, size_t size) { function freeMemoryLinkedList (line 45) | void freeMemoryLinkedList(ListNode *cur) { FILE: en/codes/c/utils/print_util.h function printArray (line 22) | void printArray(int arr[], int size) { function printArrayFloat (line 35) | void printArrayFloat(float arr[], int size) { function printLinkedList (line 48) | void printLinkedList(ListNode *node) { type Trunk (line 59) | typedef struct Trunk { function Trunk (line 64) | Trunk *newTrunk(Trunk *prev, char *str) { function showTrunks (line 72) | void showTrunks(Trunk *trunk) { function printTreeHelper (line 85) | void printTreeHelper(TreeNode *node, Trunk *prev, bool isRight) { function printTree (line 113) | void printTree(TreeNode *root) { function printHeap (line 118) | void printHeap(int arr[], int size) { FILE: en/codes/c/utils/tree_node.h type TreeNode (line 19) | typedef struct TreeNode { function TreeNode (line 27) | TreeNode *newTreeNode(int val) { function TreeNode (line 55) | TreeNode *arrayToTreeDFS(int *arr, int size, int i) { function TreeNode (line 67) | TreeNode *arrayToTree(int *arr, int size) { function treeToArrayDFS (line 72) | void treeToArrayDFS(TreeNode *root, int i, int *res, int *size) { function freeMemoryTree (line 95) | void freeMemoryTree(TreeNode *root) { FILE: en/codes/c/utils/uthash.h type UT_hash_bucket (line 1072) | typedef struct UT_hash_bucket { type UT_hash_table (line 1096) | typedef struct UT_hash_table { type UT_hash_handle (line 1129) | typedef struct UT_hash_handle { FILE: en/codes/c/utils/vector.h type vector (line 15) | typedef struct vector { function vector (line 23) | vector *newVector() { function vector (line 33) | vector *_newVector(int size, void *elem, int elemSize) { function delVector (line 48) | void delVector(vector *v) { function vectorPushback (line 67) | void vectorPushback(vector *v, void *elem, int elemSize) { function vectorPopback (line 78) | void vectorPopback(vector *v) { function vectorClear (line 86) | void vectorClear(vector *v) { function vectorSize (line 95) | int vectorSize(vector *v) { function vectorSet (line 120) | void vectorSet(vector *v, int pos, void *elem, int elemSize) { function vectorExpand (line 132) | void vectorExpand(vector *v) { function vectorShrink (line 138) | void vectorShrink(vector *v) { function vectorInsert (line 144) | void vectorInsert(vector *v, int pos, void *elem, int elemSize) { function vectorErase (line 158) | void vectorErase(vector *v, int pos) { function vectorSwap (line 169) | void vectorSwap(vector *v, int i, int j) { function vectorEmpty (line 176) | bool vectorEmpty(vector *v) { function vectorFull (line 181) | bool vectorFull(vector *v) { function vectorEqual (line 186) | bool vectorEqual(vector *v1, vector *v2) { function vectorSort (line 203) | void vectorSort(vector *v, int (*cmp)(const void *, const void *)) { function printVector (line 209) | void printVector(vector *v, void (*printFunc)(vector *v, void *p)) { function printVectorMatrix (line 239) | void printVectorMatrix(vector *vv, void (*printFunc)(vector *v, void *p)) { FILE: en/codes/c/utils/vertex.h type Vertex (line 15) | typedef struct { function Vertex (line 20) | Vertex *newVertex(int val) { function Vertex (line 28) | Vertex **valsToVets(int *vals, int size) { FILE: en/codes/cpp/chapter_array_and_linkedlist/array.cpp function randomAccess (line 10) | int randomAccess(int *nums, int size) { function insert (line 33) | void insert(int *nums, int size, int num, int index) { function remove (line 43) | void remove(int *nums, int size, int index) { function traverse (line 51) | void traverse(int *nums, int size) { function find (line 60) | int find(int *nums, int size, int target) { function main (line 69) | int main() { FILE: en/codes/cpp/chapter_array_and_linkedlist/linked_list.cpp function insert (line 10) | void insert(ListNode *n0, ListNode *P) { function remove (line 17) | void remove(ListNode *n0) { function ListNode (line 29) | ListNode *access(ListNode *head, int index) { function find (line 39) | int find(ListNode *head, int target) { function main (line 51) | int main() { FILE: en/codes/cpp/chapter_array_and_linkedlist/list.cpp function main (line 10) | int main() { FILE: en/codes/cpp/chapter_array_and_linkedlist/my_list.cpp class MyList (line 10) | class MyList { method MyList (line 19) | MyList() { method size (line 29) | int size() { method capacity (line 34) | int capacity() { method get (line 39) | int get(int index) { method set (line 47) | void set(int index, int num) { method add (line 54) | void add(int num) { method insert (line 64) | void insert(int index, int num) { method remove (line 80) | int remove(int index) { method extendCapacity (line 95) | void extendCapacity() { method toVector (line 110) | vector toVector() { function main (line 121) | int main() { FILE: en/codes/cpp/chapter_backtracking/n_queens.cpp function backtrack (line 10) | void backtrack(int row, int n, vector> &state, vector>> nQueens(int n) { function main (line 51) | int main() { FILE: en/codes/cpp/chapter_backtracking/permutations_i.cpp function backtrack (line 10) | void backtrack(vector &state, const vector &choices, vector> permutationsI(vector nums) { function main (line 43) | int main() { FILE: en/codes/cpp/chapter_backtracking/permutations_ii.cpp function backtrack (line 10) | void backtrack(vector &state, const vector &choices, vector> permutationsII(vector nums) { function main (line 45) | int main() { FILE: en/codes/cpp/chapter_backtracking/preorder_traversal_i_compact.cpp function preOrder (line 12) | void preOrder(TreeNode *root) { function main (line 25) | int main() { FILE: en/codes/cpp/chapter_backtracking/preorder_traversal_ii_compact.cpp function preOrder (line 13) | void preOrder(TreeNode *root) { function main (line 30) | int main() { FILE: en/codes/cpp/chapter_backtracking/preorder_traversal_iii_compact.cpp function preOrder (line 13) | void preOrder(TreeNode *root) { function main (line 31) | int main() { FILE: en/codes/cpp/chapter_backtracking/preorder_traversal_iii_template.cpp function isSolution (line 10) | bool isSolution(vector &state) { function recordSolution (line 15) | void recordSolution(vector &state, vector... function isValid (line 20) | bool isValid(vector &state, TreeNode *choice) { function makeChoice (line 25) | void makeChoice(vector &state, TreeNode *choice) { function undoChoice (line 30) | void undoChoice(vector &state, TreeNode *choice) { function backtrack (line 35) | void backtrack(vector &state, vector &choices, v... function main (line 57) | int main() { FILE: en/codes/cpp/chapter_backtracking/subset_sum_i.cpp function backtrack (line 10) | void backtrack(vector &state, int target, vector &choices, int... function subsetSumI (line 34) | vector> subsetSumI(vector &nums, int target) { function main (line 44) | int main() { FILE: en/codes/cpp/chapter_backtracking/subset_sum_i_naive.cpp function backtrack (line 10) | void backtrack(vector &state, int target, int total, vector &c... function subsetSumINaive (line 32) | vector> subsetSumINaive(vector &nums, int target) { function main (line 41) | int main() { FILE: en/codes/cpp/chapter_backtracking/subset_sum_ii.cpp function backtrack (line 10) | void backtrack(vector &state, int target, vector &choices, int... function subsetSumII (line 39) | vector> subsetSumII(vector &nums, int target) { function main (line 49) | int main() { FILE: en/codes/cpp/chapter_computational_complexity/iteration.cpp function forLoop (line 10) | int forLoop(int n) { function whileLoop (line 20) | int whileLoop(int n) { function whileLoopII (line 32) | int whileLoopII(int n) { function string (line 46) | string nestedForLoop(int n) { function main (line 59) | int main() { FILE: en/codes/cpp/chapter_computational_complexity/recursion.cpp function recur (line 10) | int recur(int n) { function forLoopRecur (line 21) | int forLoopRecur(int n) { function tailRecur (line 41) | int tailRecur(int n, int res) { function fib (line 50) | int fib(int n) { function main (line 61) | int main() { FILE: en/codes/cpp/chapter_computational_complexity/space_complexity.cpp function func (line 10) | int func() { function constant (line 16) | void constant(int n) { function linear (line 33) | void linear(int n) { function linearRecur (line 49) | void linearRecur(int n) { function quadratic (line 57) | void quadratic(int n) { function quadraticRecur (line 70) | int quadraticRecur(int n) { function TreeNode (line 79) | TreeNode *buildTree(int n) { function main (line 89) | int main() { FILE: en/codes/cpp/chapter_computational_complexity/time_complexity.cpp function constant (line 10) | int constant(int n) { function linear (line 19) | int linear(int n) { function arrayTraversal (line 27) | int arrayTraversal(vector &nums) { function quadratic (line 37) | int quadratic(int n) { function bubbleSort (line 49) | int bubbleSort(vector &nums) { function exponential (line 68) | int exponential(int n) { function expRecur (line 82) | int expRecur(int n) { function logarithmic (line 89) | int logarithmic(int n) { function logRecur (line 99) | int logRecur(int n) { function linearLogRecur (line 106) | int linearLogRecur(int n) { function factorialRecur (line 117) | int factorialRecur(int n) { function main (line 129) | int main() { FILE: en/codes/cpp/chapter_computational_complexity/worst_best_time_complexity.cpp function randomNumbers (line 10) | vector randomNumbers(int n) { function findOne (line 24) | int findOne(vector &nums) { function main (line 35) | int main() { FILE: en/codes/cpp/chapter_divide_and_conquer/binary_search_recur.cpp function dfs (line 10) | int dfs(vector &nums, int target, int i, int j) { function binarySearch (line 30) | int binarySearch(vector &nums, int target) { function main (line 37) | int main() { FILE: en/codes/cpp/chapter_divide_and_conquer/build_tree.cpp function TreeNode (line 10) | TreeNode *dfs(vector &preorder, unordered_map &inorderMap... function TreeNode (line 27) | TreeNode *buildTree(vector &preorder, vector &inorder) { function main (line 38) | int main() { FILE: en/codes/cpp/chapter_divide_and_conquer/hanota.cpp function move (line 10) | void move(vector &src, vector &tar) { function dfs (line 19) | void dfs(int i, vector &src, vector &buf, vector &tar) { function solveHanota (line 34) | void solveHanota(vector &A, vector &B, vector &C) { function main (line 41) | int main() { FILE: en/codes/cpp/chapter_dynamic_programming/climbing_stairs_backtrack.cpp function backtrack (line 11) | void backtrack(vector &choices, int state, int n, vector &res) { function climbingStairsBacktrack (line 27) | int climbingStairsBacktrack(int n) { function main (line 36) | int main() { FILE: en/codes/cpp/chapter_dynamic_programming/climbing_stairs_constraint_dp.cpp function climbingStairsConstraintDP (line 10) | int climbingStairsConstraintDP(int n) { function main (line 30) | int main() { FILE: en/codes/cpp/chapter_dynamic_programming/climbing_stairs_dfs.cpp function dfs (line 10) | int dfs(int i) { function climbingStairsDFS (line 20) | int climbingStairsDFS(int n) { function main (line 25) | int main() { FILE: en/codes/cpp/chapter_dynamic_programming/climbing_stairs_dfs_mem.cpp function dfs (line 10) | int dfs(int i, vector &mem) { function climbingStairsDFSMem (line 25) | int climbingStairsDFSMem(int n) { function main (line 32) | int main() { FILE: en/codes/cpp/chapter_dynamic_programming/climbing_stairs_dp.cpp function climbingStairsDP (line 10) | int climbingStairsDP(int n) { function climbingStairsDPComp (line 26) | int climbingStairsDPComp(int n) { function main (line 39) | int main() { FILE: en/codes/cpp/chapter_dynamic_programming/coin_change.cpp function coinChangeDP (line 10) | int coinChangeDP(vector &coins, int amt) { function coinChangeDPComp (line 35) | int coinChangeDPComp(vector &coins, int amt) { function main (line 57) | int main() { FILE: en/codes/cpp/chapter_dynamic_programming/coin_change_ii.cpp function coinChangeIIDP (line 10) | int coinChangeIIDP(vector &coins, int amt) { function coinChangeIIDPComp (line 34) | int coinChangeIIDPComp(vector &coins, int amt) { function main (line 55) | int main() { FILE: en/codes/cpp/chapter_dynamic_programming/edit_distance.cpp function editDistanceDFS (line 10) | int editDistanceDFS(string s, string t, int i, int j) { function editDistanceDFSMem (line 32) | int editDistanceDFSMem(string s, string t, vector> &mem, int... function editDistanceDP (line 58) | int editDistanceDP(string s, string t) { function editDistanceDPComp (line 84) | int editDistanceDPComp(string s, string t) { function main (line 113) | int main() { FILE: en/codes/cpp/chapter_dynamic_programming/knapsack.cpp function knapsackDFS (line 8) | int knapsackDFS(vector &wgt, vector &val, int i, int c) { function knapsackDFSMem (line 25) | int knapsackDFSMem(vector &wgt, vector &val, vector &wgt, vector &val, int cap) { function knapsackDPComp (line 67) | int knapsackDPComp(vector &wgt, vector &val, int cap) { function main (line 85) | int main() { FILE: en/codes/cpp/chapter_dynamic_programming/min_cost_climbing_stairs_dp.cpp function minCostClimbingStairsDP (line 10) | int minCostClimbingStairsDP(vector &cost) { function minCostClimbingStairsDPComp (line 27) | int minCostClimbingStairsDPComp(vector &cost) { function main (line 41) | int main() { FILE: en/codes/cpp/chapter_dynamic_programming/min_path_sum.cpp function minPathSumDFS (line 10) | int minPathSumDFS(vector> &grid, int i, int j) { function minPathSumDFSMem (line 27) | int minPathSumDFSMem(vector> &grid, vector> &mem... function minPathSumDP (line 49) | int minPathSumDP(vector> &grid) { function minPathSumDPComp (line 72) | int minPathSumDPComp(vector> &grid) { function main (line 94) | int main() { FILE: en/codes/cpp/chapter_dynamic_programming/unbounded_knapsack.cpp function unboundedKnapsackDP (line 10) | int unboundedKnapsackDP(vector &wgt, vector &val, int cap) { function unboundedKnapsackDPComp (line 30) | int unboundedKnapsackDPComp(vector &wgt, vector &val, int cap) { function main (line 50) | int main() { FILE: en/codes/cpp/chapter_graph/graph_adjacency_list.cpp class GraphAdjList (line 10) | class GraphAdjList { method remove (line 16) | void remove(vector &vec, Vertex *vet) { method GraphAdjList (line 26) | GraphAdjList(const vector> &edges) { method size (line 36) | int size() { method addEdge (line 41) | void addEdge(Vertex *vet1, Vertex *vet2) { method removeEdge (line 50) | void removeEdge(Vertex *vet1, Vertex *vet2) { method addVertex (line 59) | void addVertex(Vertex *vet) { method removeVertex (line 67) | void removeVertex(Vertex *vet) { method print (line 79) | void print() { FILE: en/codes/cpp/chapter_graph/graph_adjacency_list_test.cpp function main (line 10) | int main() { FILE: en/codes/cpp/chapter_graph/graph_adjacency_matrix.cpp class GraphAdjMat (line 10) | class GraphAdjMat { method GraphAdjMat (line 16) | GraphAdjMat(const vector &vertices, const vector> &ed... method size (line 29) | int size() const { method addVertex (line 34) | void addVertex(int val) { method removeVertex (line 47) | void removeVertex(int index) { method addEdge (line 63) | void addEdge(int i, int j) { method removeEdge (line 75) | void removeEdge(int i, int j) { method print (line 85) | void print() { function main (line 94) | int main() { FILE: en/codes/cpp/chapter_graph/graph_bfs.cpp function graphBFS (line 12) | vector graphBFS(GraphAdjList &graph, Vertex *startVet) { function main (line 38) | int main() { FILE: en/codes/cpp/chapter_graph/graph_dfs.cpp function dfs (line 11) | void dfs(GraphAdjList &graph, unordered_set &visited, vector graphDFS(GraphAdjList &graph, Vertex *startVet) { function main (line 35) | int main() { FILE: en/codes/cpp/chapter_greedy/coin_change_greedy.cpp function coinChangeGreedy (line 10) | int coinChangeGreedy(vector &coins, int amt) { function main (line 29) | int main() { FILE: en/codes/cpp/chapter_greedy/fractional_knapsack.cpp class Item (line 10) | class Item { method Item (line 15) | Item(int w, int v) : w(w), v(v) { function fractionalKnapsack (line 20) | double fractionalKnapsack(vector &wgt, vector &val, int cap) { function main (line 46) | int main() { FILE: en/codes/cpp/chapter_greedy/max_capacity.cpp function maxCapacity (line 10) | int maxCapacity(vector &ht) { function main (line 31) | int main() { FILE: en/codes/cpp/chapter_greedy/max_product_cutting.cpp function maxProductCutting (line 10) | int maxProductCutting(int n) { function main (line 31) | int main() { FILE: en/codes/cpp/chapter_hashing/array_hash_map.cpp type Pair (line 10) | struct Pair { method Pair (line 14) | Pair(int key, string val) { class ArrayHashMap (line 21) | class ArrayHashMap { method ArrayHashMap (line 26) | ArrayHashMap() { method hashFunc (line 40) | int hashFunc(int key) { method string (line 46) | string get(int key) { method put (line 55) | void put(int key, string val) { method remove (line 62) | void remove(int key) { method pairSet (line 70) | vector pairSet() { method keySet (line 81) | vector keySet() { method valueSet (line 92) | vector valueSet() { method print (line 103) | void print() { FILE: en/codes/cpp/chapter_hashing/array_hash_map_test.cpp function main (line 10) | int main() { FILE: en/codes/cpp/chapter_hashing/built_in_hash.cpp function main (line 10) | int main() { FILE: en/codes/cpp/chapter_hashing/hash_map.cpp function main (line 10) | int main() { FILE: en/codes/cpp/chapter_hashing/hash_map_chaining.cpp class HashMapChaining (line 10) | class HashMapChaining { method HashMapChaining (line 20) | HashMapChaining() : size(0), capacity(4), loadThres(2.0 / 3.0), extend... method hashFunc (line 35) | int hashFunc(int key) { method loadFactor (line 40) | double loadFactor() { method string (line 45) | string get(int key) { method put (line 58) | void put(int key, string val) { method remove (line 77) | void remove(int key) { method extend (line 93) | void extend() { method print (line 112) | void print() { function main (line 124) | int main() { FILE: en/codes/cpp/chapter_hashing/hash_map_open_addressing.cpp class HashMapOpenAddressing (line 10) | class HashMapOpenAddressing { method HashMapOpenAddressing (line 21) | HashMapOpenAddressing() : size(0), buckets(capacity, nullptr) { method hashFunc (line 35) | int hashFunc(int key) { method loadFactor (line 40) | double loadFactor() { method findBucket (line 45) | int findBucket(int key) { method string (line 72) | string get(int key) { method put (line 84) | void put(int key, string val) { method remove (line 102) | void remove(int key) { method extend (line 114) | void extend() { method print (line 131) | void print() { function main (line 145) | int main() { FILE: en/codes/cpp/chapter_hashing/simple_hash.cpp function addHash (line 10) | int addHash(string key) { function mulHash (line 20) | int mulHash(string key) { function xorHash (line 30) | int xorHash(string key) { function rotHash (line 40) | int rotHash(string key) { function main (line 50) | int main() { FILE: en/codes/cpp/chapter_heap/heap.cpp function testPush (line 9) | void testPush(priority_queue &heap, int val) { function testPop (line 15) | void testPop(priority_queue &heap) { function main (line 23) | int main() { FILE: en/codes/cpp/chapter_heap/my_heap.cpp class MaxHeap (line 10) | class MaxHeap { method left (line 16) | int left(int i) { method right (line 21) | int right(int i) { method parent (line 26) | int parent(int i) { method siftUp (line 31) | void siftUp(int i) { method siftDown (line 46) | void siftDown(int i) { method MaxHeap (line 65) | MaxHeap(vector nums) { method size (line 75) | int size() { method isEmpty (line 80) | bool isEmpty() { method peek (line 85) | int peek() { method push (line 90) | void push(int val) { method pop (line 98) | void pop() { method print (line 112) | void print() { function main (line 123) | int main() { FILE: en/codes/cpp/chapter_heap/top_k.cpp function topKHeap (line 10) | priority_queue, greater> topKHeap(vector &num... function main (line 29) | int main() { FILE: en/codes/cpp/chapter_searching/binary_search.cpp function binarySearch (line 10) | int binarySearch(vector &nums, int target) { function binarySearchLCRO (line 28) | int binarySearchLCRO(vector &nums, int target) { function main (line 46) | int main() { FILE: en/codes/cpp/chapter_searching/binary_search_edge.cpp function binarySearchInsertion (line 10) | int binarySearchInsertion(const vector &nums, int target) { function binarySearchLeftEdge (line 25) | int binarySearchLeftEdge(vector &nums, int target) { function binarySearchRightEdge (line 37) | int binarySearchRightEdge(vector &nums, int target) { function main (line 51) | int main() { FILE: en/codes/cpp/chapter_searching/binary_search_insertion.cpp function binarySearchInsertionSimple (line 10) | int binarySearchInsertionSimple(vector &nums, int target) { function binarySearchInsertion (line 27) | int binarySearchInsertion(vector &nums, int target) { function main (line 44) | int main() { FILE: en/codes/cpp/chapter_searching/hashing_search.cpp function hashingSearchArray (line 10) | int hashingSearchArray(unordered_map map, int target) { function ListNode (line 19) | ListNode *hashingSearchLinkedList(unordered_map map, in... function main (line 28) | int main() { FILE: en/codes/cpp/chapter_searching/linear_search.cpp function linearSearchArray (line 10) | int linearSearchArray(vector &nums, int target) { function ListNode (line 22) | ListNode *linearSearchLinkedList(ListNode *head, int target) { function main (line 35) | int main() { FILE: en/codes/cpp/chapter_searching/two_sum.cpp function twoSumBruteForce (line 10) | vector twoSumBruteForce(vector &nums, int target) { function twoSumHashTable (line 23) | vector twoSumHashTable(vector &nums, int target) { function main (line 38) | int main() { FILE: en/codes/cpp/chapter_sorting/bubble_sort.cpp function bubbleSort (line 10) | void bubbleSort(vector &nums) { function bubbleSortWithFlag (line 25) | void bubbleSortWithFlag(vector &nums) { function main (line 44) | int main() { FILE: en/codes/cpp/chapter_sorting/bucket_sort.cpp function bucketSort (line 10) | void bucketSort(vector &nums) { function main (line 36) | int main() { FILE: en/codes/cpp/chapter_sorting/counting_sort.cpp function countingSortNaive (line 11) | void countingSortNaive(vector &nums) { function countingSort (line 34) | void countingSort(vector &nums) { function main (line 65) | int main() { FILE: en/codes/cpp/chapter_sorting/heap_sort.cpp function siftDown (line 10) | void siftDown(vector &nums, int n, int i) { function heapSort (line 32) | void heapSort(vector &nums) { function main (line 47) | int main() { FILE: en/codes/cpp/chapter_sorting/insertion_sort.cpp function insertionSort (line 10) | void insertionSort(vector &nums) { function main (line 24) | int main() { FILE: en/codes/cpp/chapter_sorting/merge_sort.cpp function merge (line 10) | void merge(vector &nums, int left, int mid, int right) { function mergeSort (line 37) | void mergeSort(vector &nums, int left, int right) { function main (line 50) | int main() { FILE: en/codes/cpp/chapter_sorting/quick_sort.cpp class QuickSort (line 10) | class QuickSort { method partition (line 13) | static int partition(vector &nums, int left, int right) { method quickSort (line 29) | static void quickSort(vector &nums, int left, int right) { class QuickSortMedian (line 42) | class QuickSortMedian { method medianThree (line 45) | static int medianThree(vector &nums, int left, int mid, int right) { method partition (line 55) | static int partition(vector &nums, int left, int right) { method quickSort (line 75) | static void quickSort(vector &nums, int left, int right) { class QuickSortTailCall (line 88) | class QuickSortTailCall { method partition (line 91) | static int partition(vector &nums, int left, int right) { method quickSort (line 107) | static void quickSort(vector &nums, int left, int right) { function main (line 125) | int main() { FILE: en/codes/cpp/chapter_sorting/radix_sort.cpp function digit (line 10) | int digit(int num, int exp) { function countingSortDigit (line 16) | void countingSortDigit(vector &nums, int exp) { function radixSort (line 43) | void radixSort(vector &nums) { function main (line 56) | int main() { FILE: en/codes/cpp/chapter_sorting/selection_sort.cpp function selectionSort (line 10) | void selectionSort(vector &nums) { function main (line 26) | int main() { FILE: en/codes/cpp/chapter_stack_and_queue/array_deque.cpp class ArrayDeque (line 10) | class ArrayDeque { method ArrayDeque (line 18) | ArrayDeque(int capacity) { method capacity (line 24) | int capacity() { method size (line 29) | int size() { method isEmpty (line 34) | bool isEmpty() { method index (line 39) | int index(int i) { method pushFirst (line 47) | void pushFirst(int num) { method pushLast (line 61) | void pushLast(int num) { method popFirst (line 74) | int popFirst() { method popLast (line 83) | int popLast() { method peekFirst (line 90) | int peekFirst() { method peekLast (line 97) | int peekLast() { method toVector (line 106) | vector toVector() { function main (line 117) | int main() { FILE: en/codes/cpp/chapter_stack_and_queue/array_queue.cpp class ArrayQueue (line 10) | class ArrayQueue { method ArrayQueue (line 18) | ArrayQueue(int capacity) { method capacity (line 30) | int capacity() { method size (line 35) | int size() { method isEmpty (line 40) | bool isEmpty() { method push (line 45) | void push(int num) { method pop (line 59) | int pop() { method peek (line 68) | int peek() { method toVector (line 75) | vector toVector() { function main (line 86) | int main() { FILE: en/codes/cpp/chapter_stack_and_queue/array_stack.cpp class ArrayStack (line 10) | class ArrayStack { method size (line 16) | int size() { method isEmpty (line 21) | bool isEmpty() { method push (line 26) | void push(int num) { method pop (line 31) | int pop() { method top (line 38) | int top() { method toVector (line 45) | vector toVector() { function main (line 51) | int main() { FILE: en/codes/cpp/chapter_stack_and_queue/deque.cpp function main (line 10) | int main() { FILE: en/codes/cpp/chapter_stack_and_queue/linkedlist_deque.cpp type DoublyListNode (line 10) | struct DoublyListNode { method DoublyListNode (line 14) | DoublyListNode(int val) : val(val), prev(nullptr), next(nullptr) { class LinkedListDeque (line 19) | class LinkedListDeque { method LinkedListDeque (line 26) | LinkedListDeque() : front(nullptr), rear(nullptr) { method size (line 41) | int size() { method isEmpty (line 46) | bool isEmpty() { method push (line 51) | void push(int num, bool isFront) { method pushFirst (line 73) | void pushFirst(int num) { method pushLast (line 78) | void pushLast(int num) { method pop (line 83) | int pop(bool isFront) { method popFirst (line 115) | int popFirst() { method popLast (line 120) | int popLast() { method peekFirst (line 125) | int peekFirst() { method peekLast (line 132) | int peekLast() { method toVector (line 139) | vector toVector() { function main (line 151) | int main() { FILE: en/codes/cpp/chapter_stack_and_queue/linkedlist_queue.cpp class LinkedListQueue (line 10) | class LinkedListQueue { method LinkedListQueue (line 16) | LinkedListQueue() { method size (line 28) | int size() { method isEmpty (line 33) | bool isEmpty() { method push (line 38) | void push(int num) { method pop (line 55) | int pop() { method peek (line 67) | int peek() { method toVector (line 74) | vector toVector() { function main (line 86) | int main() { FILE: en/codes/cpp/chapter_stack_and_queue/linkedlist_stack.cpp class LinkedListStack (line 10) | class LinkedListStack { method LinkedListStack (line 16) | LinkedListStack() { method size (line 27) | int size() { method isEmpty (line 32) | bool isEmpty() { method push (line 37) | void push(int num) { method pop (line 45) | int pop() { method top (line 56) | int top() { method toVector (line 63) | vector toVector() { function main (line 75) | int main() { FILE: en/codes/cpp/chapter_stack_and_queue/queue.cpp function main (line 10) | int main() { FILE: en/codes/cpp/chapter_stack_and_queue/stack.cpp function main (line 10) | int main() { FILE: en/codes/cpp/chapter_tree/array_binary_tree.cpp class ArrayBinaryTree (line 10) | class ArrayBinaryTree { method ArrayBinaryTree (line 13) | ArrayBinaryTree(vector arr) { method size (line 18) | int size() { method val (line 23) | int val(int i) { method left (line 31) | int left(int i) { method right (line 36) | int right(int i) { method parent (line 41) | int parent(int i) { method levelOrder (line 46) | vector levelOrder() { method preOrder (line 57) | vector preOrder() { method inOrder (line 64) | vector inOrder() { method postOrder (line 71) | vector postOrder() { method dfs (line 81) | void dfs(int i, string order, vector &res) { function main (line 100) | int main() { FILE: en/codes/cpp/chapter_tree/avl_tree.cpp class AVLTree (line 10) | class AVLTree { method updateHeight (line 13) | void updateHeight(TreeNode *node) { method TreeNode (line 19) | TreeNode *rightRotate(TreeNode *node) { method TreeNode (line 33) | TreeNode *leftRotate(TreeNode *node) { method TreeNode (line 47) | TreeNode *rotate(TreeNode *node) { method TreeNode (line 77) | TreeNode *insertHelper(TreeNode *node, int val) { method TreeNode (line 95) | TreeNode *removeHelper(TreeNode *node, int val) { method height (line 138) | int height(TreeNode *node) { method balanceFactor (line 144) | int balanceFactor(TreeNode *node) { method insert (line 153) | void insert(int val) { method remove (line 158) | void remove(int val) { method TreeNode (line 163) | TreeNode *search(int val) { method AVLTree (line 182) | AVLTree() : root(nullptr) { function testInsert (line 191) | void testInsert(AVLTree &tree, int val) { function testRemove (line 197) | void testRemove(AVLTree &tree, int val) { function main (line 204) | int main() { FILE: en/codes/cpp/chapter_tree/binary_search_tree.cpp class BinarySearchTree (line 10) | class BinarySearchTree { method BinarySearchTree (line 16) | BinarySearchTree() { method TreeNode (line 27) | TreeNode *getRoot() { method TreeNode (line 32) | TreeNode *search(int num) { method insert (line 51) | void insert(int num) { method remove (line 80) | void remove(int num) { function main (line 135) | int main() { FILE: en/codes/cpp/chapter_tree/binary_tree.cpp function main (line 10) | int main() { FILE: en/codes/cpp/chapter_tree/binary_tree_bfs.cpp function levelOrder (line 10) | vector levelOrder(TreeNode *root) { function main (line 29) | int main() { FILE: en/codes/cpp/chapter_tree/binary_tree_dfs.cpp function preOrder (line 13) | void preOrder(TreeNode *root) { function inOrder (line 23) | void inOrder(TreeNode *root) { function postOrder (line 33) | void postOrder(TreeNode *root) { function main (line 43) | int main() { FILE: en/codes/cpp/utils/list_node.hpp type ListNode (line 15) | struct ListNode { method ListNode (line 18) | ListNode(int x) : val(x), next(nullptr) { function ListNode (line 23) | ListNode *vecToLinkedList(vector list) { method ListNode (line 18) | ListNode(int x) : val(x), next(nullptr) { function freeMemoryLinkedList (line 34) | void freeMemoryLinkedList(ListNode *cur) { FILE: en/codes/cpp/utils/print_utils.hpp function vecFind (line 17) | int vecFind(const vector &vec, T ele) { function string (line 28) | string strJoin(const string &delim, const T &vec) { function string (line 40) | string strRepeat(string str, int n) { function printArray (line 48) | void printArray(T *arr, int n) { function string (line 60) | string getVectorString(vector &list) { function printVector (line 65) | void printVector(vector list) { function printVectorMatrix (line 70) | void printVectorMatrix(vector> &matrix) { function printLinkedList (line 78) | void printLinkedList(ListNode *head) { type Trunk (line 88) | struct Trunk { method Trunk (line 91) | Trunk(Trunk *prev, string str) { function showTrunks (line 97) | void showTrunks(Trunk *p) { function printTree (line 111) | void printTree(TreeNode *root, Trunk *prev, bool isRight) { function printTree (line 143) | void printTree(TreeNode *root) { function printStack (line 148) | void printStack(stack stk) { function printQueue (line 170) | void printQueue(queue queue) { function printDeque (line 186) | void printDeque(deque deque) { function printHashMap (line 203) | void printHashMap(unordered_map map) { function S (line 210) | S &Container(priority_queue &pq) { function printHeap (line 220) | void printHeap(priority_queue &heap) { FILE: en/codes/cpp/utils/tree_node.hpp type TreeNode (line 15) | struct TreeNode { method TreeNode (line 21) | TreeNode() = default; method TreeNode (line 22) | explicit TreeNode(int x, TreeNode *parent = nullptr) : val(x), parent(... function TreeNode (line 43) | TreeNode *vectorToTreeDFS(vector &arr, int i) { method TreeNode (line 21) | TreeNode() = default; method TreeNode (line 22) | explicit TreeNode(int x, TreeNode *parent = nullptr) : val(x), parent(... function TreeNode (line 54) | TreeNode *vectorToTree(vector arr) { method TreeNode (line 21) | TreeNode() = default; method TreeNode (line 22) | explicit TreeNode(int x, TreeNode *parent = nullptr) : val(x), parent(... function treeToVecorDFS (line 59) | void treeToVecorDFS(TreeNode *root, int i, vector &res) { function treeToVecor (line 71) | vector treeToVecor(TreeNode *root) { function freeMemoryTree (line 78) | void freeMemoryTree(TreeNode *root) { FILE: en/codes/cpp/utils/vertex.hpp type Vertex (line 14) | struct Vertex { method Vertex (line 16) | Vertex(int x) : val(x) { function valsToVets (line 21) | vector valsToVets(vector vals) { function vetsToVals (line 30) | vector vetsToVals(vector vets) { FILE: en/codes/csharp/chapter_array_and_linkedlist/array.cs class array (line 7) | public class array { method RandomAccess (line 9) | int RandomAccess(int[] nums) { method Extend (line 19) | int[] Extend(int[] nums, int enlarge) { method Insert (line 31) | void Insert(int[] nums, int num, int index) { method Remove (line 41) | void Remove(int[] nums, int index) { method Traverse (line 49) | void Traverse(int[] nums) { method Find (line 62) | int Find(int[] nums, int target) { method ToString (line 71) | string ToString(int[] nums) { method Test (line 76) | [Test] FILE: en/codes/csharp/chapter_array_and_linkedlist/linked_list.cs class linked_list (line 7) | public class linked_list { method Insert (line 9) | void Insert(ListNode n0, ListNode P) { method Remove (line 16) | void Remove(ListNode n0) { method Access (line 26) | ListNode? Access(ListNode? head, int index) { method Find (line 36) | int Find(ListNode? head, int target) { method Test (line 48) | [Test] FILE: en/codes/csharp/chapter_array_and_linkedlist/list.cs class list (line 9) | public class list { method Test (line 10) | [Test] FILE: en/codes/csharp/chapter_array_and_linkedlist/my_list.cs class MyList (line 10) | class MyList { method MyList (line 17) | public MyList() { method Size (line 22) | public int Size() { method Capacity (line 27) | public int Capacity() { method Get (line 32) | public int Get(int index) { method Set (line 40) | public void Set(int index, int num) { method Add (line 47) | public void Add(int num) { method Insert (line 57) | public void Insert(int index, int num) { method Remove (line 73) | public int Remove(int index) { method ExtendCapacity (line 88) | public void ExtendCapacity() { method ToArray (line 96) | public int[] ToArray() { class my_list (line 106) | public class my_list { method Test (line 107) | [Test] FILE: en/codes/csharp/chapter_backtracking/n_queens.cs class n_queens (line 9) | public class n_queens { method Backtrack (line 11) | void Backtrack(int row, int n, List> state, List>> NQueens(int n) { method Test (line 62) | [Test] FILE: en/codes/csharp/chapter_backtracking/permutations_i.cs class permutations_i (line 9) | public class permutations_i { method Backtrack (line 11) | void Backtrack(List state, int[] choices, bool[] selected, List> PermutationsI(int[] nums) { method Test (line 41) | [Test] FILE: en/codes/csharp/chapter_backtracking/permutations_ii.cs class permutations_ii (line 9) | public class permutations_ii { method Backtrack (line 11) | void Backtrack(List state, int[] choices, bool[] selected, List> PermutationsII(int[] nums) { method Test (line 43) | [Test] FILE: en/codes/csharp/chapter_backtracking/preorder_traversal_i_compact.cs class preorder_traversal_i_compact (line 9) | public class preorder_traversal_i_compact { method PreOrder (line 13) | void PreOrder(TreeNode? root) { method Test (line 25) | [Test] FILE: en/codes/csharp/chapter_backtracking/preorder_traversal_ii_compact.cs class preorder_traversal_ii_compact (line 9) | public class preorder_traversal_ii_compact { method PreOrder (line 14) | void PreOrder(TreeNode? root) { method Test (line 30) | [Test] FILE: en/codes/csharp/chapter_backtracking/preorder_traversal_iii_compact.cs class preorder_traversal_iii_compact (line 9) | public class preorder_traversal_iii_compact { method PreOrder (line 14) | void PreOrder(TreeNode? root) { method Test (line 31) | [Test] FILE: en/codes/csharp/chapter_backtracking/preorder_traversal_iii_template.cs class preorder_traversal_iii_template (line 9) | public class preorder_traversal_iii_template { method IsSolution (line 11) | bool IsSolution(List state) { method RecordSolution (line 16) | void RecordSolution(List state, List> res) { method IsValid (line 21) | bool IsValid(List state, TreeNode choice) { method MakeChoice (line 26) | void MakeChoice(List state, TreeNode choice) { method UndoChoice (line 31) | void UndoChoice(List state, TreeNode choice) { method Backtrack (line 36) | void Backtrack(List state, List choices, List state, int target, int[] choices, int start, ... method SubsetSumI (line 35) | List> SubsetSumI(int[] nums, int target) { method Test (line 44) | [Test] FILE: en/codes/csharp/chapter_backtracking/subset_sum_i_naive.cs class subset_sum_i_naive (line 9) | public class subset_sum_i_naive { method Backtrack (line 11) | void Backtrack(List state, int target, int total, int[] choices, ... method SubsetSumINaive (line 33) | List> SubsetSumINaive(int[] nums, int target) { method Test (line 41) | [Test] FILE: en/codes/csharp/chapter_backtracking/subset_sum_ii.cs class subset_sum_ii (line 9) | public class subset_sum_ii { method Backtrack (line 11) | void Backtrack(List state, int target, int[] choices, int start, ... method SubsetSumII (line 40) | List> SubsetSumII(int[] nums, int target) { method Test (line 49) | [Test] FILE: en/codes/csharp/chapter_computational_complexity/iteration.cs class iteration (line 9) | public class iteration { method ForLoop (line 11) | int ForLoop(int n) { method WhileLoop (line 21) | int WhileLoop(int n) { method WhileLoopII (line 33) | int WhileLoopII(int n) { method NestedForLoop (line 47) | string NestedForLoop(int n) { method Test (line 60) | [Test] FILE: en/codes/csharp/chapter_computational_complexity/recursion.cs class recursion (line 9) | public class recursion { method Recur (line 11) | int Recur(int n) { method ForLoopRecur (line 22) | int ForLoopRecur(int n) { method TailRecur (line 41) | int TailRecur(int n, int res) { method Fib (line 50) | int Fib(int n) { method Test (line 61) | [Test] FILE: en/codes/csharp/chapter_computational_complexity/space_complexity.cs class space_complexity (line 9) | public class space_complexity { method Function (line 11) | int Function() { method Constant (line 17) | void Constant(int n) { method Linear (line 34) | void Linear(int n) { method LinearRecur (line 50) | void LinearRecur(int n) { method Quadratic (line 57) | void Quadratic(int n) { method QuadraticRecur (line 72) | int QuadraticRecur(int n) { method BuildTree (line 80) | TreeNode? BuildTree(int n) { method Test (line 89) | [Test] FILE: en/codes/csharp/chapter_computational_complexity/time_complexity.cs class time_complexity (line 9) | public class time_complexity { method Algorithm (line 10) | void Algorithm(int n) { method AlgorithmA (line 26) | void AlgorithmA(int n) { method AlgorithmB (line 31) | void AlgorithmB(int n) { method AlgorithmC (line 38) | void AlgorithmC(int n) { method Constant (line 45) | int Constant(int n) { method Linear (line 54) | int Linear(int n) { method ArrayTraversal (line 62) | int ArrayTraversal(int[] nums) { method Quadratic (line 72) | int Quadratic(int n) { method BubbleSort (line 84) | int BubbleSort(int[] nums) { method Exponential (line 101) | int Exponential(int n) { method ExpRecur (line 115) | int ExpRecur(int n) { method Logarithmic (line 121) | int Logarithmic(int n) { method LogRecur (line 131) | int LogRecur(int n) { method LinearLogRecur (line 137) | int LinearLogRecur(int n) { method FactorialRecur (line 147) | int FactorialRecur(int n) { method Test (line 157) | [Test] FILE: en/codes/csharp/chapter_computational_complexity/worst_best_time_complexity.cs class worst_best_time_complexity (line 9) | public class worst_best_time_complexity { method RandomNumbers (line 11) | int[] RandomNumbers(int n) { method FindOne (line 27) | int FindOne(int[] nums) { method Test (line 39) | [Test] FILE: en/codes/csharp/chapter_divide_and_conquer/binary_search_recur.cs class binary_search_recur (line 9) | public class binary_search_recur { method DFS (line 11) | int DFS(int[] nums, int target, int i, int j) { method BinarySearch (line 31) | int BinarySearch(int[] nums, int target) { method Test (line 37) | [Test] FILE: en/codes/csharp/chapter_divide_and_conquer/build_tree.cs class build_tree (line 9) | public class build_tree { method DFS (line 11) | TreeNode? DFS(int[] preorder, Dictionary inorderMap, int i, ... method BuildTree (line 28) | TreeNode? BuildTree(int[] preorder, int[] inorder) { method Test (line 38) | [Test] FILE: en/codes/csharp/chapter_divide_and_conquer/hanota.cs class hanota (line 9) | public class hanota { method Move (line 11) | void Move(List src, List tar) { method DFS (line 20) | void DFS(int i, List src, List buf, List tar) { method SolveHanota (line 35) | void SolveHanota(List A, List B, List C) { method Test (line 41) | [Test] FILE: en/codes/csharp/chapter_dynamic_programming/climbing_stairs_backtrack.cs class climbing_stairs_backtrack (line 9) | public class climbing_stairs_backtrack { method Backtrack (line 11) | void Backtrack(List choices, int state, int n, List res) { method ClimbingStairsBacktrack (line 27) | int ClimbingStairsBacktrack(int n) { method Test (line 35) | [Test] FILE: en/codes/csharp/chapter_dynamic_programming/climbing_stairs_constraint_dp.cs class climbing_stairs_constraint_dp (line 9) | public class climbing_stairs_constraint_dp { method ClimbingStairsConstraintDP (line 11) | int ClimbingStairsConstraintDP(int n) { method Test (line 30) | [Test] FILE: en/codes/csharp/chapter_dynamic_programming/climbing_stairs_dfs.cs class climbing_stairs_dfs (line 9) | public class climbing_stairs_dfs { method DFS (line 11) | int DFS(int i) { method ClimbingStairsDFS (line 21) | int ClimbingStairsDFS(int n) { method Test (line 25) | [Test] FILE: en/codes/csharp/chapter_dynamic_programming/climbing_stairs_dfs_mem.cs class climbing_stairs_dfs_mem (line 9) | public class climbing_stairs_dfs_mem { method DFS (line 11) | int DFS(int i, int[] mem) { method ClimbingStairsDFSMem (line 26) | int ClimbingStairsDFSMem(int n) { method Test (line 33) | [Test] FILE: en/codes/csharp/chapter_dynamic_programming/climbing_stairs_dp.cs class climbing_stairs_dp (line 9) | public class climbing_stairs_dp { method ClimbingStairsDP (line 11) | int ClimbingStairsDP(int n) { method ClimbingStairsDPComp (line 27) | int ClimbingStairsDPComp(int n) { method Test (line 39) | [Test] FILE: en/codes/csharp/chapter_dynamic_programming/coin_change.cs class coin_change (line 9) | public class coin_change { method CoinChangeDP (line 11) | int CoinChangeDP(int[] coins, int amt) { method CoinChangeDPComp (line 36) | int CoinChangeDPComp(int[] coins, int amt) { method Test (line 58) | [Test] FILE: en/codes/csharp/chapter_dynamic_programming/coin_change_ii.cs class coin_change_ii (line 9) | public class coin_change_ii { method CoinChangeIIDP (line 11) | int CoinChangeIIDP(int[] coins, int amt) { method CoinChangeIIDPComp (line 35) | int CoinChangeIIDPComp(int[] coins, int amt) { method Test (line 55) | [Test] FILE: en/codes/csharp/chapter_dynamic_programming/edit_distance.cs class edit_distance (line 9) | public class edit_distance { method EditDistanceDFS (line 11) | int EditDistanceDFS(string s, string t, int i, int j) { method EditDistanceDFSMem (line 33) | int EditDistanceDFSMem(string s, string t, int[][] mem, int i, int j) { method EditDistanceDP (line 59) | int EditDistanceDP(string s, string t) { method EditDistanceDPComp (line 85) | int EditDistanceDPComp(string s, string t) { method Test (line 113) | [Test] FILE: en/codes/csharp/chapter_dynamic_programming/knapsack.cs class knapsack (line 9) | public class knapsack { method KnapsackDFS (line 11) | int KnapsackDFS(int[] weight, int[] val, int i, int c) { method KnapsackDFSMem (line 28) | int KnapsackDFSMem(int[] weight, int[] val, int[][] mem, int i, int c) { method KnapsackDP (line 50) | int KnapsackDP(int[] weight, int[] val, int cap) { method KnapsackDPComp (line 70) | int KnapsackDPComp(int[] weight, int[] val, int cap) { method Test (line 90) | [Test] FILE: en/codes/csharp/chapter_dynamic_programming/min_cost_climbing_stairs_dp.cs class min_cost_climbing_stairs_dp (line 9) | public class min_cost_climbing_stairs_dp { method MinCostClimbingStairsDP (line 11) | int MinCostClimbingStairsDP(int[] cost) { method MinCostClimbingStairsDPComp (line 28) | int MinCostClimbingStairsDPComp(int[] cost) { method Test (line 41) | [Test] FILE: en/codes/csharp/chapter_dynamic_programming/min_path_sum.cs class min_path_sum (line 9) | public class min_path_sum { method MinPathSumDFS (line 11) | int MinPathSumDFS(int[][] grid, int i, int j) { method MinPathSumDFSMem (line 28) | int MinPathSumDFSMem(int[][] grid, int[][] mem, int i, int j) { method MinPathSumDP (line 50) | int MinPathSumDP(int[][] grid) { method MinPathSumDPComp (line 73) | int MinPathSumDPComp(int[][] grid) { method Test (line 94) | [Test] FILE: en/codes/csharp/chapter_dynamic_programming/unbounded_knapsack.cs class unbounded_knapsack (line 9) | public class unbounded_knapsack { method UnboundedKnapsackDP (line 11) | int UnboundedKnapsackDP(int[] wgt, int[] val, int cap) { method UnboundedKnapsackDPComp (line 31) | int UnboundedKnapsackDPComp(int[] wgt, int[] val, int cap) { method Test (line 50) | [Test] FILE: en/codes/csharp/chapter_graph/graph_adjacency_list.cs class GraphAdjList (line 10) | public class GraphAdjList { method GraphAdjList (line 15) | public GraphAdjList(Vertex[][] edges) { method Size (line 26) | int Size() { method AddEdge (line 31) | public void AddEdge(Vertex vet1, Vertex vet2) { method RemoveEdge (line 40) | public void RemoveEdge(Vertex vet1, Vertex vet2) { method AddVertex (line 49) | public void AddVertex(Vertex vet) { method RemoveVertex (line 57) | public void RemoveVertex(Vertex vet) { method Print (line 69) | public void Print() { class graph_adjacency_list (line 80) | public class graph_adjacency_list { method Test (line 81) | [Test] FILE: en/codes/csharp/chapter_graph/graph_adjacency_matrix.cs class GraphAdjMat (line 10) | class GraphAdjMat { method GraphAdjMat (line 15) | public GraphAdjMat(int[] vertices, int[][] edges) { method Size (line 30) | int Size() { method AddVertex (line 35) | public void AddVertex(int val) { method RemoveVertex (line 52) | public void RemoveVertex(int index) { method AddEdge (line 67) | public void AddEdge(int i, int j) { method RemoveEdge (line 78) | public void RemoveEdge(int i, int j) { method Print (line 87) | public void Print() { class graph_adjacency_matrix (line 95) | public class graph_adjacency_matrix { method Test (line 96) | [Test] FILE: en/codes/csharp/chapter_graph/graph_bfs.cs class graph_bfs (line 9) | public class graph_bfs { method GraphBFS (line 12) | List GraphBFS(GraphAdjList graph, Vertex startVet) { method Test (line 37) | [Test] FILE: en/codes/csharp/chapter_graph/graph_dfs.cs class graph_dfs (line 9) | public class graph_dfs { method DFS (line 11) | void DFS(GraphAdjList graph, HashSet visited, List res... method GraphDFS (line 26) | List GraphDFS(GraphAdjList graph, Vertex startVet) { method Test (line 35) | [Test] FILE: en/codes/csharp/chapter_greedy/coin_change_greedy.cs class coin_change_greedy (line 9) | public class coin_change_greedy { method CoinChangeGreedy (line 11) | int CoinChangeGreedy(int[] coins, int amt) { method Test (line 29) | [Test] FILE: en/codes/csharp/chapter_greedy/fractional_knapsack.cs class Item (line 10) | class Item(int w, int v) { class fractional_knapsack (line 15) | public class fractional_knapsack { method FractionalKnapsack (line 17) | double FractionalKnapsack(int[] wgt, int[] val, int cap) { method Test (line 42) | [Test] FILE: en/codes/csharp/chapter_greedy/max_capacity.cs class max_capacity (line 9) | public class max_capacity { method MaxCapacity (line 11) | int MaxCapacity(int[] ht) { method Test (line 31) | [Test] FILE: en/codes/csharp/chapter_greedy/max_product_cutting.cs class max_product_cutting (line 9) | public class max_product_cutting { method MaxProductCutting (line 11) | int MaxProductCutting(int n) { method Test (line 31) | [Test] FILE: en/codes/csharp/chapter_hashing/array_hash_map.cs class Pair (line 10) | class Pair(int key, string val) { class ArrayHashMap (line 16) | class ArrayHashMap { method ArrayHashMap (line 18) | public ArrayHashMap() { method HashFunc (line 27) | int HashFunc(int key) { method Get (line 33) | public string? Get(int key) { method Put (line 41) | public void Put(int key, string val) { method Remove (line 48) | public void Remove(int key) { method PairSet (line 55) | public List PairSet() { method KeySet (line 65) | public List KeySet() { method ValueSet (line 75) | public List ValueSet() { method Print (line 85) | public void Print() { class array_hash_map (line 93) | public class array_hash_map { method Test (line 94) | [Test] FILE: en/codes/csharp/chapter_hashing/built_in_hash.cs class built_in_hash (line 9) | public class built_in_hash { method Test (line 10) | [Test] FILE: en/codes/csharp/chapter_hashing/hash_map.cs class hash_map (line 10) | public class hash_map { method Test (line 11) | [Test] FILE: en/codes/csharp/chapter_hashing/hash_map_chaining.cs class HashMapChaining (line 10) | class HashMapChaining { method HashMapChaining (line 18) | public HashMapChaining() { method HashFunc (line 30) | int HashFunc(int key) { method LoadFactor (line 35) | double LoadFactor() { method Get (line 40) | public string? Get(int key) { method Put (line 53) | public void Put(int key, string val) { method Remove (line 72) | public void Remove(int key) { method Extend (line 85) | void Extend() { method Print (line 104) | public void Print() { class hash_map_chaining (line 117) | public class hash_map_chaining { method Test (line 118) | [Test] FILE: en/codes/csharp/chapter_hashing/hash_map_open_addressing.cs class HashMapOpenAddressing (line 10) | class HashMapOpenAddressing { method HashMapOpenAddressing (line 19) | public HashMapOpenAddressing() { method HashFunc (line 25) | int HashFunc(int key) { method LoadFactor (line 30) | double LoadFactor() { method FindBucket (line 35) | int FindBucket(int key) { method Get (line 62) | public string? Get(int key) { method Put (line 74) | public void Put(int key, string val) { method Remove (line 92) | public void Remove(int key) { method Extend (line 103) | void Extend() { method Print (line 119) | public void Print() { class hash_map_open_addressing (line 132) | public class hash_map_open_addressing { method Test (line 133) | [Test] FILE: en/codes/csharp/chapter_hashing/simple_hash.cs class simple_hash (line 9) | public class simple_hash { method AddHash (line 11) | int AddHash(string key) { method MulHash (line 21) | int MulHash(string key) { method XorHash (line 31) | int XorHash(string key) { method RotHash (line 41) | int RotHash(string key) { method Test (line 50) | [Test] FILE: en/codes/csharp/chapter_heap/heap.cs class heap (line 9) | public class heap { method TestPush (line 10) | void TestPush(PriorityQueue heap, int val) { method TestPop (line 16) | void TestPop(PriorityQueue heap) { method Test (line 22) | [Test] FILE: en/codes/csharp/chapter_heap/my_heap.cs class MaxHeap (line 10) | class MaxHeap { method MaxHeap (line 15) | public MaxHeap() { method MaxHeap (line 20) | public MaxHeap(IEnumerable nums) { method Left (line 31) | int Left(int i) { method Right (line 36) | int Right(int i) { method Parent (line 41) | int Parent(int i) { method Peek (line 46) | public int Peek() { method Push (line 51) | public void Push(int val) { method Size (line 59) | public int Size() { method IsEmpty (line 64) | public bool IsEmpty() { method SiftUp (line 69) | void SiftUp(int i) { method Pop (line 84) | public int Pop() { method SiftDown (line 100) | void SiftDown(int i) { method Swap (line 118) | void Swap(int i, int p) { method Print (line 123) | public void Print() { class my_heap (line 129) | public class my_heap { method Test (line 130) | [Test] FILE: en/codes/csharp/chapter_heap/top_k.cs class top_k (line 9) | public class top_k { method TopKHeap (line 11) | PriorityQueue TopKHeap(int[] nums, int k) { method Test (line 29) | [Test] FILE: en/codes/csharp/chapter_searching/binary_search.cs class binary_search (line 9) | public class binary_search { method BinarySearch (line 11) | int BinarySearch(int[] nums, int target) { method BinarySearchLCRO (line 29) | int BinarySearchLCRO(int[] nums, int target) { method Test (line 46) | [Test] FILE: en/codes/csharp/chapter_searching/binary_search_edge.cs class binary_search_edge (line 9) | public class binary_search_edge { method BinarySearchLeftEdge (line 11) | int BinarySearchLeftEdge(int[] nums, int target) { method BinarySearchRightEdge (line 23) | int BinarySearchRightEdge(int[] nums, int target) { method Test (line 36) | [Test] FILE: en/codes/csharp/chapter_searching/binary_search_insertion.cs class binary_search_insertion (line 9) | public class binary_search_insertion { method BinarySearchInsertionSimple (line 11) | public static int BinarySearchInsertionSimple(int[] nums, int target) { method BinarySearchInsertion (line 28) | public static int BinarySearchInsertion(int[] nums, int target) { method Test (line 44) | [Test] FILE: en/codes/csharp/chapter_searching/hashing_search.cs class hashing_search (line 9) | public class hashing_search { method HashingSearchArray (line 11) | int HashingSearchArray(Dictionary map, int target) { method HashingSearchLinkedList (line 18) | ListNode? HashingSearchLinkedList(Dictionary map, int t... method Test (line 25) | [Test] FILE: en/codes/csharp/chapter_searching/linear_search.cs class linear_search (line 9) | public class linear_search { method LinearSearchArray (line 11) | int LinearSearchArray(int[] nums, int target) { method LinearSearchLinkedList (line 23) | ListNode? LinearSearchLinkedList(ListNode? head, int target) { method Test (line 35) | [Test] FILE: en/codes/csharp/chapter_searching/two_sum.cs class two_sum (line 9) | public class two_sum { method TwoSumBruteForce (line 11) | int[] TwoSumBruteForce(int[] nums, int target) { method TwoSumHashTable (line 24) | int[] TwoSumHashTable(int[] nums, int target) { method Test (line 38) | [Test] FILE: en/codes/csharp/chapter_sorting/bubble_sort.cs class bubble_sort (line 9) | public class bubble_sort { method BubbleSort (line 11) | void BubbleSort(int[] nums) { method BubbleSortWithFlag (line 25) | void BubbleSortWithFlag(int[] nums) { method Test (line 41) | [Test] FILE: en/codes/csharp/chapter_sorting/bucket_sort.cs class bucket_sort (line 9) | public class bucket_sort { method BucketSort (line 11) | void BucketSort(float[] nums) { method Test (line 39) | [Test] FILE: en/codes/csharp/chapter_sorting/counting_sort.cs class counting_sort (line 9) | public class counting_sort { method CountingSortNaive (line 12) | void CountingSortNaive(int[] nums) { method CountingSort (line 35) | void CountingSort(int[] nums) { method Test (line 67) | [Test] FILE: en/codes/csharp/chapter_sorting/heap_sort.cs class heap_sort (line 9) | public class heap_sort { method SiftDown (line 11) | void SiftDown(int[] nums, int n, int i) { method HeapSort (line 32) | void HeapSort(int[] nums) { method Test (line 46) | [Test] FILE: en/codes/csharp/chapter_sorting/insertion_sort.cs class insertion_sort (line 9) | public class insertion_sort { method InsertionSort (line 11) | void InsertionSort(int[] nums) { method Test (line 24) | [Test] FILE: en/codes/csharp/chapter_sorting/merge_sort.cs class merge_sort (line 9) | public class merge_sort { method Merge (line 11) | void Merge(int[] nums, int left, int mid, int right) { method MergeSort (line 38) | void MergeSort(int[] nums, int left, int right) { method Test (line 49) | [Test] FILE: en/codes/csharp/chapter_sorting/quick_sort.cs class quickSort (line 9) | class quickSort { method Swap (line 11) | static void Swap(int[] nums, int i, int j) { method Partition (line 16) | static int Partition(int[] nums, int left, int right) { method QuickSort (line 31) | public static void QuickSort(int[] nums, int left, int right) { class QuickSortMedian (line 44) | class QuickSortMedian { method Swap (line 46) | static void Swap(int[] nums, int i, int j) { method MedianThree (line 51) | static int MedianThree(int[] nums, int left, int mid, int right) { method Partition (line 61) | static int Partition(int[] nums, int left, int right) { method QuickSort (line 80) | public static void QuickSort(int[] nums, int left, int right) { class QuickSortTailCall (line 93) | class QuickSortTailCall { method Swap (line 95) | static void Swap(int[] nums, int i, int j) { method Partition (line 100) | static int Partition(int[] nums, int left, int right) { method QuickSort (line 115) | public static void QuickSort(int[] nums, int left, int right) { class quick_sort (line 132) | public class quick_sort { method Test (line 133) | [Test] FILE: en/codes/csharp/chapter_sorting/radix_sort.cs class radix_sort (line 9) | public class radix_sort { method Digit (line 11) | int Digit(int num, int exp) { method CountingSortDigit (line 17) | void CountingSortDigit(int[] nums, int exp) { method RadixSort (line 45) | void RadixSort(int[] nums) { method Test (line 61) | [Test] FILE: en/codes/csharp/chapter_sorting/selection_sort.cs class selection_sort (line 9) | public class selection_sort { method SelectionSort (line 11) | void SelectionSort(int[] nums) { method Test (line 26) | [Test] FILE: en/codes/csharp/chapter_stack_and_queue/array_deque.cs class ArrayDeque (line 10) | public class ArrayDeque { method ArrayDeque (line 16) | public ArrayDeque(int capacity) { method Capacity (line 22) | int Capacity() { method Size (line 27) | public int Size() { method IsEmpty (line 32) | public bool IsEmpty() { method Index (line 37) | int Index(int i) { method PushFirst (line 45) | public void PushFirst(int num) { method PushLast (line 59) | public void PushLast(int num) { method PopFirst (line 72) | public int PopFirst() { method PopLast (line 81) | public int PopLast() { method PeekFirst (line 88) | public int PeekFirst() { method PeekLast (line 96) | public int PeekLast() { method ToArray (line 106) | public int[] ToArray() { class array_deque (line 116) | public class array_deque { method Test (line 117) | [Test] FILE: en/codes/csharp/chapter_stack_and_queue/array_queue.cs class ArrayQueue (line 10) | class ArrayQueue { method ArrayQueue (line 15) | public ArrayQueue(int capacity) { method Capacity (line 21) | int Capacity() { method Size (line 26) | public int Size() { method IsEmpty (line 31) | public bool IsEmpty() { method Push (line 36) | public void Push(int num) { method Pop (line 50) | public int Pop() { method Peek (line 59) | public int Peek() { method ToArray (line 66) | public int[] ToArray() { class array_queue (line 76) | public class array_queue { method Test (line 77) | [Test] FILE: en/codes/csharp/chapter_stack_and_queue/array_stack.cs class ArrayStack (line 10) | class ArrayStack { method ArrayStack (line 12) | public ArrayStack() { method Size (line 18) | public int Size() { method IsEmpty (line 23) | public bool IsEmpty() { method Push (line 28) | public void Push(int num) { method Pop (line 33) | public int Pop() { method Peek (line 42) | public int Peek() { method ToArray (line 49) | public int[] ToArray() { class array_stack (line 54) | public class array_stack { method Test (line 55) | [Test] FILE: en/codes/csharp/chapter_stack_and_queue/deque.cs class deque (line 9) | public class deque { method Test (line 10) | [Test] FILE: en/codes/csharp/chapter_stack_and_queue/linkedlist_deque.cs class ListNode (line 10) | public class ListNode(int val) { class LinkedListDeque (line 17) | public class LinkedListDeque { method LinkedListDeque (line 21) | public LinkedListDeque() { method Size (line 27) | public int Size() { method IsEmpty (line 32) | public bool IsEmpty() { method Push (line 37) | void Push(int num, bool isFront) { method PushFirst (line 63) | public void PushFirst(int num) { method PushLast (line 68) | public void PushLast(int num) { method Pop (line 73) | int? Pop(bool isFront) { method PopFirst (line 105) | public int? PopFirst() { method PopLast (line 110) | public int? PopLast() { method PeekFirst (line 115) | public int? PeekFirst() { method PeekLast (line 122) | public int? PeekLast() { method ToArray (line 129) | public int?[] ToArray() { class linkedlist_deque (line 141) | public class linkedlist_deque { method Test (line 142) | [Test] FILE: en/codes/csharp/chapter_stack_and_queue/linkedlist_queue.cs class LinkedListQueue (line 10) | class LinkedListQueue { method LinkedListQueue (line 14) | public LinkedListQueue() { method Size (line 20) | public int Size() { method IsEmpty (line 25) | public bool IsEmpty() { method Push (line 30) | public void Push(int num) { method Pop (line 46) | public int Pop() { method Peek (line 55) | public int Peek() { method ToArray (line 62) | public int[] ToArray() { class linkedlist_queue (line 76) | public class linkedlist_queue { method Test (line 77) | [Test] FILE: en/codes/csharp/chapter_stack_and_queue/linkedlist_stack.cs class LinkedListStack (line 10) | class LinkedListStack { method LinkedListStack (line 14) | public LinkedListStack() { method Size (line 19) | public int Size() { method IsEmpty (line 24) | public bool IsEmpty() { method Push (line 29) | public void Push(int num) { method Pop (line 38) | public int Pop() { method Peek (line 46) | public int Peek() { method ToArray (line 53) | public int[] ToArray() { class linkedlist_stack (line 67) | public class linkedlist_stack { method Test (line 68) | [Test] FILE: en/codes/csharp/chapter_stack_and_queue/queue.cs class queue (line 9) | public class queue { method Test (line 10) | [Test] FILE: en/codes/csharp/chapter_stack_and_queue/stack.cs class stack (line 9) | public class stack { method Test (line 10) | [Test] FILE: en/codes/csharp/chapter_tree/array_binary_tree.cs class ArrayBinaryTree (line 10) | public class ArrayBinaryTree(List arr) { method Size (line 14) | public int Size() { method Val (line 19) | public int? Val(int i) { method Left (line 27) | public int Left(int i) { method Right (line 32) | public int Right(int i) { method Parent (line 37) | public int Parent(int i) { method LevelOrder (line 42) | public List LevelOrder() { method DFS (line 53) | void DFS(int i, string order, List res) { method PreOrder (line 71) | public List PreOrder() { method InOrder (line 78) | public List InOrder() { method PostOrder (line 85) | public List PostOrder() { class array_binary_tree (line 92) | public class array_binary_tree { method Test (line 93) | [Test] FILE: en/codes/csharp/chapter_tree/avl_tree.cs class AVLTree (line 10) | class AVLTree { method Height (line 14) | int Height(TreeNode? node) { method UpdateHeight (line 20) | void UpdateHeight(TreeNode node) { method BalanceFactor (line 26) | public int BalanceFactor(TreeNode? node) { method RightRotate (line 34) | TreeNode? RightRotate(TreeNode? node) { method LeftRotate (line 48) | TreeNode? LeftRotate(TreeNode? node) { method Rotate (line 62) | TreeNode? Rotate(TreeNode? node) { method Insert (line 92) | public void Insert(int val) { method InsertHelper (line 97) | TreeNode? InsertHelper(TreeNode? node, int val) { method Remove (line 114) | public void Remove(int val) { method RemoveHelper (line 119) | TreeNode? RemoveHelper(TreeNode? node, int val) { method Search (line 153) | public TreeNode? Search(int val) { class avl_tree (line 172) | public class avl_tree { method TestInsert (line 173) | static void TestInsert(AVLTree tree, int val) { method TestRemove (line 179) | static void TestRemove(AVLTree tree, int val) { method Test (line 185) | [Test] FILE: en/codes/csharp/chapter_tree/binary_search_tree.cs class BinarySearchTree (line 9) | class BinarySearchTree { method BinarySearchTree (line 12) | public BinarySearchTree() { method GetRoot (line 18) | public TreeNode? GetRoot() { method Search (line 23) | public TreeNode? Search(int num) { method Insert (line 42) | public void Insert(int num) { method Remove (line 75) | public void Remove(int num) { class binary_search_tree (line 126) | public class binary_search_tree { method Test (line 127) | [Test] FILE: en/codes/csharp/chapter_tree/binary_tree.cs class binary_tree (line 9) | public class binary_tree { method Test (line 10) | [Test] FILE: en/codes/csharp/chapter_tree/binary_tree_bfs.cs class binary_tree_bfs (line 9) | public class binary_tree_bfs { method LevelOrder (line 12) | List LevelOrder(TreeNode root) { method Test (line 29) | [Test] FILE: en/codes/csharp/chapter_tree/binary_tree_dfs.cs class binary_tree_dfs (line 9) | public class binary_tree_dfs { method PreOrder (line 13) | void PreOrder(TreeNode? root) { method InOrder (line 22) | void InOrder(TreeNode? root) { method PostOrder (line 31) | void PostOrder(TreeNode? root) { method Test (line 39) | [Test] FILE: en/codes/csharp/utils/ListNode.cs class ListNode (line 8) | public class ListNode(int x) { method ArrToLinkedList (line 13) | public static ListNode? ArrToLinkedList(int[] arr) { method ToString (line 23) | public override string? ToString() { FILE: en/codes/csharp/utils/PrintUtil.cs class Trunk (line 9) | public class Trunk(Trunk? prev, string str) { class PrintUtil (line 14) | public static class PrintUtil { method PrintList (line 16) | public static void PrintList(IList list) { method PrintList (line 20) | public static string PrintList(this IEnumerable list) { method PrintMatrix (line 25) | public static void PrintMatrix(T[][] matrix) { method PrintMatrix (line 34) | public static void PrintMatrix(List> matrix) { method PrintLinkedList (line 43) | public static void PrintLinkedList(ListNode? head) { method PrintTree (line 57) | public static void PrintTree(TreeNode? root) { method PrintTree (line 62) | public static void PrintTree(TreeNode? root, Trunk? prev, bool isRight) { method ShowTrunks (line 93) | public static void ShowTrunks(Trunk? p) { method PrintHashMap (line 103) | public static void PrintHashMap(Dictionary map) where K : ... method PrintHeap (line 110) | public static void PrintHeap(Queue queue) { method PrintHeap (line 120) | public static void PrintHeap(PriorityQueue queue) { FILE: en/codes/csharp/utils/TreeNode.cs class TreeNode (line 10) | public class TreeNode(int? x) { method ListToTreeDFS (line 33) | static TreeNode? ListToTreeDFS(List arr, int i) { method ListToTree (line 45) | public static TreeNode? ListToTree(List arr) { method TreeToListDFS (line 50) | static void TreeToListDFS(TreeNode? root, int i, List res) { method TreeToList (line 62) | public static List TreeToList(TreeNode root) { FILE: en/codes/csharp/utils/Vertex.cs class Vertex (line 10) | public class Vertex(int val) { method ValsToVets (line 14) | public static Vertex[] ValsToVets(int[] vals) { method VetsToVals (line 23) | public static List VetsToVals(List vets) { FILE: en/codes/dart/build.dart function main (line 3) | void main() FILE: en/codes/dart/chapter_array_and_linkedlist/array.dart function randomAccess (line 12) | int randomAccess(List nums) function extend (line 21) | List extend(List nums, int enlarge) function insert (line 33) | void insert(List nums, int _num, int index) function remove (line 43) | void remove(List nums, int index) function traverse (line 51) | void traverse(List nums) function find (line 68) | int find(List nums, int target) function main (line 76) | void main() FILE: en/codes/dart/chapter_array_and_linkedlist/linked_list.dart function insert (line 11) | void insert(ListNode n0, ListNode P) function remove (line 18) | void remove(ListNode n0) function access (line 27) | ListNode? access(ListNode? head, int index) function find (line 36) | int find(ListNode? head, int target) function main (line 49) | void main() FILE: en/codes/dart/chapter_array_and_linkedlist/list.dart function main (line 10) | void main() FILE: en/codes/dart/chapter_array_and_linkedlist/my_list.dart class MyList (line 8) | class MyList { method size (line 20) | int size() method capacity (line 23) | int capacity() method get (line 26) | int get(int index) method set (line 32) | void set(int index, int _num) method add (line 38) | void add(int _num) method insert (line 47) | void insert(int index, int _num) method remove (line 61) | int remove(int index) method extendCapacity (line 75) | void extendCapacity() method toArray (line 87) | List toArray() function main (line 97) | void main() FILE: en/codes/dart/chapter_backtracking/n_queens.dart function backtrack (line 8) | void backtrack( function nQueens (line 50) | List>> nQueens(int n) function main (line 64) | void main() FILE: en/codes/dart/chapter_backtracking/permutations_i.dart function backtrack (line 8) | void backtrack( function permutationsI (line 37) | List> permutationsI(List nums) function main (line 44) | void main() FILE: en/codes/dart/chapter_backtracking/permutations_ii.dart function backtrack (line 8) | void backtrack( function permutationsII (line 39) | List> permutationsII(List nums) function main (line 46) | void main() FILE: en/codes/dart/chapter_backtracking/preorder_traversal_i_compact.dart function preOrder (line 11) | void preOrder(TreeNode? root, List res) function main (line 24) | void main() FILE: en/codes/dart/chapter_backtracking/preorder_traversal_ii_compact.dart function preOrder (line 11) | void preOrder( function main (line 33) | void main() FILE: en/codes/dart/chapter_backtracking/preorder_traversal_iii_compact.dart function preOrder (line 11) | void preOrder( function main (line 33) | void main() FILE: en/codes/dart/chapter_backtracking/preorder_traversal_iii_template.dart function isSolution (line 11) | bool isSolution(List state) function recordSolution (line 16) | void recordSolution(List state, List> res) function isValid (line 21) | bool isValid(List state, TreeNode? choice) function makeChoice (line 26) | void makeChoice(List state, TreeNode? choice) function undoChoice (line 31) | void undoChoice(List state, TreeNode? choice) function backtrack (line 36) | void backtrack( function main (line 61) | void main() FILE: en/codes/dart/chapter_backtracking/subset_sum_i.dart function backtrack (line 8) | void backtrack( function subsetSumI (line 38) | List> subsetSumI(List nums, int target) function main (line 48) | void main() FILE: en/codes/dart/chapter_backtracking/subset_sum_i_naive.dart function backtrack (line 8) | void backtrack( function subsetSumINaive (line 36) | List> subsetSumINaive(List nums, int target) function main (line 45) | void main() FILE: en/codes/dart/chapter_backtracking/subset_sum_ii.dart function backtrack (line 8) | void backtrack( function subsetSumII (line 43) | List> subsetSumII(List nums, int target) function main (line 53) | void main() FILE: en/codes/dart/chapter_computational_complexity/iteration.dart function forLoop (line 8) | int forLoop(int n) function whileLoop (line 18) | int whileLoop(int n) function whileLoopII (line 30) | int whileLoopII(int n) function nestedForLoop (line 44) | String nestedForLoop(int n) function main (line 57) | void main() FILE: en/codes/dart/chapter_computational_complexity/recursion.dart function recur (line 8) | int recur(int n) function forLoopRecur (line 18) | int forLoopRecur(int n) function tailRecur (line 37) | int tailRecur(int n, int res) function fib (line 45) | int fib(int n) function main (line 55) | void main() FILE: en/codes/dart/chapter_computational_complexity/space_complexity.dart function function (line 15) | int function() function constant (line 21) | void constant(int n) function linear (line 38) | void linear(int n) function linearRecur (line 54) | void linearRecur(int n) function quadratic (line 61) | void quadratic(int n) function quadraticRecur (line 76) | int quadraticRecur(int n) function buildTree (line 84) | TreeNode? buildTree(int n) function main (line 93) | void main() FILE: en/codes/dart/chapter_computational_complexity/time_complexity.dart function constant (line 10) | int constant(int n) function linear (line 20) | int linear(int n) function arrayTraversal (line 29) | int arrayTraversal(List nums) function quadratic (line 39) | int quadratic(int n) function bubbleSort (line 51) | int bubbleSort(List nums) function exponential (line 70) | int exponential(int n) function expRecur (line 84) | int expRecur(int n) function logarithmic (line 90) | int logarithmic(int n) function logRecur (line 100) | int logRecur(int n) function linearLogRecur (line 106) | int linearLogRecur(int n) function factorialRecur (line 116) | int factorialRecur(int n) function main (line 127) | void main() FILE: en/codes/dart/chapter_computational_complexity/worst_best_time_complexity.dart function randomNumbers (line 8) | List randomNumbers(int n) function findOne (line 21) | int findOne(List nums) function main (line 32) | void main() FILE: en/codes/dart/chapter_divide_and_conquer/binary_search_recur.dart function dfs (line 8) | int dfs(List nums, int target, int i, int j) function binarySearch (line 28) | int binarySearch(List nums, int target) function main (line 35) | void main() FILE: en/codes/dart/chapter_divide_and_conquer/build_tree.dart function dfs (line 11) | TreeNode? dfs( function buildTree (line 35) | TreeNode? buildTree(List preorder, List inorder) function main (line 46) | void main() FILE: en/codes/dart/chapter_divide_and_conquer/hanota.dart function move (line 8) | void move(List src, List tar) function dfs (line 16) | void dfs(int i, List src, List buf, List tar) function solveHanota (line 31) | void solveHanota(List A, List B, List C) function main (line 38) | void main() FILE: en/codes/dart/chapter_dynamic_programming/climbing_stairs_backtrack.dart function backtrack (line 8) | void backtrack(List choices, int state, int n, List res) function climbingStairsBacktrack (line 24) | int climbingStairsBacktrack(int n) function main (line 34) | void main() FILE: en/codes/dart/chapter_dynamic_programming/climbing_stairs_constraint_dp.dart function climbingStairsConstraintDP (line 8) | int climbingStairsConstraintDP(int n) function main (line 28) | void main() FILE: en/codes/dart/chapter_dynamic_programming/climbing_stairs_dfs.dart function dfs (line 8) | int dfs(int i) function climbingStairsDFS (line 17) | int climbingStairsDFS(int n) function main (line 22) | void main() FILE: en/codes/dart/chapter_dynamic_programming/climbing_stairs_dfs_mem.dart function dfs (line 8) | int dfs(int i, List mem) function climbingStairsDFSMem (line 21) | int climbingStairsDFSMem(int n) function main (line 28) | void main() FILE: en/codes/dart/chapter_dynamic_programming/climbing_stairs_dp.dart function climbingStairsDP (line 8) | int climbingStairsDP(int n) function climbingStairsDPComp (line 23) | int climbingStairsDPComp(int n) function main (line 35) | void main() FILE: en/codes/dart/chapter_dynamic_programming/coin_change.dart function coinChangeDP (line 10) | int coinChangeDP(List coins, int amt) function coinChangeDPComp (line 35) | int coinChangeDPComp(List coins, int amt) function main (line 57) | void main() FILE: en/codes/dart/chapter_dynamic_programming/coin_change_ii.dart function coinChangeIIDP (line 8) | int coinChangeIIDP(List coins, int amt) function coinChangeIIDPComp (line 32) | int coinChangeIIDPComp(List coins, int amt) function main (line 53) | void main() FILE: en/codes/dart/chapter_dynamic_programming/edit_distance.dart function editDistanceDFS (line 10) | int editDistanceDFS(String s, String t, int i, int j) function editDistanceDFSMem (line 28) | int editDistanceDFSMem(String s, String t, List> mem, int i, i... function editDistanceDP (line 49) | int editDistanceDP(String s, String t) function editDistanceDPComp (line 75) | int editDistanceDPComp(String s, String t) function main (line 104) | void main() FILE: en/codes/dart/chapter_dynamic_programming/knapsack.dart function knapsackDFS (line 10) | int knapsackDFS(List wgt, List val, int i, int c) function knapsackDFSMem (line 27) | int knapsackDFSMem( function knapsackDP (line 55) | int knapsackDP(List wgt, List val, int cap) function knapsackDPComp (line 75) | int knapsackDPComp(List wgt, List val, int cap) function main (line 93) | void main() FILE: en/codes/dart/chapter_dynamic_programming/min_cost_climbing_stairs_dp.dart function minCostClimbingStairsDP (line 10) | int minCostClimbingStairsDP(List cost) function minCostClimbingStairsDPComp (line 26) | int minCostClimbingStairsDPComp(List cost) function main (line 39) | void main() FILE: en/codes/dart/chapter_dynamic_programming/min_path_sum.dart function minPathSumDFS (line 10) | int minPathSumDFS(List> grid, int i, int j) function minPathSumDFSMem (line 28) | int minPathSumDFSMem(List> grid, List> mem, int i, i... function minPathSumDP (line 51) | int minPathSumDP(List> grid) function minPathSumDPComp (line 74) | int minPathSumDPComp(List> grid) function main (line 95) | void main() FILE: en/codes/dart/chapter_dynamic_programming/unbounded_knapsack.dart function unboundedKnapsackDP (line 10) | int unboundedKnapsackDP(List wgt, List val, int cap) function unboundedKnapsackDPComp (line 30) | int unboundedKnapsackDPComp(List wgt, List val, int cap) function main (line 50) | void main() FILE: en/codes/dart/chapter_graph/graph_adjacency_list.dart class GraphAdjList (line 10) | class GraphAdjList { method size (line 24) | int size() method addEdge (line 29) | void addEdge(Vertex vet1, Vertex vet2) method removeEdge (line 41) | void removeEdge(Vertex vet1, Vertex vet2) method addVertex (line 53) | void addVertex(Vertex vet) method removeVertex (line 60) | void removeVertex(Vertex vet) method printAdjList (line 73) | void printAdjList() function main (line 86) | void main() FILE: en/codes/dart/chapter_graph/graph_adjacency_matrix.dart class GraphAdjMat (line 10) | class GraphAdjMat { method size (line 30) | int size() method addVertex (line 35) | void addVertex(int val) method removeVertex (line 49) | void removeVertex(int index) method addEdge (line 65) | void addEdge(int i, int j) method removeEdge (line 77) | void removeEdge(int i, int j) method printAdjMat (line 87) | void printAdjMat() function main (line 95) | void main() FILE: en/codes/dart/chapter_graph/graph_bfs.dart function graphBFS (line 13) | List graphBFS(GraphAdjList graph, Vertex startVet) function main (line 41) | void main() FILE: en/codes/dart/chapter_graph/graph_dfs.dart function dfs (line 11) | void dfs( function graphDFS (line 30) | List graphDFS(GraphAdjList graph, Vertex startVet) function main (line 40) | void main() FILE: en/codes/dart/chapter_greedy/coin_change_greedy.dart function coinChangeGreedy (line 8) | int coinChangeGreedy(List coins, int amt) function main (line 27) | void main() FILE: en/codes/dart/chapter_greedy/fractional_knapsack.dart class Item (line 8) | class Item { function fractionalKnapsack (line 16) | double fractionalKnapsack(List wgt, List val, int cap) function main (line 39) | void main() FILE: en/codes/dart/chapter_greedy/max_capacity.dart function maxCapacity (line 10) | int maxCapacity(List ht) function main (line 31) | void main() FILE: en/codes/dart/chapter_greedy/max_product_cutting.dart function maxProductCutting (line 10) | int maxProductCutting(int n) function main (line 31) | void main() FILE: en/codes/dart/chapter_hashing/array_hash_map.dart class Pair (line 8) | class Pair { class ArrayHashMap (line 15) | class ArrayHashMap { method _hashFunc (line 24) | int _hashFunc(int key) method get (line 30) | String? get(int key) method put (line 40) | void put(int key, String val) method remove (line 47) | void remove(int key) method pairSet (line 53) | List pairSet() method keySet (line 64) | List keySet() method values (line 75) | List values() method printHashMap (line 86) | void printHashMap() function main (line 94) | void main() FILE: en/codes/dart/chapter_hashing/built_in_hash.dart function main (line 10) | void main() FILE: en/codes/dart/chapter_hashing/hash_map.dart function main (line 8) | void main() FILE: en/codes/dart/chapter_hashing/hash_map_chaining.dart class HashMapChaining (line 10) | class HashMapChaining { method hashFunc (line 27) | int hashFunc(int key) method loadFactor (line 32) | double loadFactor() method get (line 37) | String? get(int key) method put (line 51) | void put(int key, String val) method remove (line 72) | void remove(int key) method extend (line 86) | void extend() method printHashMap (line 102) | void printHashMap() function main (line 114) | void main() FILE: en/codes/dart/chapter_hashing/hash_map_open_addressing.dart class HashMapOpenAddressing (line 10) | class HashMapOpenAddressing { method hashFunc (line 25) | int hashFunc(int key) method loadFactor (line 30) | double loadFactor() method findBucket (line 35) | int findBucket(int key) method get (line 62) | String? get(int key) method put (line 74) | void put(int key, String val) method remove (line 92) | void remove(int key) method extend (line 103) | void extend() method printHashMap (line 119) | void printHashMap() function main (line 133) | void main() FILE: en/codes/dart/chapter_hashing/simple_hash.dart function addHash (line 8) | int addHash(String key) function mulHash (line 18) | int mulHash(String key) function xorHash (line 28) | int xorHash(String key) function rotHash (line 38) | int rotHash(String key) function main (line 48) | void main() FILE: en/codes/dart/chapter_heap/my_heap.dart class MaxHeap (line 10) | class MaxHeap { method _left (line 24) | int _left(int i) method _right (line 29) | int _right(int i) method _parent (line 34) | int _parent(int i) method _swap (line 39) | void _swap(int i, int j) method size (line 46) | int size() method isEmpty (line 51) | bool isEmpty() method peek (line 56) | int peek() method push (line 61) | void push(int val) method siftUp (line 69) | void siftUp(int i) method pop (line 85) | int pop() method siftDown (line 99) | void siftDown(int i) method print (line 117) | void print() function main (line 123) | void main() FILE: en/codes/dart/chapter_heap/top_k.dart function topKHeap (line 10) | MinHeap topKHeap(List nums, int k) function main (line 25) | void main() class MinHeap (line 35) | class MinHeap { method getHeap (line 49) | List getHeap() method _left (line 54) | int _left(int i) method _right (line 59) | int _right(int i) method _parent (line 64) | int _parent(int i) method _swap (line 69) | void _swap(int i, int j) method size (line 76) | int size() method isEmpty (line 81) | bool isEmpty() method peek (line 86) | int peek() method push (line 91) | void push(int val) method siftUp (line 99) | void siftUp(int i) method pop (line 115) | int pop() method siftDown (line 129) | void siftDown(int i) method print (line 147) | void print() FILE: en/codes/dart/chapter_searching/binary_search.dart function binarySearch (line 8) | int binarySearch(List nums, int target) function binarySearchLCRO (line 30) | int binarySearchLCRO(List nums, int target) function main (line 52) | void main() FILE: en/codes/dart/chapter_searching/binary_search_edge.dart function binarySearchLeftEdge (line 10) | int binarySearchLeftEdge(List nums, int target) function binarySearchRightEdge (line 22) | int binarySearchRightEdge(List nums, int target) function main (line 36) | void main() FILE: en/codes/dart/chapter_searching/binary_search_insertion.dart function binarySearchInsertionSimple (line 8) | int binarySearchInsertionSimple(List nums, int target) function binarySearchInsertion (line 25) | int binarySearchInsertion(List nums, int target) function main (line 42) | void main() FILE: en/codes/dart/chapter_searching/hashing_search.dart function hashingSearchArray (line 11) | int hashingSearchArray(Map map, int target) function hashingSearchLinkedList (line 21) | ListNode? hashingSearchLinkedList(Map map, int target) function main (line 31) | void main() FILE: en/codes/dart/chapter_searching/linear_search.dart function linearSearchArray (line 10) | int linearSearchArray(List nums, int target) function linearSearchList (line 23) | ListNode? linearSearchList(ListNode? head, int target) function main (line 35) | void main() FILE: en/codes/dart/chapter_searching/two_sum.dart function twoSumBruteForce (line 10) | List twoSumBruteForce(List nums, int target) function twoSumHashTable (line 22) | List twoSumHashTable(List nums, int target) function main (line 37) | void main() FILE: en/codes/dart/chapter_sorting/bubble_sort.dart function bubbleSort (line 8) | void bubbleSort(List nums) function bubbleSortWithFlag (line 24) | void bubbleSortWithFlag(List nums) function main (line 43) | void main() FILE: en/codes/dart/chapter_sorting/bucket_sort.dart function bucketSort (line 8) | void bucketSort(List nums) function main (line 34) | void main() FILE: en/codes/dart/chapter_sorting/counting_sort.dart function countingSortNaive (line 10) | void countingSortNaive(List nums) function countingSort (line 33) | void countingSort(List nums) function main (line 64) | void main() FILE: en/codes/dart/chapter_sorting/heap_sort.dart function siftDown (line 8) | void siftDown(List nums, int n, int i) function heapSort (line 28) | void heapSort(List nums) function main (line 45) | void main() FILE: en/codes/dart/chapter_sorting/insertion_sort.dart function insertionSort (line 8) | void insertionSort(List nums) function main (line 22) | void main() FILE: en/codes/dart/chapter_sorting/merge_sort.dart function merge (line 8) | void merge(List nums, int left, int mid, int right) function mergeSort (line 35) | void mergeSort(List nums, int left, int right) function main (line 47) | void main() FILE: en/codes/dart/chapter_sorting/quick_sort.dart class QuickSort (line 8) | class QuickSort { method _swap (line 10) | void _swap(List nums, int i, int j) method _partition (line 17) | int _partition(List nums, int left, int right) method quickSort (line 30) | void quickSort(List nums, int left, int right) class QuickSortMedian (line 42) | class QuickSortMedian { method _swap (line 44) | void _swap(List nums, int i, int j) method _medianThree (line 51) | int _medianThree(List nums, int left, int mid, int right) method _partition (line 61) | int _partition(List nums, int left, int right) method quickSort (line 78) | void quickSort(List nums, int left, int right) class QuickSortTailCall (line 90) | class QuickSortTailCall { method _swap (line 92) | void _swap(List nums, int i, int j) method _partition (line 99) | int _partition(List nums, int left, int right) method quickSort (line 112) | void quickSort(List nums, int left, int right) function main (line 130) | void main() FILE: en/codes/dart/chapter_sorting/radix_sort.dart function digit (line 8) | int digit(int _num, int exp) function countingSortDigit (line 14) | void countingSortDigit(List nums, int exp) function radixSort (line 40) | void radixSort(List nums) function main (line 55) | void main() FILE: en/codes/dart/chapter_sorting/selection_sort.dart function selectionSort (line 8) | void selectionSort(List nums) function main (line 25) | void main() FILE: en/codes/dart/chapter_stack_and_queue/array_deque.dart class ArrayDeque (line 8) | class ArrayDeque { method capacity (line 20) | int capacity() method size (line 25) | int size() method isEmpty (line 30) | bool isEmpty() method index (line 35) | int index(int i) method pushFirst (line 43) | void pushFirst(int _num) method pushLast (line 56) | void pushLast(int _num) method popFirst (line 68) | int popFirst() method popLast (line 77) | int popLast() method peekFirst (line 84) | int peekFirst() method peekLast (line 92) | int peekLast() method toArray (line 102) | List toArray() function main (line 113) | void main() FILE: en/codes/dart/chapter_stack_and_queue/array_queue.dart class ArrayQueue (line 8) | class ArrayQueue { method capaCity (line 19) | int capaCity() method size (line 24) | int size() method isEmpty (line 29) | bool isEmpty() method push (line 34) | void push(int _num) method pop (line 47) | int pop() method peek (line 56) | int peek() method toArray (line 64) | List toArray() function main (line 75) | void main() FILE: en/codes/dart/chapter_stack_and_queue/array_stack.dart class ArrayStack (line 8) | class ArrayStack { method size (line 15) | int size() method isEmpty (line 20) | bool isEmpty() method push (line 25) | void push(int _num) method pop (line 30) | int pop() method peek (line 38) | int peek() method toArray (line 46) | List toArray() function main (line 50) | void main() FILE: en/codes/dart/chapter_stack_and_queue/deque.dart function main (line 9) | void main() FILE: en/codes/dart/chapter_stack_and_queue/linkedlist_deque.dart class ListNode (line 8) | class ListNode { class LinkedListDeque (line 17) | class LinkedListDeque { method size (line 28) | int size() method isEmpty (line 33) | bool isEmpty() method push (line 38) | void push(int _num, bool isFront) method pushFirst (line 60) | void pushFirst(int _num) method pushLast (line 65) | void pushLast(int _num) method pop (line 70) | int? pop(bool isFront) method popFirst (line 102) | int? popFirst() method popLast (line 107) | int? popLast() method peekFirst (line 112) | int? peekFirst() method peekLast (line 117) | int? peekLast() method toArray (line 122) | List toArray() function main (line 134) | void main() FILE: en/codes/dart/chapter_stack_and_queue/linkedlist_queue.dart class LinkedListQueue (line 10) | class LinkedListQueue { method size (line 21) | int size() method isEmpty (line 26) | bool isEmpty() method push (line 31) | void push(int _num) method pop (line 47) | int pop() method peek (line 56) | int peek() method toArray (line 64) | List toArray() function main (line 76) | void main() FILE: en/codes/dart/chapter_stack_and_queue/linkedlist_stack.dart class LinkedListStack (line 10) | class LinkedListStack { method size (line 19) | int size() method isEmpty (line 24) | bool isEmpty() method push (line 29) | void push(int _num) method pop (line 37) | int pop() method peek (line 45) | int peek() method toList (line 53) | List toList() function main (line 66) | void main() FILE: en/codes/dart/chapter_stack_and_queue/queue.dart function main (line 9) | void main() FILE: en/codes/dart/chapter_stack_and_queue/stack.dart function main (line 7) | void main() FILE: en/codes/dart/chapter_tree/array_binary_tree.dart class ArrayBinaryTree (line 11) | class ArrayBinaryTree { method size (line 18) | int size() method val (line 23) | int? val(int i) method left (line 32) | int? left(int i) method right (line 37) | int? right(int i) method parent (line 42) | int? parent(int i) method levelOrder (line 47) | List levelOrder() method dfs (line 58) | void dfs(int i, String order, List res) method preOrder (line 80) | List preOrder() method inOrder (line 87) | List inOrder() method postOrder (line 94) | List postOrder() function main (line 102) | void main() FILE: en/codes/dart/chapter_tree/avl_tree.dart class AVLTree (line 11) | class AVLTree { method height (line 20) | int height(TreeNode? node) method updateHeight (line 26) | void updateHeight(TreeNode? node) method balanceFactor (line 32) | int balanceFactor(TreeNode? node) method rightRotate (line 40) | TreeNode? rightRotate(TreeNode? node) method leftRotate (line 54) | TreeNode? leftRotate(TreeNode? node) method rotate (line 68) | TreeNode? rotate(TreeNode? node) method insert (line 98) | void insert(int val) method insertHelper (line 103) | TreeNode? insertHelper(TreeNode? node, int val) method remove (line 120) | void remove(int val) method removeHelper (line 125) | TreeNode? removeHelper(TreeNode? node, int val) method search (line 159) | TreeNode? search(int val) function testInsert (line 177) | void testInsert(AVLTree tree, int val) function testRemove (line 183) | void testRemove(AVLTree tree, int val) function main (line 190) | void main() FILE: en/codes/dart/chapter_tree/binary_search_tree.dart class BinarySearchTree (line 11) | class BinarySearchTree { method getRoot (line 21) | TreeNode? getRoot() method search (line 26) | TreeNode? search(int _num) method insert (line 45) | void insert(int _num) method remove (line 74) | void remove(int _num) function main (line 123) | void main() FILE: en/codes/dart/chapter_tree/binary_tree.dart function main (line 10) | void main() FILE: en/codes/dart/chapter_tree/binary_tree_bfs.dart function levelOrder (line 12) | List levelOrder(TreeNode? root) function main (line 28) | void main() FILE: en/codes/dart/chapter_tree/binary_tree_dfs.dart function preOrder (line 14) | void preOrder(TreeNode? node) function inOrder (line 23) | void inOrder(TreeNode? node) function postOrder (line 32) | void postOrder(TreeNode? node) function main (line 41) | void main() FILE: en/codes/dart/utils/list_node.dart class ListNode (line 8) | class ListNode { function listToLinkedList (line 16) | ListNode? listToLinkedList(List list) FILE: en/codes/dart/utils/print_util.dart class Trunk (line 12) | class Trunk { function printMatrix (line 20) | void printMatrix(List> matrix) function printLinkedList (line 29) | void printLinkedList(ListNode? head) function printTree (line 45) | void printTree(TreeNode? root, [Trunk? prev = null, bool isRight = false]) function showTrunks (line 75) | void showTrunks(Trunk? p) function printHeap (line 85) | void printHeap(List heap) FILE: en/codes/dart/utils/tree_node.dart class TreeNode (line 8) | class TreeNode { function listToTreeDFS (line 19) | TreeNode? listToTreeDFS(List arr, int i) function listToTree (line 30) | TreeNode? listToTree(List arr) function treeToListDFS (line 35) | void treeToListDFS(TreeNode? root, int i, List res) function treeToList (line 46) | List treeToList(TreeNode? root) FILE: en/codes/dart/utils/vertex.dart class Vertex (line 8) | class Vertex { method valsToVets (line 13) | List valsToVets(List vals) method vetsToVals (line 22) | List vetsToVals(List vets) FILE: en/codes/go/chapter_array_and_linkedlist/array.go function randomAccess (line 12) | func randomAccess(nums []int) (randomNum int) { function extend (line 21) | func extend(nums []int, enlarge int) []int { function insert (line 33) | func insert(nums []int, num int, index int) { function remove (line 43) | func remove(nums []int, index int) { function traverse (line 51) | func traverse(nums []int) { function find (line 70) | func find(nums []int, target int) (index int) { FILE: en/codes/go/chapter_array_and_linkedlist/array_test.go function TestArray (line 18) | func TestArray(t *testing.T) { FILE: en/codes/go/chapter_array_and_linkedlist/linked_list.go function insertNode (line 12) | func insertNode(n0 *ListNode, P *ListNode) { function removeItem (line 19) | func removeItem(n0 *ListNode) { function access (line 30) | func access(head *ListNode, index int) *ListNode { function findNode (line 41) | func findNode(head *ListNode, target int) int { FILE: en/codes/go/chapter_array_and_linkedlist/linked_list_test.go function TestLinkedList (line 14) | func TestLinkedList(t *testing.T) { FILE: en/codes/go/chapter_array_and_linkedlist/list_test.go function TestList (line 14) | func TestList(t *testing.T) { FILE: en/codes/go/chapter_array_and_linkedlist/my_list.go type myList (line 8) | type myList struct method size (line 26) | func (l *myList) size() int { method capacity (line 31) | func (l *myList) capacity() int { method get (line 36) | func (l *myList) get(index int) int { method set (line 45) | func (l *myList) set(num, index int) { method add (line 53) | func (l *myList) add(num int) { method insert (line 64) | func (l *myList) insert(num, index int) { method remove (line 82) | func (l *myList) remove(index int) int { method extendCapacity (line 98) | func (l *myList) extendCapacity() { method toArray (line 106) | func (l *myList) toArray() []int { function newMyList (line 16) | func newMyList() *myList { FILE: en/codes/go/chapter_array_and_linkedlist/my_list_test.go function TestMyList (line 13) | func TestMyList(t *testing.T) { FILE: en/codes/go/chapter_backtracking/n_queens.go function backtrack (line 8) | func backtrack(row, n int, state *[][]string, res *[][][]string, cols, d... function nQueens (line 40) | func nQueens(n int) [][][]string { FILE: en/codes/go/chapter_backtracking/n_queens_test.go function TestNQueens (line 12) | func TestNQueens(t *testing.T) { FILE: en/codes/go/chapter_backtracking/permutation_test.go function TestPermutationI (line 14) | func TestPermutationI(t *testing.T) { function TestPermutationII (line 25) | func TestPermutationII(t *testing.T) { FILE: en/codes/go/chapter_backtracking/permutations_i.go function backtrackI (line 8) | func backtrackI(state *[]int, choices *[]int, selected *[]bool, res *[][... function permutationsI (line 32) | func permutationsI(nums []int) [][]int { FILE: en/codes/go/chapter_backtracking/permutations_ii.go function backtrackII (line 8) | func backtrackII(state *[]int, choices *[]int, selected *[]bool, res *[]... function permutationsII (line 35) | func permutationsII(nums []int) [][]int { FILE: en/codes/go/chapter_backtracking/preorder_traversal_i_compact.go function preOrderI (line 12) | func preOrderI(root *TreeNode, res *[]*TreeNode) { FILE: en/codes/go/chapter_backtracking/preorder_traversal_ii_compact.go function preOrderII (line 12) | func preOrderII(root *TreeNode, res *[][]*TreeNode, path *[]*TreeNode) { FILE: en/codes/go/chapter_backtracking/preorder_traversal_iii_compact.go function preOrderIII (line 12) | func preOrderIII(root *TreeNode, res *[][]*TreeNode, path *[]*TreeNode) { FILE: en/codes/go/chapter_backtracking/preorder_traversal_iii_template.go function isSolution (line 12) | func isSolution(state *[]*TreeNode) bool { function recordSolution (line 17) | func recordSolution(state *[]*TreeNode, res *[][]*TreeNode) { function isValid (line 22) | func isValid(state *[]*TreeNode, choice *TreeNode) bool { function makeChoice (line 27) | func makeChoice(state *[]*TreeNode, choice *TreeNode) { function undoChoice (line 32) | func undoChoice(state *[]*TreeNode, choice *TreeNode) { function backtrackIII (line 37) | func backtrackIII(state *[]*TreeNode, choices *[]*TreeNode, res *[][]*Tr... FILE: en/codes/go/chapter_backtracking/preorder_traversal_test.go function TestPreorderTraversalICompact (line 14) | func TestPreorderTraversalICompact(t *testing.T) { function TestPreorderTraversalIICompact (line 31) | func TestPreorderTraversalIICompact(t *testing.T) { function TestPreorderTraversalIIICompact (line 51) | func TestPreorderTraversalIIICompact(t *testing.T) { function TestPreorderTraversalIIITemplate (line 71) | func TestPreorderTraversalIIITemplate(t *testing.T) { FILE: en/codes/go/chapter_backtracking/subset_sum_i.go function backtrackSubsetSumI (line 10) | func backtrackSubsetSumI(start, target int, state, choices *[]int, res *... function subsetSumI (line 35) | func subsetSumI(nums []int, target int) [][]int { FILE: en/codes/go/chapter_backtracking/subset_sum_i_naive.go function backtrackSubsetSumINaive (line 8) | func backtrackSubsetSumINaive(total, target int, state, choices *[]int, ... function subsetSumINaive (line 31) | func subsetSumINaive(nums []int, target int) [][]int { FILE: en/codes/go/chapter_backtracking/subset_sum_ii.go function backtrackSubsetSumII (line 10) | func backtrackSubsetSumII(start, target int, state, choices *[]int, res ... function subsetSumII (line 40) | func subsetSumII(nums []int, target int) [][]int { FILE: en/codes/go/chapter_backtracking/subset_sum_test.go function TestSubsetSumINaive (line 15) | func TestSubsetSumINaive(t *testing.T) { function TestSubsetSumI (line 30) | func TestSubsetSumI(t *testing.T) { function TestSubsetSumII (line 44) | func TestSubsetSumII(t *testing.T) { FILE: en/codes/go/chapter_computational_complexity/iteration.go function forLoop (line 10) | func forLoop(n int) int { function whileLoop (line 20) | func whileLoop(n int) int { function whileLoopII (line 34) | func whileLoopII(n int) int { function nestedForLoop (line 49) | func nestedForLoop(n int) string { FILE: en/codes/go/chapter_computational_complexity/iteration_test.go function TestIteration (line 13) | func TestIteration(t *testing.T) { FILE: en/codes/go/chapter_computational_complexity/recursion.go function recur (line 10) | func recur(n int) int { function forLoopRecur (line 22) | func forLoopRecur(n int) int { function tailRecur (line 42) | func tailRecur(n int, res int) int { function fib (line 52) | func fib(n int) int { FILE: en/codes/go/chapter_computational_complexity/recursion_test.go function TestRecursion (line 13) | func TestRecursion(t *testing.T) { FILE: en/codes/go/chapter_computational_complexity/space_complexity.go type node (line 15) | type node struct function newNode (line 21) | func newNode(val int) *node { function function (line 26) | func function() int { function spaceConstant (line 32) | func spaceConstant(n int) { function spaceLinear (line 54) | func spaceLinear(n int) { function spaceLinearRecur (line 70) | func spaceLinearRecur(n int) { function spaceQuadratic (line 79) | func spaceQuadratic(n int) { function spaceQuadraticRecur (line 88) | func spaceQuadraticRecur(n int) int { function buildTree (line 98) | func buildTree(n int) *TreeNode { FILE: en/codes/go/chapter_computational_complexity/space_complexity_test.go function TestSpaceComplexity (line 13) | func TestSpaceComplexity(t *testing.T) { FILE: en/codes/go/chapter_computational_complexity/time_complexity.go function constant (line 8) | func constant(n int) int { function linear (line 18) | func linear(n int) int { function arrayTraversal (line 27) | func arrayTraversal(nums []int) int { function quadratic (line 37) | func quadratic(n int) int { function bubbleSort (line 49) | func bubbleSort(nums []int) int { function exponential (line 68) | func exponential(n int) int { function expRecur (line 82) | func expRecur(n int) int { function logarithmic (line 90) | func logarithmic(n int) int { function logRecur (line 100) | func logRecur(n int) int { function linearLogRecur (line 108) | func linearLogRecur(n int) int { function factorialRecur (line 120) | func factorialRecur(n int) int { FILE: en/codes/go/chapter_computational_complexity/time_complexity_test.go function TestTimeComplexity (line 12) | func TestTimeComplexity(t *testing.T) { FILE: en/codes/go/chapter_computational_complexity/worst_best_time_complexity.go function randomNumbers (line 12) | func randomNumbers(n int) []int { function findOne (line 26) | func findOne(nums []int) int { FILE: en/codes/go/chapter_computational_complexity/worst_best_time_complexity_test.go function TestWorstBestTimeComplexity (line 12) | func TestWorstBestTimeComplexity(t *testing.T) { FILE: en/codes/go/chapter_divide_and_conquer/binary_search_recur.go function dfs (line 8) | func dfs(nums []int, target, i, j int) int { function binarySearch (line 31) | func binarySearch(nums []int, target int) int { FILE: en/codes/go/chapter_divide_and_conquer/binary_search_recur_test.go function TestBinarySearch (line 12) | func TestBinarySearch(t *testing.T) { FILE: en/codes/go/chapter_divide_and_conquer/build_tree.go function dfsBuildTree (line 10) | func dfsBuildTree(preorder []int, inorderMap map[int]int, i, l, r int) *... function buildTree (line 28) | func buildTree(preorder, inorder []int) *TreeNode { FILE: en/codes/go/chapter_divide_and_conquer/build_tree_test.go function TestBuildTree (line 14) | func TestBuildTree(t *testing.T) { FILE: en/codes/go/chapter_divide_and_conquer/hanota.go function move (line 10) | func move(src, tar *list.List) { function dfsHanota (line 20) | func dfsHanota(i int, src, buf, tar *list.List) { function solveHanota (line 35) | func solveHanota(A, B, C *list.List) { FILE: en/codes/go/chapter_divide_and_conquer/hanota_test.go function TestHanota (line 15) | func TestHanota(t *testing.T) { FILE: en/codes/go/chapter_dynamic_programming/climbing_stairs_backtrack.go function backtrack (line 8) | func backtrack(choices []int, state, n int, res []int) { function climbingStairsBacktrack (line 26) | func climbingStairsBacktrack(n int) int { FILE: en/codes/go/chapter_dynamic_programming/climbing_stairs_constraint_dp.go function climbingStairsConstraintDP (line 8) | func climbingStairsConstraintDP(n int) int { FILE: en/codes/go/chapter_dynamic_programming/climbing_stairs_dfs.go function dfs (line 8) | func dfs(i int) int { function climbingStairsDFS (line 19) | func climbingStairsDFS(n int) int { FILE: en/codes/go/chapter_dynamic_programming/climbing_stairs_dfs_mem.go function dfsMem (line 8) | func dfsMem(i int, mem []int) int { function climbingStairsDFSMem (line 25) | func climbingStairsDFSMem(n int) int { FILE: en/codes/go/chapter_dynamic_programming/climbing_stairs_dp.go function climbingStairsDP (line 8) | func climbingStairsDP(n int) int { function climbingStairsDPComp (line 25) | func climbingStairsDPComp(n int) int { FILE: en/codes/go/chapter_dynamic_programming/climbing_stairs_test.go function TestClimbingStairsBacktrack (line 12) | func TestClimbingStairsBacktrack(t *testing.T) { function TestClimbingStairsDFS (line 18) | func TestClimbingStairsDFS(t *testing.T) { function TestClimbingStairsDFSMem (line 24) | func TestClimbingStairsDFSMem(t *testing.T) { function TestClimbingStairsDP (line 30) | func TestClimbingStairsDP(t *testing.T) { function TestClimbingStairsDPComp (line 36) | func TestClimbingStairsDPComp(t *testing.T) { function TestClimbingStairsConstraintDP (line 42) | func TestClimbingStairsConstraintDP(t *testing.T) { function TestMinCostClimbingStairsDPComp (line 48) | func TestMinCostClimbingStairsDPComp(t *testing.T) { FILE: en/codes/go/chapter_dynamic_programming/coin_change.go function coinChangeDP (line 10) | func coinChangeDP(coins []int, amt int) int { function coinChangeDPComp (line 41) | func coinChangeDPComp(coins []int, amt int) int { FILE: en/codes/go/chapter_dynamic_programming/coin_change_ii.go function coinChangeIIDP (line 8) | func coinChangeIIDP(coins []int, amt int) int { function coinChangeIIDPComp (line 35) | func coinChangeIIDPComp(coins []int, amt int) int { FILE: en/codes/go/chapter_dynamic_programming/coin_change_test.go function TestCoinChange (line 12) | func TestCoinChange(t *testing.T) { FILE: en/codes/go/chapter_dynamic_programming/edit_distance.go function editDistanceDFS (line 8) | func editDistanceDFS(s string, t string, i int, j int) int { function editDistanceDFSMem (line 34) | func editDistanceDFSMem(s string, t string, mem [][]int, i int, j int) i... function editDistanceDP (line 65) | func editDistanceDP(s string, t string) int { function editDistanceDPComp (line 95) | func editDistanceDPComp(s string, t string) int { function MinInt (line 124) | func MinInt(a, b int) int { FILE: en/codes/go/chapter_dynamic_programming/edit_distance_test.go function TestEditDistanceDFS (line 12) | func TestEditDistanceDFS(test *testing.T) { FILE: en/codes/go/chapter_dynamic_programming/knapsack.go function knapsackDFS (line 10) | func knapsackDFS(wgt, val []int, i, c int) int { function knapsackDFSMem (line 27) | func knapsackDFSMem(wgt, val []int, mem [][]int, i, c int) int { function knapsackDP (line 49) | func knapsackDP(wgt, val []int, cap int) int { function knapsackDPComp (line 72) | func knapsackDPComp(wgt, val []int, cap int) int { FILE: en/codes/go/chapter_dynamic_programming/knapsack_test.go function TestKnapsack (line 12) | func TestKnapsack(t *testing.T) { function TestUnboundedKnapsack (line 42) | func TestUnboundedKnapsack(t *testing.T) { FILE: en/codes/go/chapter_dynamic_programming/min_cost_climbing_stairs_dp.go function minCostClimbingStairsDP (line 8) | func minCostClimbingStairsDP(cost []int) int { function minCostClimbingStairsDPComp (line 32) | func minCostClimbingStairsDPComp(cost []int) int { FILE: en/codes/go/chapter_dynamic_programming/min_path_sum.go function minPathSumDFS (line 10) | func minPathSumDFS(grid [][]int, i, j int) int { function minPathSumDFSMem (line 27) | func minPathSumDFSMem(grid, mem [][]int, i, j int) int { function minPathSumDP (line 49) | func minPathSumDP(grid [][]int) int { function minPathSumDPComp (line 75) | func minPathSumDPComp(grid [][]int) int { FILE: en/codes/go/chapter_dynamic_programming/min_path_sum_test.go function TestMinPathSum (line 12) | func TestMinPathSum(t *testing.T) { FILE: en/codes/go/chapter_dynamic_programming/unbounded_knapsack.go function unboundedKnapsackDP (line 10) | func unboundedKnapsackDP(wgt, val []int, cap int) int { function unboundedKnapsackDPComp (line 33) | func unboundedKnapsackDPComp(wgt, val []int, cap int) int { FILE: en/codes/go/chapter_graph/graph_adjacency_list.go type graphAdjList (line 16) | type graphAdjList struct method size (line 36) | func (g *graphAdjList) size() int { method addEdge (line 41) | func (g *graphAdjList) addEdge(vet1 Vertex, vet2 Vertex) { method removeEdge (line 53) | func (g *graphAdjList) removeEdge(vet1 Vertex, vet2 Vertex) { method addVertex (line 65) | func (g *graphAdjList) addVertex(vet Vertex) { method removeVertex (line 75) | func (g *graphAdjList) removeVertex(vet Vertex) { method print (line 89) | func (g *graphAdjList) print() { function newGraphAdjList (line 22) | func newGraphAdjList(edges [][]Vertex) *graphAdjList { FILE: en/codes/go/chapter_graph/graph_adjacency_list_test.go function TestGraphAdjList (line 14) | func TestGraphAdjList(t *testing.T) { FILE: en/codes/go/chapter_graph/graph_adjacency_matrix.go type graphAdjMat (line 10) | type graphAdjMat struct method size (line 39) | func (g *graphAdjMat) size() int { method addVertex (line 44) | func (g *graphAdjMat) addVertex(val int) { method removeVertex (line 58) | func (g *graphAdjMat) removeVertex(index int) { method addEdge (line 74) | func (g *graphAdjMat) addEdge(i, j int) { method removeEdge (line 86) | func (g *graphAdjMat) removeEdge(i, j int) { method print (line 96) | func (g *graphAdjMat) print() { function newGraphAdjMat (line 18) | func newGraphAdjMat(vertices []int, edges [][]int) *graphAdjMat { FILE: en/codes/go/chapter_graph/graph_adjacency_matrix_test.go function TestGraphAdjMat (line 12) | func TestGraphAdjMat(t *testing.T) { FILE: en/codes/go/chapter_graph/graph_bfs.go function graphBFS (line 13) | func graphBFS(g *graphAdjList, startVet Vertex) []Vertex { FILE: en/codes/go/chapter_graph/graph_bfs_test.go function TestGraphBFS (line 14) | func TestGraphBFS(t *testing.T) { FILE: en/codes/go/chapter_graph/graph_dfs.go function dfs (line 12) | func dfs(g *graphAdjList, visited map[Vertex]struct{}, res *[]Vertex, ve... function graphDFS (line 28) | func graphDFS(g *graphAdjList, startVet Vertex) []Vertex { FILE: en/codes/go/chapter_graph/graph_dfs_test.go function TestGraphDFS (line 14) | func TestGraphDFS(t *testing.T) { FILE: en/codes/go/chapter_greedy/coin_change_greedy.go function coinChangeGreedy (line 8) | func coinChangeGreedy(coins []int, amt int) int { FILE: en/codes/go/chapter_greedy/coin_change_greedy_test.go function TestCoinChangeGreedy (line 12) | func TestCoinChangeGreedy(t *testing.T) { FILE: en/codes/go/chapter_greedy/fractional_knapsack.go type Item (line 10) | type Item struct function fractionalKnapsack (line 16) | func fractionalKnapsack(wgt []int, val []int, cap int) float64 { FILE: en/codes/go/chapter_greedy/fractional_knapsack_test.go function TestFractionalKnapsack (line 12) | func TestFractionalKnapsack(t *testing.T) { FILE: en/codes/go/chapter_greedy/max_capacity.go function maxCapacity (line 10) | func maxCapacity(ht []int) int { FILE: en/codes/go/chapter_greedy/max_capacity_test.go function TestMaxCapacity (line 12) | func TestMaxCapacity(t *testing.T) { FILE: en/codes/go/chapter_greedy/max_product_cutting.go function maxProductCutting (line 10) | func maxProductCutting(n int) int { FILE: en/codes/go/chapter_greedy/max_product_cutting_test.go function TestMaxProductCutting (line 12) | func TestMaxProductCutting(t *testing.T) { FILE: en/codes/go/chapter_hashing/array_hash_map.go type pair (line 10) | type pair struct type arrayHashMap (line 16) | type arrayHashMap struct method hashFunc (line 28) | func (a *arrayHashMap) hashFunc(key int) int { method get (line 34) | func (a *arrayHashMap) get(key int) string { method put (line 44) | func (a *arrayHashMap) put(key int, val string) { method remove (line 51) | func (a *arrayHashMap) remove(key int) { method pairSet (line 58) | func (a *arrayHashMap) pairSet() []*pair { method keySet (line 69) | func (a *arrayHashMap) keySet() []int { method valueSet (line 80) | func (a *arrayHashMap) valueSet() []string { method print (line 91) | func (a *arrayHashMap) print() { function newArrayHashMap (line 21) | func newArrayHashMap() *arrayHashMap { FILE: en/codes/go/chapter_hashing/array_hash_map_test.go function TestArrayHashMap (line 12) | func TestArrayHashMap(t *testing.T) { FILE: en/codes/go/chapter_hashing/hash_collision_test.go function TestHashMapChaining (line 12) | func TestHashMapChaining(t *testing.T) { function TestHashMapOpenAddressing (line 38) | func TestHashMapOpenAddressing(t *testing.T) { FILE: en/codes/go/chapter_hashing/hash_map_chaining.go type hashMapChaining (line 14) | type hashMapChaining struct method hashFunc (line 38) | func (m *hashMapChaining) hashFunc(key int) int { method loadFactor (line 43) | func (m *hashMapChaining) loadFactor() float64 { method get (line 48) | func (m *hashMapChaining) get(key int) string { method put (line 62) | func (m *hashMapChaining) put(key int, val string) { method remove (line 85) | func (m *hashMapChaining) remove(key int) { method extend (line 99) | func (m *hashMapChaining) extend() { method print (line 122) | func (m *hashMapChaining) print() { function newHashMapChaining (line 23) | func newHashMapChaining() *hashMapChaining { FILE: en/codes/go/chapter_hashing/hash_map_open_addressing.go type hashMapOpenAddressing (line 12) | type hashMapOpenAddressing struct method hashFunc (line 34) | func (h *hashMapOpenAddressing) hashFunc(key int) int { method loadFactor (line 39) | func (h *hashMapOpenAddressing) loadFactor() float64 { method findBucket (line 44) | func (h *hashMapOpenAddressing) findBucket(key int) int { method get (line 70) | func (h *hashMapOpenAddressing) get(key int) string { method put (line 79) | func (h *hashMapOpenAddressing) put(key int, val string) { method remove (line 93) | func (h *hashMapOpenAddressing) remove(key int) { method extend (line 102) | func (h *hashMapOpenAddressing) extend() { method print (line 116) | func (h *hashMapOpenAddressing) print() { function newHashMapOpenAddressing (line 22) | func newHashMapOpenAddressing() *hashMapOpenAddressing { FILE: en/codes/go/chapter_hashing/hash_map_test.go function TestHashMap (line 15) | func TestHashMap(t *testing.T) { function TestSimpleHash (line 58) | func TestSimpleHash(t *testing.T) { FILE: en/codes/go/chapter_hashing/simple_hash.go function addHash (line 10) | func addHash(key string) int { function mulHash (line 22) | func mulHash(key string) int { function xorHash (line 34) | func xorHash(key string) int { function rotHash (line 46) | func rotHash(key string) int { FILE: en/codes/go/chapter_heap/heap.go type intHeap (line 9) | type intHeap method Push (line 12) | func (h *intHeap) Push(x any) { method Pop (line 19) | func (h *intHeap) Pop() any { method Len (line 27) | func (h *intHeap) Len() int { method Less (line 32) | func (h *intHeap) Less(i, j int) bool { method Swap (line 38) | func (h *intHeap) Swap(i, j int) { method Top (line 43) | func (h *intHeap) Top() any { FILE: en/codes/go/chapter_heap/heap_test.go function testPush (line 16) | func testPush(h *intHeap, val int) { function testPop (line 23) | func testPop(h *intHeap) { function TestHeap (line 30) | func TestHeap(t *testing.T) { function TestMyHeap (line 62) | func TestMyHeap(t *testing.T) { function TestTopKHeap (line 93) | func TestTopKHeap(t *testing.T) { FILE: en/codes/go/chapter_heap/my_heap.go type maxHeap (line 13) | type maxHeap struct method left (line 37) | func (h *maxHeap) left(i int) int { method right (line 42) | func (h *maxHeap) right(i int) int { method parent (line 47) | func (h *maxHeap) parent(i int) int { method swap (line 53) | func (h *maxHeap) swap(i, j int) { method size (line 58) | func (h *maxHeap) size() int { method isEmpty (line 63) | func (h *maxHeap) isEmpty() bool { method peek (line 68) | func (h *maxHeap) peek() any { method push (line 73) | func (h *maxHeap) push(val any) { method siftUp (line 81) | func (h *maxHeap) siftUp(i int) { method pop (line 97) | func (h *maxHeap) pop() any { method siftDown (line 116) | func (h *maxHeap) siftDown(i int) { method print (line 138) | func (h *maxHeap) print() { function newHeap (line 19) | func newHeap() *maxHeap { function newMaxHeap (line 26) | func newMaxHeap(nums []any) *maxHeap { FILE: en/codes/go/chapter_heap/top_k.go type minHeap (line 9) | type minHeap method Len (line 11) | func (h *minHeap) Len() int { return len(*h) } method Less (line 12) | func (h *minHeap) Less(i, j int) bool { return (*h)[i].(int) < (*h)[j]... method Swap (line 13) | func (h *minHeap) Swap(i, j int) { (*h)[i], (*h)[j] = (*h)[j], (*... method Push (line 16) | func (h *minHeap) Push(x any) { method Pop (line 21) | func (h *minHeap) Pop() any { method Top (line 29) | func (h *minHeap) Top() any { function topKHeap (line 34) | func topKHeap(nums []int, k int) *minHeap { FILE: en/codes/go/chapter_searching/binary_search.go function binarySearch (line 8) | func binarySearch(nums []int, target int) int { function binarySearchLCRO (line 27) | func binarySearchLCRO(nums []int, target int) int { FILE: en/codes/go/chapter_searching/binary_search_edge.go function binarySearchLeftEdge (line 8) | func binarySearchLeftEdge(nums []int, target int) int { function binarySearchRightEdge (line 20) | func binarySearchRightEdge(nums []int, target int) int { FILE: en/codes/go/chapter_searching/binary_search_insertion.go function binarySearchInsertionSimple (line 8) | func binarySearchInsertionSimple(nums []int, target int) int { function binarySearchInsertion (line 30) | func binarySearchInsertion(nums []int, target int) int { FILE: en/codes/go/chapter_searching/binary_search_test.go function TestBinarySearch (line 12) | func TestBinarySearch(t *testing.T) { function TestBinarySearchEdge (line 26) | func TestBinarySearchEdge(t *testing.T) { function TestBinarySearchInsertion (line 41) | func TestBinarySearchInsertion(t *testing.T) { FILE: en/codes/go/chapter_searching/hashing_search.go function hashingSearchArray (line 10) | func hashingSearchArray(m map[int]int, target int) int { function hashingSearchLinkedList (line 21) | func hashingSearchLinkedList(m map[int]*ListNode, target int) *ListNode { FILE: en/codes/go/chapter_searching/hashing_search_test.go function TestHashingSearch (line 14) | func TestHashingSearch(t *testing.T) { FILE: en/codes/go/chapter_searching/linear_search.go function linearSearchArray (line 12) | func linearSearchArray(nums []int, target int) int { function linearSearchLinkedList (line 25) | func linearSearchLinkedList(node *ListNode, target int) *ListNode { FILE: en/codes/go/chapter_searching/linear_search_test.go function TestLinearSearch (line 14) | func TestLinearSearch(t *testing.T) { FILE: en/codes/go/chapter_searching/two_sum.go function twoSumBruteForce (line 8) | func twoSumBruteForce(nums []int, target int) []int { function twoSumHashTable (line 22) | func twoSumHashTable(nums []int, target int) []int { FILE: en/codes/go/chapter_searching/two_sum_test.go function TestTwoSum (line 12) | func TestTwoSum(t *testing.T) { FILE: en/codes/go/chapter_sorting/bubble_sort.go function bubbleSort (line 8) | func bubbleSort(nums []int) { function bubbleSortWithFlag (line 22) | func bubbleSortWithFlag(nums []int) { FILE: en/codes/go/chapter_sorting/bubble_sort_test.go function TestBubbleSort (line 12) | func TestBubbleSort(t *testing.T) { FILE: en/codes/go/chapter_sorting/bucket_sort.go function bucketSort (line 10) | func bucketSort(nums []float64) { FILE: en/codes/go/chapter_sorting/bucket_sort_test.go function TestBucketSort (line 12) | func TestBucketSort(t *testing.T) { FILE: en/codes/go/chapter_sorting/counting_sort.go type CountingSort (line 7) | type CountingSort struct function countingSortNaive (line 11) | func countingSortNaive(nums []int) { function countingSort (line 36) | func countingSort(nums []int) { FILE: en/codes/go/chapter_sorting/counting_sort_test.go function TestCountingSort (line 12) | func TestCountingSort(t *testing.T) { FILE: en/codes/go/chapter_sorting/heap_sort.go function siftDown (line 8) | func siftDown(nums *[]int, n, i int) { function heapSort (line 32) | func heapSort(nums *[]int) { FILE: en/codes/go/chapter_sorting/heap_sort_test.go function TestHeapSort (line 12) | func TestHeapSort(t *testing.T) { FILE: en/codes/go/chapter_sorting/insertion_sort.go function insertionSort (line 8) | func insertionSort(nums []int) { FILE: en/codes/go/chapter_sorting/insertion_sort_test.go function TestInsertionSort (line 12) | func TestInsertionSort(t *testing.T) { FILE: en/codes/go/chapter_sorting/merge_sort.go function merge (line 8) | func merge(nums []int, left, mid, right int) { function mergeSort (line 43) | func mergeSort(nums []int, left, right int) { FILE: en/codes/go/chapter_sorting/merge_sort_test.go function TestMergeSort (line 12) | func TestMergeSort(t *testing.T) { FILE: en/codes/go/chapter_sorting/quick_sort.go type quickSort (line 8) | type quickSort struct method partition (line 17) | func (q *quickSort) partition(nums []int, left, right int) int { method quickSort (line 36) | func (q *quickSort) quickSort(nums []int, left, right int) { type quickSortMedian (line 11) | type quickSortMedian struct method medianThree (line 49) | func (q *quickSortMedian) medianThree(nums []int, left, mid, right int... method partition (line 61) | func (q *quickSortMedian) partition(nums []int, left, right int) int { method quickSort (line 84) | func (q *quickSortMedian) quickSort(nums []int, left, right int) { type quickSortTailCall (line 14) | type quickSortTailCall struct method partition (line 97) | func (q *quickSortTailCall) partition(nums []int, left, right int) int { method quickSort (line 116) | func (q *quickSortTailCall) quickSort(nums []int, left, right int) { FILE: en/codes/go/chapter_sorting/quick_sort_test.go function TestQuickSort (line 13) | func TestQuickSort(t *testing.T) { function TestQuickSortMedian (line 21) | func TestQuickSortMedian(t *testing.T) { function TestQuickSortTailCall (line 29) | func TestQuickSortTailCall(t *testing.T) { FILE: en/codes/go/chapter_sorting/radix_sort.go function digit (line 10) | func digit(num, exp int) int { function countingSortDigit (line 16) | func countingSortDigit(nums []int, exp int) { function radixSort (line 44) | func radixSort(nums []int) { FILE: en/codes/go/chapter_sorting/radix_sort_test.go function TestRadixSort (line 12) | func TestRadixSort(t *testing.T) { FILE: en/codes/go/chapter_sorting/selection_sort.go function selectionSort (line 8) | func selectionSort(nums []int) { FILE: en/codes/go/chapter_sorting/selection_sort_test.go function TestSelectionSort (line 12) | func TestSelectionSort(t *testing.T) { FILE: en/codes/go/chapter_stack_and_queue/array_deque.go type arrayDeque (line 10) | type arrayDeque struct method size (line 28) | func (q *arrayDeque) size() int { method isEmpty (line 33) | func (q *arrayDeque) isEmpty() bool { method index (line 38) | func (q *arrayDeque) index(i int) int { method pushFirst (line 46) | func (q *arrayDeque) pushFirst(num int) { method pushLast (line 60) | func (q *arrayDeque) pushLast(num int) { method popFirst (line 73) | func (q *arrayDeque) popFirst() any { method popLast (line 85) | func (q *arrayDeque) popLast() any { method peekFirst (line 95) | func (q *arrayDeque) peekFirst() any { method peekLast (line 103) | func (q *arrayDeque) peekLast() any { method toSlice (line 113) | func (q *arrayDeque) toSlice() []int { function newArrayDeque (line 18) | func newArrayDeque(queCapacity int) *arrayDeque { FILE: en/codes/go/chapter_stack_and_queue/array_queue.go type arrayQueue (line 8) | type arrayQueue struct method size (line 26) | func (q *arrayQueue) size() int { method isEmpty (line 31) | func (q *arrayQueue) isEmpty() bool { method push (line 36) | func (q *arrayQueue) push(num int) { method pop (line 50) | func (q *arrayQueue) pop() any { method peek (line 63) | func (q *arrayQueue) peek() any { method toSlice (line 71) | func (q *arrayQueue) toSlice() []int { function newArrayQueue (line 16) | func newArrayQueue(queCapacity int) *arrayQueue { FILE: en/codes/go/chapter_stack_and_queue/array_stack.go type arrayStack (line 8) | type arrayStack struct method size (line 21) | func (s *arrayStack) size() int { method isEmpty (line 26) | func (s *arrayStack) isEmpty() bool { method push (line 31) | func (s *arrayStack) push(v int) { method pop (line 37) | func (s *arrayStack) pop() any { method peek (line 44) | func (s *arrayStack) peek() any { method toSlice (line 53) | func (s *arrayStack) toSlice() []int { function newArrayStack (line 13) | func newArrayStack() *arrayStack { FILE: en/codes/go/chapter_stack_and_queue/deque_test.go function TestDeque (line 15) | func TestDeque(t *testing.T) { function TestArrayDeque (line 52) | func TestArrayDeque(t *testing.T) { function TestLinkedListDeque (line 95) | func TestLinkedListDeque(t *testing.T) { function BenchmarkLinkedListDeque (line 132) | func BenchmarkLinkedListDeque(b *testing.B) { FILE: en/codes/go/chapter_stack_and_queue/linkedlist_deque.go type linkedListDeque (line 12) | type linkedListDeque struct method pushFirst (line 25) | func (s *linkedListDeque) pushFirst(value any) { method pushLast (line 30) | func (s *linkedListDeque) pushLast(value any) { method popFirst (line 35) | func (s *linkedListDeque) popFirst() any { method popLast (line 45) | func (s *linkedListDeque) popLast() any { method peekFirst (line 55) | func (s *linkedListDeque) peekFirst() any { method peekLast (line 64) | func (s *linkedListDeque) peekLast() any { method size (line 73) | func (s *linkedListDeque) size() int { method isEmpty (line 78) | func (s *linkedListDeque) isEmpty() bool { method toList (line 83) | func (s *linkedListDeque) toList() *list.List { function newLinkedListDeque (line 18) | func newLinkedListDeque() *linkedListDeque { FILE: en/codes/go/chapter_stack_and_queue/linkedlist_queue.go type linkedListQueue (line 12) | type linkedListQueue struct method push (line 25) | func (s *linkedListQueue) push(value any) { method pop (line 30) | func (s *linkedListQueue) pop() any { method peek (line 40) | func (s *linkedListQueue) peek() any { method size (line 49) | func (s *linkedListQueue) size() int { method isEmpty (line 54) | func (s *linkedListQueue) isEmpty() bool { method toList (line 59) | func (s *linkedListQueue) toList() *list.List { function newLinkedListQueue (line 18) | func newLinkedListQueue() *linkedListQueue { FILE: en/codes/go/chapter_stack_and_queue/linkedlist_stack.go type linkedListStack (line 12) | type linkedListStack struct method push (line 25) | func (s *linkedListStack) push(value int) { method pop (line 30) | func (s *linkedListStack) pop() any { method peek (line 40) | func (s *linkedListStack) peek() any { method size (line 49) | func (s *linkedListStack) size() int { method isEmpty (line 54) | func (s *linkedListStack) isEmpty() bool { method toList (line 59) | func (s *linkedListStack) toList() *list.List { function newLinkedListStack (line 18) | func newLinkedListStack() *linkedListStack { FILE: en/codes/go/chapter_stack_and_queue/queue_test.go function TestQueue (line 15) | func TestQueue(t *testing.T) { function TestArrayQueue (line 48) | func TestArrayQueue(t *testing.T) { function TestLinkedListQueue (line 92) | func TestLinkedListQueue(t *testing.T) { function BenchmarkArrayQueue (line 124) | func BenchmarkArrayQueue(b *testing.B) { function BenchmarkLinkedQueue (line 137) | func BenchmarkLinkedQueue(b *testing.B) { FILE: en/codes/go/chapter_stack_and_queue/stack_test.go function TestStack (line 14) | func TestStack(t *testing.T) { function TestArrayStack (line 47) | func TestArrayStack(t *testing.T) { function TestLinkedListStack (line 78) | func TestLinkedListStack(t *testing.T) { function BenchmarkArrayStack (line 109) | func BenchmarkArrayStack(b *testing.B) { function BenchmarkLinkedListStack (line 121) | func BenchmarkLinkedListStack(b *testing.B) { FILE: en/codes/go/chapter_tree/array_binary_tree.go type arrayBinaryTree (line 8) | type arrayBinaryTree struct method size (line 20) | func (abt *arrayBinaryTree) size() int { method val (line 25) | func (abt *arrayBinaryTree) val(i int) any { method left (line 34) | func (abt *arrayBinaryTree) left(i int) int { method right (line 39) | func (abt *arrayBinaryTree) right(i int) int { method parent (line 44) | func (abt *arrayBinaryTree) parent(i int) int { method levelOrder (line 49) | func (abt *arrayBinaryTree) levelOrder() []any { method dfs (line 61) | func (abt *arrayBinaryTree) dfs(i int, order string, res *[]any) { method preOrder (line 83) | func (abt *arrayBinaryTree) preOrder() []any { method inOrder (line 90) | func (abt *arrayBinaryTree) inOrder() []any { method postOrder (line 97) | func (abt *arrayBinaryTree) postOrder() []any { function newArrayBinaryTree (line 13) | func newArrayBinaryTree(arr []any) *arrayBinaryTree { FILE: en/codes/go/chapter_tree/array_binary_tree_test.go function TestArrayBinaryTree (line 14) | func TestArrayBinaryTree(t *testing.T) { FILE: en/codes/go/chapter_tree/avl_tree.go type aVLTree (line 10) | type aVLTree struct method height (line 20) | func (t *aVLTree) height(node *TreeNode) int { method updateHeight (line 29) | func (t *aVLTree) updateHeight(node *TreeNode) { method balanceFactor (line 41) | func (t *aVLTree) balanceFactor(node *TreeNode) int { method rightRotate (line 51) | func (t *aVLTree) rightRotate(node *TreeNode) *TreeNode { method leftRotate (line 65) | func (t *aVLTree) leftRotate(node *TreeNode) *TreeNode { method rotate (line 79) | func (t *aVLTree) rotate(node *TreeNode) *TreeNode { method insert (line 110) | func (t *aVLTree) insert(val int) { method insertHelper (line 115) | func (t *aVLTree) insertHelper(node *TreeNode, val int) *TreeNode { method remove (line 137) | func (t *aVLTree) remove(val int) { method removeHelper (line 142) | func (t *aVLTree) removeHelper(node *TreeNode, val int) *TreeNode { method search (line 183) | func (t *aVLTree) search(val int) *TreeNode { function newAVLTree (line 15) | func newAVLTree() *aVLTree { FILE: en/codes/go/chapter_tree/avl_tree_test.go function TestAVLTree (line 14) | func TestAVLTree(t *testing.T) { function testInsert (line 44) | func testInsert(tree *aVLTree, val int) { function testRemove (line 50) | func testRemove(tree *aVLTree, val int) { FILE: en/codes/go/chapter_tree/binary_search_tree.go type binarySearchTree (line 11) | type binarySearchTree struct method getRoot (line 23) | func (bst *binarySearchTree) getRoot() *TreeNode { method search (line 28) | func (bst *binarySearchTree) search(num int) *TreeNode { method insert (line 48) | func (bst *binarySearchTree) insert(num int) { method remove (line 79) | func (bst *binarySearchTree) remove(num int) { method print (line 140) | func (bst *binarySearchTree) print() { function newBinarySearchTree (line 15) | func newBinarySearchTree() *binarySearchTree { FILE: en/codes/go/chapter_tree/binary_search_tree_test.go function TestBinarySearchTree (line 12) | func TestBinarySearchTree(t *testing.T) { FILE: en/codes/go/chapter_tree/binary_tree_bfs.go function levelOrder (line 14) | func levelOrder(root *TreeNode) []any { FILE: en/codes/go/chapter_tree/binary_tree_bfs_test.go function TestLevelOrder (line 14) | func TestLevelOrder(t *testing.T) { FILE: en/codes/go/chapter_tree/binary_tree_dfs.go function preOrder (line 14) | func preOrder(node *TreeNode) { function inOrder (line 25) | func inOrder(node *TreeNode) { function postOrder (line 36) | func postOrder(node *TreeNode) { FILE: en/codes/go/chapter_tree/binary_tree_dfs_test.go function TestPreInPostOrderTraversal (line 14) | func TestPreInPostOrderTraversal(t *testing.T) { FILE: en/codes/go/chapter_tree/binary_tree_test.go function TestBinaryTree (line 14) | func TestBinaryTree(t *testing.T) { FILE: en/codes/go/pkg/list_node.go type ListNode (line 8) | type ListNode struct function NewListNode (line 14) | func NewListNode(v int) *ListNode { function ArrayToLinkedList (line 22) | func ArrayToLinkedList(arr []int) *ListNode { FILE: en/codes/go/pkg/list_node_test.go function TestListNode (line 11) | func TestListNode(t *testing.T) { FILE: en/codes/go/pkg/print_utils.go function PrintSlice (line 15) | func PrintSlice[T any](nums []T) { function PrintList (line 21) | func PrintList(list *list.List) { function PrintMap (line 37) | func PrintMap[K comparable, V any](m map[K]V) { function PrintHeap (line 44) | func PrintHeap(h []any) { function PrintLinkedList (line 53) | func PrintLinkedList(node *ListNode) { function PrintTree (line 67) | func PrintTree(root *TreeNode) { function printTreeHelper (line 74) | func printTreeHelper(root *TreeNode, prev *trunk, isRight bool) { type trunk (line 99) | type trunk struct function newTrunk (line 104) | func newTrunk(prev *trunk, str string) *trunk { function showTrunk (line 111) | func showTrunk(t *trunk) { FILE: en/codes/go/pkg/tree_node.go type TreeNode (line 8) | type TreeNode struct function NewTreeNode (line 16) | func NewTreeNode(v any) *TreeNode { function SliceToTreeDFS (line 45) | func SliceToTreeDFS(arr []any, i int) *TreeNode { function SliceToTree (line 56) | func SliceToTree(arr []any) *TreeNode { function TreeToSliceDFS (line 61) | func TreeToSliceDFS(root *TreeNode, i int, res *[]any) { function TreeToSlice (line 74) | func TreeToSlice(root *TreeNode) []any { FILE: en/codes/go/pkg/tree_node_test.go function TestTreeNode (line 12) | func TestTreeNode(t *testing.T) { FILE: en/codes/go/pkg/vertex.go type Vertex (line 8) | type Vertex struct function NewVertex (line 13) | func NewVertex(val int) Vertex { function ValsToVets (line 20) | func ValsToVets(vals []int) []Vertex { function VetsToVals (line 29) | func VetsToVals(vets []Vertex) []int { function DeleteSliceElms (line 38) | func DeleteSliceElms[T any](a []T, elms ...T) []T { FILE: en/codes/java/chapter_array_and_linkedlist/array.java class array (line 12) | public class array { method randomAccess (line 14) | static int randomAccess(int[] nums) { method extend (line 23) | static int[] extend(int[] nums, int enlarge) { method insert (line 35) | static void insert(int[] nums, int num, int index) { method remove (line 45) | static void remove(int[] nums, int index) { method traverse (line 53) | static void traverse(int[] nums) { method find (line 66) | static int find(int[] nums, int target) { method main (line 75) | public static void main(String[] args) { FILE: en/codes/java/chapter_array_and_linkedlist/linked_list.java class linked_list (line 11) | public class linked_list { method insert (line 13) | static void insert(ListNode n0, ListNode P) { method remove (line 20) | static void remove(ListNode n0) { method access (line 30) | static ListNode access(ListNode head, int index) { method find (line 40) | static int find(ListNode head, int target) { method main (line 52) | public static void main(String[] args) { FILE: en/codes/java/chapter_array_and_linkedlist/list.java class list (line 11) | public class list { method main (line 12) | public static void main(String[] args) { FILE: en/codes/java/chapter_array_and_linkedlist/my_list.java class MyList (line 12) | class MyList { method MyList (line 19) | public MyList() { method size (line 24) | public int size() { method capacity (line 29) | public int capacity() { method get (line 34) | public int get(int index) { method set (line 42) | public void set(int index, int num) { method add (line 49) | public void add(int num) { method insert (line 59) | public void insert(int index, int num) { method remove (line 75) | public int remove(int index) { method extendCapacity (line 90) | public void extendCapacity() { method toArray (line 98) | public int[] toArray() { class my_list (line 109) | public class my_list { method main (line 111) | public static void main(String[] args) { FILE: en/codes/java/chapter_backtracking/n_queens.java class n_queens (line 11) | public class n_queens { method backtrack (line 13) | public static void backtrack(int row, int n, List> state,... method nQueens (line 44) | public static List>> nQueens(int n) { method main (line 64) | public static void main(String[] args) { FILE: en/codes/java/chapter_backtracking/permutations_i.java class permutations_i (line 11) | public class permutations_i { method backtrack (line 13) | public static void backtrack(List state, int[] choices, boole... method permutationsI (line 37) | static List> permutationsI(int[] nums) { method main (line 43) | public static void main(String[] args) { FILE: en/codes/java/chapter_backtracking/permutations_ii.java class permutations_ii (line 11) | public class permutations_ii { method backtrack (line 13) | static void backtrack(List state, int[] choices, boolean[] se... method permutationsII (line 39) | static List> permutationsII(int[] nums) { method main (line 45) | public static void main(String[] args) { FILE: en/codes/java/chapter_backtracking/preorder_traversal_i_compact.java class preorder_traversal_i_compact (line 12) | public class preorder_traversal_i_compact { method preOrder (line 16) | static void preOrder(TreeNode root) { method main (line 28) | public static void main(String[] args) { FILE: en/codes/java/chapter_backtracking/preorder_traversal_ii_compact.java class preorder_traversal_ii_compact (line 12) | public class preorder_traversal_ii_compact { method preOrder (line 17) | static void preOrder(TreeNode root) { method main (line 33) | public static void main(String[] args) { FILE: en/codes/java/chapter_backtracking/preorder_traversal_iii_compact.java class preorder_traversal_iii_compact (line 12) | public class preorder_traversal_iii_compact { method preOrder (line 17) | static void preOrder(TreeNode root) { method main (line 34) | public static void main(String[] args) { FILE: en/codes/java/chapter_backtracking/preorder_traversal_iii_template.java class preorder_traversal_iii_template (line 12) | public class preorder_traversal_iii_template { method isSolution (line 14) | static boolean isSolution(List state) { method recordSolution (line 19) | static void recordSolution(List state, List> ... method isValid (line 24) | static boolean isValid(List state, TreeNode choice) { method makeChoice (line 29) | static void makeChoice(List state, TreeNode choice) { method undoChoice (line 34) | static void undoChoice(List state, TreeNode choice) { method backtrack (line 39) | static void backtrack(List state, List choices, Li... method main (line 59) | public static void main(String[] args) { FILE: en/codes/java/chapter_backtracking/subset_sum_i.java class subset_sum_i (line 11) | public class subset_sum_i { method backtrack (line 13) | static void backtrack(List state, int target, int[] choices, ... method subsetSumI (line 37) | static List> subsetSumI(int[] nums, int target) { method main (line 46) | public static void main(String[] args) { FILE: en/codes/java/chapter_backtracking/subset_sum_i_naive.java class subset_sum_i_naive (line 11) | public class subset_sum_i_naive { method backtrack (line 13) | static void backtrack(List state, int target, int total, int[... method subsetSumINaive (line 35) | static List> subsetSumINaive(int[] nums, int target) { method main (line 43) | public static void main(String[] args) { FILE: en/codes/java/chapter_backtracking/subset_sum_ii.java class subset_sum_ii (line 11) | public class subset_sum_ii { method backtrack (line 13) | static void backtrack(List state, int target, int[] choices, ... method subsetSumII (line 42) | static List> subsetSumII(int[] nums, int target) { method main (line 51) | public static void main(String[] args) { FILE: en/codes/java/chapter_computational_complexity/iteration.java class iteration (line 9) | public class iteration { method forLoop (line 11) | static int forLoop(int n) { method whileLoop (line 21) | static int whileLoop(int n) { method whileLoopII (line 33) | static int whileLoopII(int n) { method nestedForLoop (line 47) | static String nestedForLoop(int n) { method main (line 60) | public static void main(String[] args) { FILE: en/codes/java/chapter_computational_complexity/recursion.java class recursion (line 11) | public class recursion { method recur (line 13) | static int recur(int n) { method forLoopRecur (line 24) | static int forLoopRecur(int n) { method tailRecur (line 43) | static int tailRecur(int n, int res) { method fib (line 52) | static int fib(int n) { method main (line 63) | public static void main(String[] args) { FILE: en/codes/java/chapter_computational_complexity/space_complexity.java class space_complexity (line 12) | public class space_complexity { method function (line 14) | static int function() { method constant (line 20) | static void constant(int n) { method linear (line 37) | static void linear(int n) { method linearRecur (line 53) | static void linearRecur(int n) { method quadratic (line 61) | static void quadratic(int n) { method quadraticRecur (line 76) | static int quadraticRecur(int n) { method buildTree (line 86) | static TreeNode buildTree(int n) { method main (line 96) | public static void main(String[] args) { FILE: en/codes/java/chapter_computational_complexity/time_complexity.java class time_complexity (line 9) | public class time_complexity { method constant (line 11) | static int constant(int n) { method linear (line 20) | static int linear(int n) { method arrayTraversal (line 28) | static int arrayTraversal(int[] nums) { method quadratic (line 38) | static int quadratic(int n) { method bubbleSort (line 50) | static int bubbleSort(int[] nums) { method exponential (line 69) | static int exponential(int n) { method expRecur (line 83) | static int expRecur(int n) { method logarithmic (line 90) | static int logarithmic(int n) { method logRecur (line 100) | static int logRecur(int n) { method linearLogRecur (line 107) | static int linearLogRecur(int n) { method factorialRecur (line 118) | static int factorialRecur(int n) { method main (line 130) | public static void main(String[] args) { FILE: en/codes/java/chapter_computational_complexity/worst_best_time_complexity.java class worst_best_time_complexity (line 11) | public class worst_best_time_complexity { method randomNumbers (line 13) | static int[] randomNumbers(int n) { method findOne (line 30) | static int findOne(int[] nums) { method main (line 41) | public static void main(String[] args) { FILE: en/codes/java/chapter_divide_and_conquer/binary_search_recur.java class binary_search_recur (line 9) | public class binary_search_recur { method dfs (line 11) | static int dfs(int[] nums, int target, int i, int j) { method binarySearch (line 31) | static int binarySearch(int[] nums, int target) { method main (line 37) | public static void main(String[] args) { FILE: en/codes/java/chapter_divide_and_conquer/build_tree.java class build_tree (line 12) | public class build_tree { method dfs (line 14) | static TreeNode dfs(int[] preorder, Map inorderMap, ... method buildTree (line 31) | static TreeNode buildTree(int[] preorder, int[] inorder) { method main (line 41) | public static void main(String[] args) { FILE: en/codes/java/chapter_divide_and_conquer/hanota.java class hanota (line 11) | public class hanota { method move (line 13) | static void move(List src, List tar) { method dfs (line 21) | static void dfs(int i, List src, List buf, List A, List B, List choices, int state, int n, ... method climbingStairsBacktrack (line 29) | public static int climbingStairsBacktrack(int n) { method main (line 38) | public static void main(String[] args) { FILE: en/codes/java/chapter_dynamic_programming/climbing_stairs_constraint_dp.java class climbing_stairs_constraint_dp (line 9) | public class climbing_stairs_constraint_dp { method climbingStairsConstraintDP (line 11) | static int climbingStairsConstraintDP(int n) { method main (line 30) | public static void main(String[] args) { FILE: en/codes/java/chapter_dynamic_programming/climbing_stairs_dfs.java class climbing_stairs_dfs (line 9) | public class climbing_stairs_dfs { method dfs (line 11) | public static int dfs(int i) { method climbingStairsDFS (line 21) | public static int climbingStairsDFS(int n) { method main (line 25) | public static void main(String[] args) { FILE: en/codes/java/chapter_dynamic_programming/climbing_stairs_dfs_mem.java class climbing_stairs_dfs_mem (line 11) | public class climbing_stairs_dfs_mem { method dfs (line 13) | public static int dfs(int i, int[] mem) { method climbingStairsDFSMem (line 28) | public static int climbingStairsDFSMem(int n) { method main (line 35) | public static void main(String[] args) { FILE: en/codes/java/chapter_dynamic_programming/climbing_stairs_dp.java class climbing_stairs_dp (line 9) | public class climbing_stairs_dp { method climbingStairsDP (line 11) | public static int climbingStairsDP(int n) { method climbingStairsDPComp (line 27) | public static int climbingStairsDPComp(int n) { method main (line 39) | public static void main(String[] args) { FILE: en/codes/java/chapter_dynamic_programming/coin_change.java class coin_change (line 11) | public class coin_change { method coinChangeDP (line 13) | static int coinChangeDP(int[] coins, int amt) { method coinChangeDPComp (line 38) | static int coinChangeDPComp(int[] coins, int amt) { method main (line 60) | public static void main(String[] args) { FILE: en/codes/java/chapter_dynamic_programming/coin_change_ii.java class coin_change_ii (line 9) | public class coin_change_ii { method coinChangeIIDP (line 11) | static int coinChangeIIDP(int[] coins, int amt) { method coinChangeIIDPComp (line 35) | static int coinChangeIIDPComp(int[] coins, int amt) { method main (line 55) | public static void main(String[] args) { FILE: en/codes/java/chapter_dynamic_programming/edit_distance.java class edit_distance (line 11) | public class edit_distance { method editDistanceDFS (line 13) | static int editDistanceDFS(String s, String t, int i, int j) { method editDistanceDFSMem (line 35) | static int editDistanceDFSMem(String s, String t, int[][] mem, int i, ... method editDistanceDP (line 61) | static int editDistanceDP(String s, String t) { method editDistanceDPComp (line 87) | static int editDistanceDPComp(String s, String t) { method main (line 115) | public static void main(String[] args) { FILE: en/codes/java/chapter_dynamic_programming/knapsack.java class knapsack (line 11) | public class knapsack { method knapsackDFS (line 14) | static int knapsackDFS(int[] wgt, int[] val, int i, int c) { method knapsackDFSMem (line 31) | static int knapsackDFSMem(int[] wgt, int[] val, int[][] mem, int i, in... method knapsackDP (line 53) | static int knapsackDP(int[] wgt, int[] val, int cap) { method knapsackDPComp (line 73) | static int knapsackDPComp(int[] wgt, int[] val, int cap) { method main (line 90) | public static void main(String[] args) { FILE: en/codes/java/chapter_dynamic_programming/min_cost_climbing_stairs_dp.java class min_cost_climbing_stairs_dp (line 11) | public class min_cost_climbing_stairs_dp { method minCostClimbingStairsDP (line 13) | public static int minCostClimbingStairsDP(int[] cost) { method minCostClimbingStairsDPComp (line 30) | public static int minCostClimbingStairsDPComp(int[] cost) { method main (line 43) | public static void main(String[] args) { FILE: en/codes/java/chapter_dynamic_programming/min_path_sum.java class min_path_sum (line 11) | public class min_path_sum { method minPathSumDFS (line 13) | static int minPathSumDFS(int[][] grid, int i, int j) { method minPathSumDFSMem (line 30) | static int minPathSumDFSMem(int[][] grid, int[][] mem, int i, int j) { method minPathSumDP (line 52) | static int minPathSumDP(int[][] grid) { method minPathSumDPComp (line 75) | static int minPathSumDPComp(int[][] grid) { method main (line 96) | public static void main(String[] args) { FILE: en/codes/java/chapter_dynamic_programming/unbounded_knapsack.java class unbounded_knapsack (line 9) | public class unbounded_knapsack { method unboundedKnapsackDP (line 11) | static int unboundedKnapsackDP(int[] wgt, int[] val, int cap) { method unboundedKnapsackDPComp (line 31) | static int unboundedKnapsackDPComp(int[] wgt, int[] val, int cap) { method main (line 50) | public static void main(String[] args) { FILE: en/codes/java/chapter_graph/graph_adjacency_list.java class GraphAdjList (line 13) | class GraphAdjList { method GraphAdjList (line 18) | public GraphAdjList(Vertex[][] edges) { method size (line 29) | public int size() { method addEdge (line 34) | public void addEdge(Vertex vet1, Vertex vet2) { method removeEdge (line 43) | public void removeEdge(Vertex vet1, Vertex vet2) { method addVertex (line 52) | public void addVertex(Vertex vet) { method removeVertex (line 60) | public void removeVertex(Vertex vet) { method print (line 72) | public void print() { class graph_adjacency_list (line 83) | public class graph_adjacency_list { method main (line 84) | public static void main(String[] args) { FILE: en/codes/java/chapter_graph/graph_adjacency_matrix.java class GraphAdjMat (line 13) | class GraphAdjMat { method GraphAdjMat (line 18) | public GraphAdjMat(int[] vertices, int[][] edges) { method size (line 33) | public int size() { method addVertex (line 38) | public void addVertex(int val) { method removeVertex (line 55) | public void removeVertex(int index) { method addEdge (line 70) | public void addEdge(int i, int j) { method removeEdge (line 81) | public void removeEdge(int i, int j) { method print (line 90) | public void print() { class graph_adjacency_matrix (line 98) | public class graph_adjacency_matrix { method main (line 99) | public static void main(String[] args) { FILE: en/codes/java/chapter_graph/graph_bfs.java class graph_bfs (line 12) | public class graph_bfs { method graphBFS (line 15) | static List graphBFS(GraphAdjList graph, Vertex startVet) { method main (line 40) | public static void main(String[] args) { FILE: en/codes/java/chapter_graph/graph_dfs.java class graph_dfs (line 12) | public class graph_dfs { method dfs (line 14) | static void dfs(GraphAdjList graph, Set visited, List ... method graphDFS (line 28) | static List graphDFS(GraphAdjList graph, Vertex startVet) { method main (line 37) | public static void main(String[] args) { FILE: en/codes/java/chapter_greedy/coin_change_greedy.java class coin_change_greedy (line 11) | public class coin_change_greedy { method coinChangeGreedy (line 13) | static int coinChangeGreedy(int[] coins, int amt) { method main (line 31) | public static void main(String[] args) { FILE: en/codes/java/chapter_greedy/fractional_knapsack.java class Item (line 13) | class Item { method Item (line 17) | public Item(int w, int v) { class fractional_knapsack (line 23) | public class fractional_knapsack { method fractionalKnapsack (line 25) | static double fractionalKnapsack(int[] wgt, int[] val, int cap) { method main (line 50) | public static void main(String[] args) { FILE: en/codes/java/chapter_greedy/max_capacity.java class max_capacity (line 9) | public class max_capacity { method maxCapacity (line 11) | static int maxCapacity(int[] ht) { method main (line 31) | public static void main(String[] args) { FILE: en/codes/java/chapter_greedy/max_product_cutting.java class max_product_cutting (line 11) | public class max_product_cutting { method maxProductCutting (line 13) | public static int maxProductCutting(int n) { method main (line 33) | public static void main(String[] args) { FILE: en/codes/java/chapter_hashing/array_hash_map.java class Pair (line 12) | class Pair { method Pair (line 16) | public Pair(int key, String val) { class ArrayHashMap (line 23) | class ArrayHashMap { method ArrayHashMap (line 26) | public ArrayHashMap() { method hashFunc (line 35) | private int hashFunc(int key) { method get (line 41) | public String get(int key) { method put (line 50) | public void put(int key, String val) { method remove (line 57) | public void remove(int key) { method pairSet (line 64) | public List pairSet() { method keySet (line 74) | public List keySet() { method valueSet (line 84) | public List valueSet() { method print (line 94) | public void print() { class array_hash_map (line 101) | public class array_hash_map { method main (line 102) | public static void main(String[] args) { FILE: en/codes/java/chapter_hashing/built_in_hash.java class built_in_hash (line 12) | public class built_in_hash { method main (line 13) | public static void main(String[] args) { FILE: en/codes/java/chapter_hashing/hash_map.java class hash_map (line 12) | public class hash_map { method main (line 13) | public static void main(String[] args) { FILE: en/codes/java/chapter_hashing/hash_map_chaining.java class HashMapChaining (line 13) | class HashMapChaining { method HashMapChaining (line 21) | public HashMapChaining() { method hashFunc (line 33) | int hashFunc(int key) { method loadFactor (line 38) | double loadFactor() { method get (line 43) | String get(int key) { method put (line 57) | void put(int key, String val) { method remove (line 78) | void remove(int key) { method extend (line 92) | void extend() { method print (line 111) | void print() { class hash_map_chaining (line 122) | public class hash_map_chaining { method main (line 123) | public static void main(String[] args) { FILE: en/codes/java/chapter_hashing/hash_map_open_addressing.java class HashMapOpenAddressing (line 10) | class HashMapOpenAddressing { method HashMapOpenAddressing (line 19) | public HashMapOpenAddressing() { method hashFunc (line 25) | private int hashFunc(int key) { method loadFactor (line 30) | private double loadFactor() { method findBucket (line 35) | private int findBucket(int key) { method get (line 62) | public String get(int key) { method put (line 74) | public void put(int key, String val) { method remove (line 92) | public void remove(int key) { method extend (line 103) | private void extend() { method print (line 119) | public void print() { class hash_map_open_addressing (line 132) | public class hash_map_open_addressing { method main (line 133) | public static void main(String[] args) { FILE: en/codes/java/chapter_hashing/simple_hash.java class simple_hash (line 9) | public class simple_hash { method addHash (line 11) | static int addHash(String key) { method mulHash (line 21) | static int mulHash(String key) { method xorHash (line 31) | static int xorHash(String key) { method rotHash (line 41) | static int rotHash(String key) { method main (line 50) | public static void main(String[] args) { FILE: en/codes/java/chapter_heap/heap.java class heap (line 12) | public class heap { method testPush (line 13) | public static void testPush(Queue heap, int val) { method testPop (line 19) | public static void testPop(Queue heap) { method main (line 25) | public static void main(String[] args) { FILE: en/codes/java/chapter_heap/my_heap.java class MaxHeap (line 13) | class MaxHeap { method MaxHeap (line 18) | public MaxHeap(List nums) { method left (line 28) | private int left(int i) { method right (line 33) | private int right(int i) { method parent (line 38) | private int parent(int i) { method swap (line 43) | private void swap(int i, int j) { method size (line 50) | public int size() { method isEmpty (line 55) | public boolean isEmpty() { method peek (line 60) | public int peek() { method push (line 65) | public void push(int val) { method siftUp (line 73) | private void siftUp(int i) { method pop (line 88) | public int pop() { method siftDown (line 103) | private void siftDown(int i) { method print (line 122) | public void print() { class my_heap (line 129) | public class my_heap { method main (line 130) | public static void main(String[] args) { FILE: en/codes/java/chapter_heap/top_k.java class top_k (line 12) | public class top_k { method topKHeap (line 14) | static Queue topKHeap(int[] nums, int k) { method main (line 32) | public static void main(String[] args) { FILE: en/codes/java/chapter_searching/binary_search.java class binary_search (line 9) | public class binary_search { method binarySearch (line 11) | static int binarySearch(int[] nums, int target) { method binarySearchLCRO (line 29) | static int binarySearchLCRO(int[] nums, int target) { method main (line 46) | public static void main(String[] args) { FILE: en/codes/java/chapter_searching/binary_search_edge.java class binary_search_edge (line 9) | public class binary_search_edge { method binarySearchLeftEdge (line 11) | static int binarySearchLeftEdge(int[] nums, int target) { method binarySearchRightEdge (line 23) | static int binarySearchRightEdge(int[] nums, int target) { method main (line 36) | public static void main(String[] args) { FILE: en/codes/java/chapter_searching/binary_search_insertion.java class binary_search_insertion (line 9) | class binary_search_insertion { method binarySearchInsertionSimple (line 11) | static int binarySearchInsertionSimple(int[] nums, int target) { method binarySearchInsertion (line 28) | static int binarySearchInsertion(int[] nums, int target) { method main (line 44) | public static void main(String[] args) { FILE: en/codes/java/chapter_searching/hashing_search.java class hashing_search (line 12) | public class hashing_search { method hashingSearchArray (line 14) | static int hashingSearchArray(Map map, int target) { method hashingSearchLinkedList (line 21) | static ListNode hashingSearchLinkedList(Map map, in... method main (line 27) | public static void main(String[] args) { FILE: en/codes/java/chapter_searching/linear_search.java class linear_search (line 11) | public class linear_search { method linearSearchArray (line 13) | static int linearSearchArray(int[] nums, int target) { method linearSearchLinkedList (line 25) | static ListNode linearSearchLinkedList(ListNode head, int target) { method main (line 37) | public static void main(String[] args) { FILE: en/codes/java/chapter_searching/two_sum.java class two_sum (line 11) | public class two_sum { method twoSumBruteForce (line 13) | static int[] twoSumBruteForce(int[] nums, int target) { method twoSumHashTable (line 26) | static int[] twoSumHashTable(int[] nums, int target) { method main (line 40) | public static void main(String[] args) { FILE: en/codes/java/chapter_sorting/bubble_sort.java class bubble_sort (line 11) | public class bubble_sort { method bubbleSort (line 13) | static void bubbleSort(int[] nums) { method bubbleSortWithFlag (line 29) | static void bubbleSortWithFlag(int[] nums) { method main (line 48) | public static void main(String[] args) { FILE: en/codes/java/chapter_sorting/bucket_sort.java class bucket_sort (line 11) | public class bucket_sort { method bucketSort (line 13) | static void bucketSort(float[] nums) { method main (line 41) | public static void main(String[] args) { FILE: en/codes/java/chapter_sorting/counting_sort.java class counting_sort (line 11) | public class counting_sort { method countingSortNaive (line 14) | static void countingSortNaive(int[] nums) { method countingSort (line 37) | static void countingSort(int[] nums) { method main (line 69) | public static void main(String[] args) { FILE: en/codes/java/chapter_sorting/heap_sort.java class heap_sort (line 11) | public class heap_sort { method siftDown (line 13) | public static void siftDown(int[] nums, int n, int i) { method heapSort (line 36) | public static void heapSort(int[] nums) { method main (line 52) | public static void main(String[] args) { FILE: en/codes/java/chapter_sorting/insertion_sort.java class insertion_sort (line 11) | public class insertion_sort { method insertionSort (line 13) | static void insertionSort(int[] nums) { method main (line 26) | public static void main(String[] args) { FILE: en/codes/java/chapter_sorting/merge_sort.java class merge_sort (line 11) | public class merge_sort { method merge (line 13) | static void merge(int[] nums, int left, int mid, int right) { method mergeSort (line 40) | static void mergeSort(int[] nums, int left, int right) { method main (line 52) | public static void main(String[] args) { FILE: en/codes/java/chapter_sorting/quick_sort.java class QuickSort (line 12) | class QuickSort { method swap (line 14) | static void swap(int[] nums, int i, int j) { method partition (line 21) | static int partition(int[] nums, int left, int right) { method quickSort (line 36) | public static void quickSort(int[] nums, int left, int right) { class QuickSortMedian (line 49) | class QuickSortMedian { method swap (line 51) | static void swap(int[] nums, int i, int j) { method medianThree (line 58) | static int medianThree(int[] nums, int left, int mid, int right) { method partition (line 68) | static int partition(int[] nums, int left, int right) { method quickSort (line 87) | public static void quickSort(int[] nums, int left, int right) { class QuickSortTailCall (line 100) | class QuickSortTailCall { method swap (line 102) | static void swap(int[] nums, int i, int j) { method partition (line 109) | static int partition(int[] nums, int left, int right) { method quickSort (line 124) | public static void quickSort(int[] nums, int left, int right) { class quick_sort (line 141) | public class quick_sort { method main (line 142) | public static void main(String[] args) { FILE: en/codes/java/chapter_sorting/radix_sort.java class radix_sort (line 11) | public class radix_sort { method digit (line 13) | static int digit(int num, int exp) { method countingSortDigit (line 19) | static void countingSortDigit(int[] nums, int exp) { method radixSort (line 46) | static void radixSort(int[] nums) { method main (line 62) | public static void main(String[] args) { FILE: en/codes/java/chapter_sorting/selection_sort.java class selection_sort (line 11) | public class selection_sort { method selectionSort (line 13) | public static void selectionSort(int[] nums) { method main (line 30) | public static void main(String[] args) { FILE: en/codes/java/chapter_stack_and_queue/array_deque.java class ArrayDeque (line 12) | class ArrayDeque { method ArrayDeque (line 18) | public ArrayDeque(int capacity) { method capacity (line 24) | public int capacity() { method size (line 29) | public int size() { method isEmpty (line 34) | public boolean isEmpty() { method index (line 39) | private int index(int i) { method pushFirst (line 47) | public void pushFirst(int num) { method pushLast (line 61) | public void pushLast(int num) { method popFirst (line 74) | public int popFirst() { method popLast (line 83) | public int popLast() { method peekFirst (line 90) | public int peekFirst() { method peekLast (line 97) | public int peekLast() { method toArray (line 106) | public int[] toArray() { class array_deque (line 116) | public class array_deque { method main (line 117) | public static void main(String[] args) { FILE: en/codes/java/chapter_stack_and_queue/array_queue.java class ArrayQueue (line 12) | class ArrayQueue { method ArrayQueue (line 17) | public ArrayQueue(int capacity) { method capacity (line 23) | public int capacity() { method size (line 28) | public int size() { method isEmpty (line 33) | public boolean isEmpty() { method push (line 38) | public void push(int num) { method pop (line 52) | public int pop() { method peek (line 61) | public int peek() { method toArray (line 68) | public int[] toArray() { class array_queue (line 78) | public class array_queue { method main (line 79) | public static void main(String[] args) { FILE: en/codes/java/chapter_stack_and_queue/array_stack.java class ArrayStack (line 12) | class ArrayStack { method ArrayStack (line 15) | public ArrayStack() { method size (line 21) | public int size() { method isEmpty (line 26) | public boolean isEmpty() { method push (line 31) | public void push(int num) { method pop (line 36) | public int pop() { method peek (line 43) | public int peek() { method toArray (line 50) | public Object[] toArray() { class array_stack (line 55) | public class array_stack { method main (line 56) | public static void main(String[] args) { FILE: en/codes/java/chapter_stack_and_queue/deque.java class deque (line 11) | public class deque { method main (line 12) | public static void main(String[] args) { FILE: en/codes/java/chapter_stack_and_queue/linkedlist_deque.java class ListNode (line 12) | class ListNode { method ListNode (line 17) | ListNode(int val) { class LinkedListDeque (line 24) | class LinkedListDeque { method LinkedListDeque (line 28) | public LinkedListDeque() { method size (line 33) | public int size() { method isEmpty (line 38) | public boolean isEmpty() { method push (line 43) | private void push(int num, boolean isFront) { method pushFirst (line 65) | public void pushFirst(int num) { method pushLast (line 70) | public void pushLast(int num) { method pop (line 75) | private int pop(boolean isFront) { method popFirst (line 105) | public int popFirst() { method popLast (line 110) | public int popLast() { method peekFirst (line 115) | public int peekFirst() { method peekLast (line 122) | public int peekLast() { method toArray (line 129) | public int[] toArray() { class linkedlist_deque (line 140) | public class linkedlist_deque { method main (line 141) | public static void main(String[] args) { FILE: en/codes/java/chapter_stack_and_queue/linkedlist_queue.java class LinkedListQueue (line 12) | class LinkedListQueue { method LinkedListQueue (line 16) | public LinkedListQueue() { method size (line 22) | public int size() { method isEmpty (line 27) | public boolean isEmpty() { method push (line 32) | public void push(int num) { method pop (line 48) | public int pop() { method peek (line 57) | public int peek() { method toArray (line 64) | public int[] toArray() { class linkedlist_queue (line 75) | public class linkedlist_queue { method main (line 76) | public static void main(String[] args) { FILE: en/codes/java/chapter_stack_and_queue/linkedlist_stack.java class LinkedListStack (line 13) | class LinkedListStack { method LinkedListStack (line 17) | public LinkedListStack() { method size (line 22) | public int size() { method isEmpty (line 27) | public boolean isEmpty() { method push (line 32) | public void push(int num) { method pop (line 40) | public int pop() { method peek (line 48) | public int peek() { method toArray (line 55) | public int[] toArray() { class linkedlist_stack (line 66) | public class linkedlist_stack { method main (line 67) | public static void main(String[] args) { FILE: en/codes/java/chapter_stack_and_queue/queue.java class queue (line 11) | public class queue { method main (line 12) | public static void main(String[] args) { FILE: en/codes/java/chapter_stack_and_queue/stack.java class stack (line 11) | public class stack { method main (line 12) | public static void main(String[] args) { FILE: en/codes/java/chapter_tree/array_binary_tree.java class ArrayBinaryTree (line 13) | class ArrayBinaryTree { method ArrayBinaryTree (line 17) | public ArrayBinaryTree(List arr) { method size (line 22) | public int size() { method val (line 27) | public Integer val(int i) { method left (line 35) | public Integer left(int i) { method right (line 40) | public Integer right(int i) { method parent (line 45) | public Integer parent(int i) { method levelOrder (line 50) | public List levelOrder() { method dfs (line 61) | private void dfs(Integer i, String order, List res) { method preOrder (line 79) | public List preOrder() { method inOrder (line 86) | public List inOrder() { method postOrder (line 93) | public List postOrder() { class array_binary_tree (line 100) | public class array_binary_tree { method main (line 101) | public static void main(String[] args) { FILE: en/codes/java/chapter_tree/avl_tree.java class AVLTree (line 12) | class AVLTree { method height (line 16) | public int height(TreeNode node) { method updateHeight (line 22) | private void updateHeight(TreeNode node) { method balanceFactor (line 28) | public int balanceFactor(TreeNode node) { method rightRotate (line 37) | private TreeNode rightRotate(TreeNode node) { method leftRotate (line 51) | private TreeNode leftRotate(TreeNode node) { method rotate (line 65) | private TreeNode rotate(TreeNode node) { method insert (line 95) | public void insert(int val) { method insertHelper (line 100) | private TreeNode insertHelper(TreeNode node, int val) { method remove (line 118) | public void remove(int val) { method removeHelper (line 123) | private TreeNode removeHelper(TreeNode node, int val) { method search (line 158) | public TreeNode search(int val) { class avl_tree (line 177) | public class avl_tree { method testInsert (line 178) | static void testInsert(AVLTree tree, int val) { method testRemove (line 184) | static void testRemove(AVLTree tree, int val) { method main (line 190) | public static void main(String[] args) { FILE: en/codes/java/chapter_tree/binary_search_tree.java class BinarySearchTree (line 12) | class BinarySearchTree { method BinarySearchTree (line 16) | public BinarySearchTree() { method getRoot (line 22) | public TreeNode getRoot() { method search (line 27) | public TreeNode search(int num) { method insert (line 46) | public void insert(int num) { method remove (line 75) | public void remove(int num) { class binary_search_tree (line 126) | public class binary_search_tree { method main (line 127) | public static void main(String[] args) { FILE: en/codes/java/chapter_tree/binary_tree.java class binary_tree (line 11) | public class binary_tree { method main (line 12) | public static void main(String[] args) { FILE: en/codes/java/chapter_tree/binary_tree_bfs.java class binary_tree_bfs (line 12) | public class binary_tree_bfs { method levelOrder (line 14) | static List levelOrder(TreeNode root) { method main (line 31) | public static void main(String[] args) { FILE: en/codes/java/chapter_tree/binary_tree_dfs.java class binary_tree_dfs (line 12) | public class binary_tree_dfs { method preOrder (line 17) | static void preOrder(TreeNode root) { method inOrder (line 27) | static void inOrder(TreeNode root) { method postOrder (line 37) | static void postOrder(TreeNode root) { method main (line 46) | public static void main(String[] args) { FILE: en/codes/java/utils/ListNode.java class ListNode (line 10) | public class ListNode { method ListNode (line 14) | public ListNode(int x) { method arrToLinkedList (line 19) | public static ListNode arrToLinkedList(int[] arr) { FILE: en/codes/java/utils/PrintUtil.java class Trunk (line 11) | class Trunk { method Trunk (line 15) | Trunk(Trunk prev, String str) { class PrintUtil (line 21) | public class PrintUtil { method printMatrix (line 23) | public static void printMatrix(T[][] matrix) { method printMatrix (line 32) | public static void printMatrix(List> matrix) { method printLinkedList (line 41) | public static void printLinkedList(ListNode head) { method printTree (line 51) | public static void printTree(TreeNode root) { method printTree (line 60) | public static void printTree(TreeNode root, Trunk prev, boolean isRigh... method showTrunks (line 91) | public static void showTrunks(Trunk p) { method printHashMap (line 101) | public static void printHashMap(Map map) { method printHeap (line 108) | public static void printHeap(Queue queue) { FILE: en/codes/java/utils/TreeNode.java class TreeNode (line 12) | public class TreeNode { method TreeNode (line 19) | public TreeNode(int x) { method listToTreeDFS (line 40) | private static TreeNode listToTreeDFS(List arr, int i) { method listToTree (line 51) | public static TreeNode listToTree(List arr) { method treeToListDFS (line 56) | private static void treeToListDFS(TreeNode root, int i, List ... method treeToList (line 68) | public static List treeToList(TreeNode root) { FILE: en/codes/java/utils/Vertex.java class Vertex (line 12) | public class Vertex { method Vertex (line 15) | public Vertex(int val) { method valsToVets (line 20) | public static Vertex[] valsToVets(int[] vals) { method vetsToVals (line 29) | public static List vetsToVals(List vets) { FILE: en/codes/javascript/chapter_array_and_linkedlist/array.js function randomAccess (line 8) | function randomAccess(nums) { function extend (line 19) | function extend(nums, enlarge) { function insert (line 31) | function insert(nums, num, index) { function remove (line 41) | function remove(nums, index) { function traverse (line 49) | function traverse(nums) { function find (line 62) | function find(nums, target) { FILE: en/codes/javascript/chapter_array_and_linkedlist/linked_list.js function insert (line 11) | function insert(n0, P) { function remove (line 18) | function remove(n0) { function access (line 27) | function access(head, index) { function find (line 38) | function find(head, target) { FILE: en/codes/javascript/chapter_array_and_linkedlist/my_list.js class MyList (line 8) | class MyList { method constructor (line 15) | constructor() { method size (line 20) | size() { method capacity (line 25) | capacity() { method get (line 30) | get(index) { method set (line 37) | set(index, num) { method add (line 43) | add(num) { method insert (line 54) | insert(index, num) { method remove (line 70) | remove(index) { method extendCapacity (line 84) | extendCapacity() { method toArray (line 94) | toArray() { FILE: en/codes/javascript/chapter_backtracking/n_queens.js function backtrack (line 8) | function backtrack(row, n, state, res, cols, diags1, diags2) { function nQueens (line 34) | function nQueens(n) { FILE: en/codes/javascript/chapter_backtracking/permutations_i.js function backtrack (line 8) | function backtrack(state, choices, selected, res) { function permutationsI (line 31) | function permutationsI(nums) { FILE: en/codes/javascript/chapter_backtracking/permutations_ii.js function backtrack (line 8) | function backtrack(state, choices, selected, res) { function permutationsII (line 33) | function permutationsII(nums) { FILE: en/codes/javascript/chapter_backtracking/preorder_traversal_i_compact.js function preOrder (line 11) | function preOrder(root, res) { FILE: en/codes/javascript/chapter_backtracking/preorder_traversal_ii_compact.js function preOrder (line 11) | function preOrder(root, path, res) { FILE: en/codes/javascript/chapter_backtracking/preorder_traversal_iii_compact.js function preOrder (line 11) | function preOrder(root, path, res) { FILE: en/codes/javascript/chapter_backtracking/preorder_traversal_iii_template.js function isSolution (line 11) | function isSolution(state) { function recordSolution (line 16) | function recordSolution(state, res) { function isValid (line 21) | function isValid(state, choice) { function makeChoice (line 26) | function makeChoice(state, choice) { function undoChoice (line 31) | function undoChoice(state) { function backtrack (line 36) | function backtrack(state, choices, res) { FILE: en/codes/javascript/chapter_backtracking/subset_sum_i.js function backtrack (line 8) | function backtrack(state, target, choices, start, res) { function subsetSumI (line 32) | function subsetSumI(nums, target) { FILE: en/codes/javascript/chapter_backtracking/subset_sum_i_naive.js function backtrack (line 8) | function backtrack(state, target, total, choices, res) { function subsetSumINaive (line 30) | function subsetSumINaive(nums, target) { FILE: en/codes/javascript/chapter_backtracking/subset_sum_ii.js function backtrack (line 8) | function backtrack(state, target, choices, start, res) { function subsetSumII (line 37) | function subsetSumII(nums, target) { FILE: en/codes/javascript/chapter_computational_complexity/iteration.js function forLoop (line 8) | function forLoop(n) { function whileLoop (line 18) | function whileLoop(n) { function whileLoopII (line 30) | function whileLoopII(n) { function nestedForLoop (line 44) | function nestedForLoop(n) { FILE: en/codes/javascript/chapter_computational_complexity/recursion.js function recur (line 8) | function recur(n) { function forLoopRecur (line 18) | function forLoopRecur(n) { function tailRecur (line 37) | function tailRecur(n, res) { function fib (line 45) | function fib(n) { FILE: en/codes/javascript/chapter_computational_complexity/space_complexity.js function constFunc (line 12) | function constFunc() { function constant (line 18) | function constant(n) { function linear (line 35) | function linear(n) { function linearRecur (line 51) | function linearRecur(n) { function quadratic (line 58) | function quadratic(n) { function quadraticRecur (line 75) | function quadraticRecur(n) { function buildTree (line 83) | function buildTree(n) { FILE: en/codes/javascript/chapter_computational_complexity/time_complexity.js function constant (line 8) | function constant(n) { function linear (line 16) | function linear(n) { function arrayTraversal (line 23) | function arrayTraversal(nums) { function quadratic (line 33) | function quadratic(n) { function bubbleSort (line 45) | function bubbleSort(nums) { function exponential (line 64) | function exponential(n) { function expRecur (line 79) | function expRecur(n) { function logarithmic (line 85) | function logarithmic(n) { function logRecur (line 95) | function logRecur(n) { function linearLogRecur (line 101) | function linearLogRecur(n) { function factorialRecur (line 111) | function factorialRecur(n) { FILE: en/codes/javascript/chapter_computational_complexity/worst_best_time_complexity.js function randomNumbers (line 8) | function randomNumbers(n) { function findOne (line 25) | function findOne(nums) { FILE: en/codes/javascript/chapter_divide_and_conquer/binary_search_recur.js function dfs (line 8) | function dfs(nums, target, i, j) { function binarySearch (line 28) | function binarySearch(nums, target) { FILE: en/codes/javascript/chapter_divide_and_conquer/build_tree.js function dfs (line 11) | function dfs(preorder, inorderMap, i, l, r) { function buildTree (line 27) | function buildTree(preorder, inorder) { FILE: en/codes/javascript/chapter_divide_and_conquer/hanota.js function move (line 8) | function move(src, tar) { function dfs (line 16) | function dfs(i, src, buf, tar) { function solveHanota (line 31) | function solveHanota(A, B, C) { FILE: en/codes/javascript/chapter_dynamic_programming/climbing_stairs_backtrack.js function backtrack (line 8) | function backtrack(choices, state, n, res) { function climbingStairsBacktrack (line 22) | function climbingStairsBacktrack(n) { FILE: en/codes/javascript/chapter_dynamic_programming/climbing_stairs_constraint_dp.js function climbingStairsConstraintDP (line 8) | function climbingStairsConstraintDP(n) { FILE: en/codes/javascript/chapter_dynamic_programming/climbing_stairs_dfs.js function dfs (line 8) | function dfs(i) { function climbingStairsDFS (line 17) | function climbingStairsDFS(n) { FILE: en/codes/javascript/chapter_dynamic_programming/climbing_stairs_dfs_mem.js function dfs (line 8) | function dfs(i, mem) { function climbingStairsDFSMem (line 21) | function climbingStairsDFSMem(n) { FILE: en/codes/javascript/chapter_dynamic_programming/climbing_stairs_dp.js function climbingStairsDP (line 8) | function climbingStairsDP(n) { function climbingStairsDPComp (line 23) | function climbingStairsDPComp(n) { FILE: en/codes/javascript/chapter_dynamic_programming/coin_change.js function coinChangeDP (line 8) | function coinChangeDP(coins, amt) { function coinChangeDPComp (line 35) | function coinChangeDPComp(coins, amt) { FILE: en/codes/javascript/chapter_dynamic_programming/coin_change_ii.js function coinChangeIIDP (line 8) | function coinChangeIIDP(coins, amt) { function coinChangeIIDPComp (line 34) | function coinChangeIIDPComp(coins, amt) { FILE: en/codes/javascript/chapter_dynamic_programming/edit_distance.js function editDistanceDFS (line 8) | function editDistanceDFS(s, t, i, j) { function editDistanceDFSMem (line 31) | function editDistanceDFSMem(s, t, mem, i, j) { function editDistanceDP (line 58) | function editDistanceDP(s, t) { function editDistanceDPComp (line 86) | function editDistanceDPComp(s, t) { FILE: en/codes/javascript/chapter_dynamic_programming/knapsack.js function knapsackDFS (line 8) | function knapsackDFS(wgt, val, i, c) { function knapsackDFSMem (line 25) | function knapsackDFSMem(wgt, val, mem, i, c) { function knapsackDP (line 48) | function knapsackDP(wgt, val, cap) { function knapsackDPComp (line 73) | function knapsackDPComp(wgt, val, cap) { FILE: en/codes/javascript/chapter_dynamic_programming/min_cost_climbing_stairs_dp.js function minCostClimbingStairsDP (line 8) | function minCostClimbingStairsDP(cost) { function minCostClimbingStairsDPComp (line 26) | function minCostClimbingStairsDPComp(cost) { FILE: en/codes/javascript/chapter_dynamic_programming/min_path_sum.js function minPathSumDFS (line 8) | function minPathSumDFS(grid, i, j) { function minPathSumDFSMem (line 25) | function minPathSumDFSMem(grid, mem, i, j) { function minPathSumDP (line 47) | function minPathSumDP(grid) { function minPathSumDPComp (line 73) | function minPathSumDPComp(grid) { FILE: en/codes/javascript/chapter_dynamic_programming/unbounded_knapsack.js function unboundedKnapsackDP (line 8) | function unboundedKnapsackDP(wgt, val, cap) { function unboundedKnapsackDPComp (line 33) | function unboundedKnapsackDPComp(wgt, val, cap) { FILE: en/codes/javascript/chapter_graph/graph_adjacency_list.js class GraphAdjList (line 10) | class GraphAdjList { method constructor (line 15) | constructor(edges) { method size (line 26) | size() { method addEdge (line 31) | addEdge(vet1, vet2) { method removeEdge (line 45) | removeEdge(vet1, vet2) { method addVertex (line 60) | addVertex(vet) { method removeVertex (line 67) | removeVertex(vet) { method print (line 83) | print() { FILE: en/codes/javascript/chapter_graph/graph_adjacency_matrix.js class GraphAdjMat (line 8) | class GraphAdjMat { method constructor (line 13) | constructor(vertices, edges) { method size (line 28) | size() { method addVertex (line 33) | addVertex(val) { method removeVertex (line 50) | removeVertex(index) { method addEdge (line 67) | addEdge(i, j) { method removeEdge (line 79) | removeEdge(i, j) { method print (line 89) | print() { FILE: en/codes/javascript/chapter_graph/graph_bfs.js function graphBFS (line 12) | function graphBFS(graph, startVet) { FILE: en/codes/javascript/chapter_graph/graph_dfs.js function dfs (line 12) | function dfs(graph, visited, res, vet) { function graphDFS (line 27) | function graphDFS(graph, startVet) { FILE: en/codes/javascript/chapter_greedy/coin_change_greedy.js function coinChangeGreedy (line 8) | function coinChangeGreedy(coins, amt) { FILE: en/codes/javascript/chapter_greedy/fractional_knapsack.js class Item (line 8) | class Item { method constructor (line 9) | constructor(w, v) { function fractionalKnapsack (line 16) | function fractionalKnapsack(wgt, val, cap) { FILE: en/codes/javascript/chapter_greedy/max_capacity.js function maxCapacity (line 8) | function maxCapacity(ht) { FILE: en/codes/javascript/chapter_greedy/max_product_cutting.js function maxProductCutting (line 8) | function maxProductCutting(n) { FILE: en/codes/javascript/chapter_hashing/array_hash_map.js class Pair (line 8) | class Pair { method constructor (line 9) | constructor(key, val) { class ArrayHashMap (line 16) | class ArrayHashMap { method constructor (line 18) | constructor() { method #hashFunc (line 24) | #hashFunc(key) { method get (line 29) | get(key) { method set (line 37) | set(key, val) { method delete (line 43) | delete(key) { method entries (line 50) | entries() { method keys (line 61) | keys() { method values (line 72) | values() { method print (line 83) | print() { FILE: en/codes/javascript/chapter_hashing/hash_map_chaining.js class Pair (line 8) | class Pair { method constructor (line 9) | constructor(key, val) { class HashMapChaining (line 16) | class HashMapChaining { method constructor (line 24) | constructor() { method #hashFunc (line 33) | #hashFunc(key) { method #loadFactor (line 38) | #loadFactor() { method get (line 43) | get(key) { method put (line 57) | put(key, val) { method remove (line 78) | remove(key) { method #extend (line 92) | #extend() { method print (line 108) | print() { FILE: en/codes/javascript/chapter_hashing/hash_map_open_addressing.js class Pair (line 8) | class Pair { method constructor (line 9) | constructor(key, val) { class HashMapOpenAddressing (line 16) | class HashMapOpenAddressing { method constructor (line 25) | constructor() { method #hashFunc (line 35) | #hashFunc(key) { method #loadFactor (line 40) | #loadFactor() { method #findBucket (line 45) | #findBucket(key) { method get (line 75) | get(key) { method put (line 90) | put(key, val) { method remove (line 111) | remove(key) { method #extend (line 125) | #extend() { method print (line 141) | print() { FILE: en/codes/javascript/chapter_hashing/simple_hash.js function addHash (line 8) | function addHash(key) { function mulHash (line 18) | function mulHash(key) { function xorHash (line 28) | function xorHash(key) { function rotHash (line 38) | function rotHash(key) { FILE: en/codes/javascript/chapter_heap/my_heap.js class MaxHeap (line 10) | class MaxHeap { method constructor (line 14) | constructor(nums) { method #left (line 24) | #left(i) { method #right (line 29) | #right(i) { method #parent (line 34) | #parent(i) { method #swap (line 39) | #swap(i, j) { method size (line 46) | size() { method isEmpty (line 51) | isEmpty() { method peek (line 56) | peek() { method push (line 61) | push(val) { method #siftUp (line 69) | #siftUp(i) { method pop (line 83) | pop() { method #siftDown (line 97) | #siftDown(i) { method print (line 115) | print() { method getMaxHeap (line 120) | getMaxHeap() { FILE: en/codes/javascript/chapter_heap/top_k.js function pushMinHeap (line 10) | function pushMinHeap(maxHeap, val) { function popMinHeap (line 16) | function popMinHeap(maxHeap) { function peekMinHeap (line 22) | function peekMinHeap(maxHeap) { function getMinHeap (line 28) | function getMinHeap(maxHeap) { function topKHeap (line 34) | function topKHeap(nums, k) { FILE: en/codes/javascript/chapter_searching/binary_search.js function binarySearch (line 8) | function binarySearch(nums, target) { function binarySearchLCRO (line 29) | function binarySearchLCRO(nums, target) { FILE: en/codes/javascript/chapter_searching/binary_search_edge.js function binarySearchLeftEdge (line 10) | function binarySearchLeftEdge(nums, target) { function binarySearchRightEdge (line 22) | function binarySearchRightEdge(nums, target) { FILE: en/codes/javascript/chapter_searching/binary_search_insertion.js function binarySearchInsertionSimple (line 8) | function binarySearchInsertionSimple(nums, target) { function binarySearchInsertion (line 26) | function binarySearchInsertion(nums, target) { FILE: en/codes/javascript/chapter_searching/hashing_search.js function hashingSearchArray (line 10) | function hashingSearchArray(map, target) { function hashingSearchLinkedList (line 17) | function hashingSearchLinkedList(map, target) { FILE: en/codes/javascript/chapter_searching/linear_search.js function linearSearchArray (line 10) | function linearSearchArray(nums, target) { function linearSearchLinkedList (line 23) | function linearSearchLinkedList(head, target) { FILE: en/codes/javascript/chapter_searching/two_sum.js function twoSumBruteForce (line 8) | function twoSumBruteForce(nums, target) { function twoSumHashTable (line 22) | function twoSumHashTable(nums, target) { FILE: en/codes/javascript/chapter_sorting/bubble_sort.js function bubbleSort (line 8) | function bubbleSort(nums) { function bubbleSortWithFlag (line 24) | function bubbleSortWithFlag(nums) { FILE: en/codes/javascript/chapter_sorting/bucket_sort.js function bucketSort (line 8) | function bucketSort(nums) { FILE: en/codes/javascript/chapter_sorting/counting_sort.js function countingSortNaive (line 9) | function countingSortNaive(nums) { function countingSort (line 29) | function countingSort(nums) { FILE: en/codes/javascript/chapter_sorting/heap_sort.js function siftDown (line 8) | function siftDown(nums, n, i) { function heapSort (line 32) | function heapSort(nums) { FILE: en/codes/javascript/chapter_sorting/insertion_sort.js function insertionSort (line 8) | function insertionSort(nums) { FILE: en/codes/javascript/chapter_sorting/merge_sort.js function merge (line 8) | function merge(nums, left, mid, right) { function mergeSort (line 38) | function mergeSort(nums, left, right) { FILE: en/codes/javascript/chapter_sorting/quick_sort.js class QuickSort (line 8) | class QuickSort { method swap (line 10) | swap(nums, i, j) { method partition (line 17) | partition(nums, left, right) { method quickSort (line 36) | quickSort(nums, left, right) { class QuickSortMedian (line 48) | class QuickSortMedian { method swap (line 50) | swap(nums, i, j) { method medianThree (line 57) | medianThree(nums, left, mid, right) { method partition (line 69) | partition(nums, left, right) { method quickSort (line 92) | quickSort(nums, left, right) { class QuickSortTailCall (line 104) | class QuickSortTailCall { method swap (line 106) | swap(nums, i, j) { method partition (line 113) | partition(nums, left, right) { method quickSort (line 127) | quickSort(nums, left, right) { FILE: en/codes/javascript/chapter_sorting/radix_sort.js function digit (line 8) | function digit(num, exp) { function countingSortDigit (line 14) | function countingSortDigit(nums, exp) { function radixSort (line 42) | function radixSort(nums) { FILE: en/codes/javascript/chapter_sorting/selection_sort.js function selectionSort (line 8) | function selectionSort(nums) { FILE: en/codes/javascript/chapter_stack_and_queue/array_deque.js class ArrayDeque (line 8) | class ArrayDeque { method constructor (line 14) | constructor(capacity) { method capacity (line 21) | capacity() { method size (line 26) | size() { method isEmpty (line 31) | isEmpty() { method index (line 36) | index(i) { method pushFirst (line 44) | pushFirst(num) { method pushLast (line 58) | pushLast(num) { method popFirst (line 71) | popFirst() { method popLast (line 80) | popLast() { method peekFirst (line 87) | peekFirst() { method peekLast (line 93) | peekLast() { method toArray (line 101) | toArray() { FILE: en/codes/javascript/chapter_stack_and_queue/array_queue.js class ArrayQueue (line 8) | class ArrayQueue { method constructor (line 13) | constructor(capacity) { method capacity (line 18) | get capacity() { method size (line 23) | get size() { method isEmpty (line 28) | isEmpty() { method push (line 33) | push(num) { method pop (line 47) | pop() { method peek (line 56) | peek() { method toArray (line 62) | toArray() { FILE: en/codes/javascript/chapter_stack_and_queue/array_stack.js class ArrayStack (line 8) | class ArrayStack { method constructor (line 10) | constructor() { method size (line 15) | get size() { method isEmpty (line 20) | isEmpty() { method push (line 25) | push(num) { method pop (line 30) | pop() { method top (line 36) | top() { method toArray (line 42) | toArray() { FILE: en/codes/javascript/chapter_stack_and_queue/linkedlist_deque.js class ListNode (line 8) | class ListNode { method constructor (line 13) | constructor(val) { class LinkedListDeque (line 21) | class LinkedListDeque { method constructor (line 26) | constructor() { method pushLast (line 33) | pushLast(val) { method pushFirst (line 49) | pushFirst(val) { method popLast (line 65) | popLast() { method popFirst (line 82) | popFirst() { method peekLast (line 99) | peekLast() { method peekFirst (line 104) | peekFirst() { method size (line 109) | size() { method isEmpty (line 114) | isEmpty() { method print (line 119) | print() { FILE: en/codes/javascript/chapter_stack_and_queue/linkedlist_queue.js class LinkedListQueue (line 10) | class LinkedListQueue { method constructor (line 15) | constructor() { method size (line 21) | get size() { method isEmpty (line 26) | isEmpty() { method push (line 31) | push(num) { method pop (line 47) | pop() { method peek (line 56) | peek() { method toArray (line 62) | toArray() { FILE: en/codes/javascript/chapter_stack_and_queue/linkedlist_stack.js class LinkedListStack (line 10) | class LinkedListStack { method constructor (line 14) | constructor() { method size (line 19) | get size() { method isEmpty (line 24) | isEmpty() { method push (line 29) | push(num) { method pop (line 37) | pop() { method peek (line 45) | peek() { method toArray (line 51) | toArray() { FILE: en/codes/javascript/chapter_tree/array_binary_tree.js class ArrayBinaryTree (line 11) | class ArrayBinaryTree { method constructor (line 15) | constructor(arr) { method size (line 20) | size() { method val (line 25) | val(i) { method left (line 32) | left(i) { method right (line 37) | right(i) { method parent (line 42) | parent(i) { method levelOrder (line 47) | levelOrder() { method #dfs (line 57) | #dfs(i, order, res) { method preOrder (line 71) | preOrder() { method inOrder (line 78) | inOrder() { method postOrder (line 85) | postOrder() { FILE: en/codes/javascript/chapter_tree/avl_tree.js class AVLTree (line 11) | class AVLTree { method constructor (line 13) | constructor() { method height (line 18) | height(node) { method #updateHeight (line 24) | #updateHeight(node) { method balanceFactor (line 31) | balanceFactor(node) { method #rightRotate (line 39) | #rightRotate(node) { method #leftRotate (line 53) | #leftRotate(node) { method #rotate (line 67) | #rotate(node) { method insert (line 97) | insert(val) { method #insertHelper (line 102) | #insertHelper(node, val) { method remove (line 117) | remove(val) { method #removeHelper (line 122) | #removeHelper(node, val) { method search (line 153) | search(val) { function testInsert (line 169) | function testInsert(tree, val) { function testRemove (line 175) | function testRemove(tree, val) { FILE: en/codes/javascript/chapter_tree/binary_search_tree.js class BinarySearchTree (line 11) | class BinarySearchTree { method constructor (line 13) | constructor() { method getRoot (line 19) | getRoot() { method search (line 24) | search(num) { method insert (line 40) | insert(num) { method remove (line 65) | remove(num) { FILE: en/codes/javascript/chapter_tree/binary_tree_bfs.js function levelOrder (line 11) | function levelOrder(root) { FILE: en/codes/javascript/chapter_tree/binary_tree_dfs.js function preOrder (line 14) | function preOrder(root) { function inOrder (line 23) | function inOrder(root) { function postOrder (line 32) | function postOrder(root) { FILE: en/codes/javascript/modules/ListNode.js class ListNode (line 8) | class ListNode { method constructor (line 11) | constructor(val, next) { function arrToLinkedList (line 18) | function arrToLinkedList(arr) { FILE: en/codes/javascript/modules/PrintUtil.js function printLinkedList (line 10) | function printLinkedList(head) { function Trunk (line 19) | function Trunk(prev, str) { function printTree (line 29) | function printTree(root) { function printTree (line 34) | function printTree(root, prev, isRight) { function showTrunks (line 65) | function showTrunks(p) { function printHeap (line 75) | function printHeap(arr) { FILE: en/codes/javascript/modules/TreeNode.js class TreeNode (line 8) | class TreeNode { method constructor (line 13) | constructor(val, left, right, height) { function arrToTree (line 22) | function arrToTree(arr, i = 0) { FILE: en/codes/javascript/modules/Vertex.js class Vertex (line 8) | class Vertex { method constructor (line 10) | constructor(val) { method valsToVets (line 15) | static valsToVets(vals) { method vetsToVals (line 24) | static vetsToVals(vets) { FILE: en/codes/python/chapter_array_and_linkedlist/array.py function random_access (line 10) | def random_access(nums: list[int]) -> int: function extend (line 21) | def extend(nums: list[int], enlarge: int) -> list[int]: function insert (line 32) | def insert(nums: list[int], num: int, index: int): function remove (line 41) | def remove(nums: list[int], index: int): function traverse (line 48) | def traverse(nums: list[int]): function find (line 63) | def find(nums: list[int], target: int) -> int: FILE: en/codes/python/chapter_array_and_linkedlist/linked_list.py function insert (line 14) | def insert(n0: ListNode, P: ListNode): function remove (line 21) | def remove(n0: ListNode): function access (line 31) | def access(head: ListNode, index: int) -> ListNode | None: function find (line 40) | def find(head: ListNode, target: int) -> int: FILE: en/codes/python/chapter_array_and_linkedlist/my_list.py class MyList (line 8) | class MyList: method __init__ (line 11) | def __init__(self): method size (line 18) | def size(self) -> int: method capacity (line 22) | def capacity(self) -> int: method get (line 26) | def get(self, index: int) -> int: method set (line 33) | def set(self, num: int, index: int): method add (line 39) | def add(self, num: int): method insert (line 47) | def insert(self, num: int, index: int): method remove (line 61) | def remove(self, index: int) -> int: method extend_capacity (line 74) | def extend_capacity(self): method to_array (line 81) | def to_array(self) -> list[int]: FILE: en/codes/python/chapter_backtracking/n_queens.py function backtrack (line 8) | def backtrack( function n_queens (line 39) | def n_queens(n: int) -> list[list[list[str]]]: FILE: en/codes/python/chapter_backtracking/permutations_i.py function backtrack (line 8) | def backtrack( function permutations_i (line 30) | def permutations_i(nums: list[int]) -> list[list[int]]: FILE: en/codes/python/chapter_backtracking/permutations_ii.py function backtrack (line 8) | def backtrack( function permutations_ii (line 32) | def permutations_ii(nums: list[int]) -> list[list[int]]: FILE: en/codes/python/chapter_backtracking/preorder_traversal_i_compact.py function pre_order (line 14) | def pre_order(root: TreeNode): FILE: en/codes/python/chapter_backtracking/preorder_traversal_ii_compact.py function pre_order (line 14) | def pre_order(root: TreeNode): FILE: en/codes/python/chapter_backtracking/preorder_traversal_iii_compact.py function pre_order (line 14) | def pre_order(root: TreeNode): FILE: en/codes/python/chapter_backtracking/preorder_traversal_iii_template.py function is_solution (line 14) | def is_solution(state: list[TreeNode]) -> bool: function record_solution (line 19) | def record_solution(state: list[TreeNode], res: list[list[TreeNode]]): function is_valid (line 24) | def is_valid(state: list[TreeNode], choice: TreeNode) -> bool: function make_choice (line 29) | def make_choice(state: list[TreeNode], choice: TreeNode): function undo_choice (line 34) | def undo_choice(state: list[TreeNode], choice: TreeNode): function backtrack (line 39) | def backtrack( FILE: en/codes/python/chapter_backtracking/subset_sum_i.py function backtrack (line 8) | def backtrack( function subset_sum_i (line 31) | def subset_sum_i(nums: list[int], target: int) -> list[list[int]]: FILE: en/codes/python/chapter_backtracking/subset_sum_i_naive.py function backtrack (line 8) | def backtrack( function subset_sum_i_naive (line 33) | def subset_sum_i_naive(nums: list[int], target: int) -> list[list[int]]: FILE: en/codes/python/chapter_backtracking/subset_sum_ii.py function backtrack (line 8) | def backtrack( function subset_sum_ii (line 35) | def subset_sum_ii(nums: list[int], target: int) -> list[list[int]]: FILE: en/codes/python/chapter_computational_complexity/iteration.py function for_loop (line 8) | def for_loop(n: int) -> int: function while_loop (line 17) | def while_loop(n: int) -> int: function while_loop_ii (line 28) | def while_loop_ii(n: int) -> int: function nested_for_loop (line 41) | def nested_for_loop(n: int) -> str: FILE: en/codes/python/chapter_computational_complexity/recursion.py function recur (line 8) | def recur(n: int) -> int: function for_loop_recur (line 19) | def for_loop_recur(n: int) -> int: function tail_recur (line 36) | def tail_recur(n, res): function fib (line 45) | def fib(n: int) -> int: FILE: en/codes/python/chapter_computational_complexity/space_complexity.py function function (line 14) | def function() -> int: function constant (line 20) | def constant(n: int): function linear (line 34) | def linear(n: int): function linear_recur (line 44) | def linear_recur(n: int): function quadratic (line 52) | def quadratic(n: int): function quadratic_recur (line 58) | def quadratic_recur(n: int) -> int: function build_tree (line 67) | def build_tree(n: int) -> TreeNode | None: FILE: en/codes/python/chapter_computational_complexity/time_complexity.py function constant (line 8) | def constant(n: int) -> int: function linear (line 17) | def linear(n: int) -> int: function array_traversal (line 25) | def array_traversal(nums: list[int]) -> int: function quadratic (line 34) | def quadratic(n: int) -> int: function bubble_sort (line 44) | def bubble_sort(nums: list[int]) -> int: function exponential (line 60) | def exponential(n: int) -> int: function exp_recur (line 73) | def exp_recur(n: int) -> int: function logarithmic (line 80) | def logarithmic(n: int) -> int: function log_recur (line 89) | def log_recur(n: int) -> int: function linear_log_recur (line 96) | def linear_log_recur(n: int) -> int: function factorial_recur (line 108) | def factorial_recur(n: int) -> int: FILE: en/codes/python/chapter_computational_complexity/worst_best_time_complexity.py function random_numbers (line 10) | def random_numbers(n: int) -> list[int]: function find_one (line 19) | def find_one(nums: list[int]) -> int: FILE: en/codes/python/chapter_divide_and_conquer/binary_search_recur.py function dfs (line 8) | def dfs(nums: list[int], target: int, i: int, j: int) -> int: function binary_search (line 26) | def binary_search(nums: list[int], target: int) -> int: FILE: en/codes/python/chapter_divide_and_conquer/build_tree.py function dfs (line 14) | def dfs( function build_tree (line 37) | def build_tree(preorder: list[int], inorder: list[int]) -> TreeNode | None: FILE: en/codes/python/chapter_divide_and_conquer/hanota.py function move (line 8) | def move(src: list[int], tar: list[int]): function dfs (line 16) | def dfs(i: int, src: list[int], buf: list[int], tar: list[int]): function solve_hanota (line 30) | def solve_hanota(A: list[int], B: list[int], C: list[int]): FILE: en/codes/python/chapter_dynamic_programming/climbing_stairs_backtrack.py function backtrack (line 8) | def backtrack(choices: list[int], state: int, n: int, res: list[int]) ->... function climbing_stairs_backtrack (line 23) | def climbing_stairs_backtrack(n: int) -> int: FILE: en/codes/python/chapter_dynamic_programming/climbing_stairs_constraint_dp.py function climbing_stairs_constraint_dp (line 8) | def climbing_stairs_constraint_dp(n: int) -> int: FILE: en/codes/python/chapter_dynamic_programming/climbing_stairs_dfs.py function dfs (line 8) | def dfs(i: int) -> int: function climbing_stairs_dfs (line 18) | def climbing_stairs_dfs(n: int) -> int: FILE: en/codes/python/chapter_dynamic_programming/climbing_stairs_dfs_mem.py function dfs (line 8) | def dfs(i: int, mem: list[int]) -> int: function climbing_stairs_dfs_mem (line 23) | def climbing_stairs_dfs_mem(n: int) -> int: FILE: en/codes/python/chapter_dynamic_programming/climbing_stairs_dp.py function climbing_stairs_dp (line 8) | def climbing_stairs_dp(n: int) -> int: function climbing_stairs_dp_comp (line 22) | def climbing_stairs_dp_comp(n: int) -> int: FILE: en/codes/python/chapter_dynamic_programming/coin_change.py function coin_change_dp (line 8) | def coin_change_dp(coins: list[int], amt: int) -> int: function coin_change_dp_comp (line 29) | def coin_change_dp_comp(coins: list[int], amt: int) -> int: FILE: en/codes/python/chapter_dynamic_programming/coin_change_ii.py function coin_change_ii_dp (line 8) | def coin_change_ii_dp(coins: list[int], amt: int) -> int: function coin_change_ii_dp_comp (line 28) | def coin_change_ii_dp_comp(coins: list[int], amt: int) -> int: FILE: en/codes/python/chapter_dynamic_programming/edit_distance.py function edit_distance_dfs (line 8) | def edit_distance_dfs(s: str, t: str, i: int, j: int) -> int: function edit_distance_dfs_mem (line 30) | def edit_distance_dfs_mem(s: str, t: str, mem: list[list[int]], i: int, ... function edit_distance_dp (line 56) | def edit_distance_dp(s: str, t: str) -> int: function edit_distance_dp_comp (line 77) | def edit_distance_dp_comp(s: str, t: str) -> int: FILE: en/codes/python/chapter_dynamic_programming/knapsack.py function knapsack_dfs (line 8) | def knapsack_dfs(wgt: list[int], val: list[int], i: int, c: int) -> int: function knapsack_dfs_mem (line 23) | def knapsack_dfs_mem( function knapsack_dp (line 44) | def knapsack_dp(wgt: list[int], val: list[int], cap: int) -> int: function knapsack_dp_comp (line 61) | def knapsack_dp_comp(wgt: list[int], val: list[int], cap: int) -> int: FILE: en/codes/python/chapter_dynamic_programming/min_cost_climbing_stairs_dp.py function min_cost_climbing_stairs_dp (line 8) | def min_cost_climbing_stairs_dp(cost: list[int]) -> int: function min_cost_climbing_stairs_dp_comp (line 23) | def min_cost_climbing_stairs_dp_comp(cost: list[int]) -> int: FILE: en/codes/python/chapter_dynamic_programming/min_path_sum.py function min_path_sum_dfs (line 10) | def min_path_sum_dfs(grid: list[list[int]], i: int, j: int) -> int: function min_path_sum_dfs_mem (line 25) | def min_path_sum_dfs_mem( function min_path_sum_dp (line 46) | def min_path_sum_dp(grid: list[list[int]]) -> int: function min_path_sum_dp_comp (line 65) | def min_path_sum_dp_comp(grid: list[list[int]]) -> int: FILE: en/codes/python/chapter_dynamic_programming/unbounded_knapsack.py function unbounded_knapsack_dp (line 8) | def unbounded_knapsack_dp(wgt: list[int], val: list[int], cap: int) -> int: function unbounded_knapsack_dp_comp (line 25) | def unbounded_knapsack_dp_comp(wgt: list[int], val: list[int], cap: int)... FILE: en/codes/python/chapter_graph/graph_adjacency_list.py class GraphAdjList (line 14) | class GraphAdjList: method __init__ (line 17) | def __init__(self, edges: list[list[Vertex]]): method size (line 27) | def size(self) -> int: method add_edge (line 31) | def add_edge(self, vet1: Vertex, vet2: Vertex): method remove_edge (line 39) | def remove_edge(self, vet1: Vertex, vet2: Vertex): method add_vertex (line 47) | def add_vertex(self, vet: Vertex): method remove_vertex (line 54) | def remove_vertex(self, vet: Vertex): method print (line 65) | def print(self): FILE: en/codes/python/chapter_graph/graph_adjacency_matrix.py class GraphAdjMat (line 14) | class GraphAdjMat: method __init__ (line 17) | def __init__(self, vertices: list[int], edges: list[list[int]]): method size (line 31) | def size(self) -> int: method add_vertex (line 35) | def add_vertex(self, val: int): method remove_vertex (line 47) | def remove_vertex(self, index: int): method add_edge (line 59) | def add_edge(self, i: int, j: int): method remove_edge (line 69) | def remove_edge(self, i: int, j: int): method print (line 78) | def print(self): FILE: en/codes/python/chapter_graph/graph_bfs.py function graph_bfs (line 16) | def graph_bfs(graph: GraphAdjList, start_vet: Vertex) -> list[Vertex]: FILE: en/codes/python/chapter_graph/graph_dfs.py function dfs (line 15) | def dfs(graph: GraphAdjList, visited: set[Vertex], res: list[Vertex], ve... function graph_dfs (line 27) | def graph_dfs(graph: GraphAdjList, start_vet: Vertex) -> list[Vertex]: FILE: en/codes/python/chapter_greedy/coin_change_greedy.py function coin_change_greedy (line 8) | def coin_change_greedy(coins: list[int], amt: int) -> int: FILE: en/codes/python/chapter_greedy/fractional_knapsack.py class Item (line 8) | class Item: method __init__ (line 11) | def __init__(self, w: int, v: int): function fractional_knapsack (line 16) | def fractional_knapsack(wgt: list[int], val: list[int], cap: int) -> int: FILE: en/codes/python/chapter_greedy/max_capacity.py function max_capacity (line 8) | def max_capacity(ht: list[int]) -> int: FILE: en/codes/python/chapter_greedy/max_product_cutting.py function max_product_cutting (line 10) | def max_product_cutting(n: int) -> int: FILE: en/codes/python/chapter_hashing/array_hash_map.py class Pair (line 8) | class Pair: method __init__ (line 11) | def __init__(self, key: int, val: str): class ArrayHashMap (line 16) | class ArrayHashMap: method __init__ (line 19) | def __init__(self): method hash_func (line 24) | def hash_func(self, key: int) -> int: method get (line 29) | def get(self, key: int) -> str | None: method put (line 37) | def put(self, key: int, val: str): method remove (line 43) | def remove(self, key: int): method entry_set (line 49) | def entry_set(self) -> list[Pair]: method key_set (line 57) | def key_set(self) -> list[int]: method value_set (line 65) | def value_set(self) -> list[str]: method print (line 73) | def print(self): FILE: en/codes/python/chapter_hashing/hash_map_chaining.py class HashMapChaining (line 14) | class HashMapChaining: method __init__ (line 17) | def __init__(self): method hash_func (line 25) | def hash_func(self, key: int) -> int: method load_factor (line 29) | def load_factor(self) -> float: method get (line 33) | def get(self, key: int) -> str | None: method put (line 44) | def put(self, key: int, val: str): method remove (line 61) | def remove(self, key: int): method extend (line 72) | def extend(self): method print (line 85) | def print(self): FILE: en/codes/python/chapter_hashing/hash_map_open_addressing.py class HashMapOpenAddressing (line 14) | class HashMapOpenAddressing: method __init__ (line 17) | def __init__(self): method hash_func (line 26) | def hash_func(self, key: int) -> int: method load_factor (line 30) | def load_factor(self) -> float: method find_bucket (line 34) | def find_bucket(self, key: int) -> int: method get (line 56) | def get(self, key: int) -> str: method put (line 66) | def put(self, key: int, val: str): method remove (line 81) | def remove(self, key: int): method extend (line 90) | def extend(self): method print (line 103) | def print(self): FILE: en/codes/python/chapter_hashing/simple_hash.py function add_hash (line 8) | def add_hash(key: str) -> int: function mul_hash (line 17) | def mul_hash(key: str) -> int: function xor_hash (line 26) | def xor_hash(key: str) -> int: function rot_hash (line 35) | def rot_hash(key: str) -> int: FILE: en/codes/python/chapter_heap/heap.py function test_push (line 16) | def test_push(heap: list, val: int, flag: int = 1): function test_pop (line 22) | def test_pop(heap: list, flag: int = 1): FILE: en/codes/python/chapter_heap/my_heap.py class MaxHeap (line 14) | class MaxHeap: method __init__ (line 17) | def __init__(self, nums: list[int]): method left (line 25) | def left(self, i: int) -> int: method right (line 29) | def right(self, i: int) -> int: method parent (line 33) | def parent(self, i: int) -> int: method swap (line 37) | def swap(self, i: int, j: int): method size (line 41) | def size(self) -> int: method is_empty (line 45) | def is_empty(self) -> bool: method peek (line 49) | def peek(self) -> int: method push (line 53) | def push(self, val: int): method sift_up (line 60) | def sift_up(self, i: int): method pop (line 73) | def pop(self) -> int: method sift_down (line 87) | def sift_down(self, i: int): method print (line 104) | def print(self): FILE: en/codes/python/chapter_heap/top_k.py function top_k_heap (line 16) | def top_k_heap(nums: list[int], k: int) -> list[int]: FILE: en/codes/python/chapter_searching/binary_search.py function binary_search (line 8) | def binary_search(nums: list[int], target: int) -> int: function binary_search_lcro (line 25) | def binary_search_lcro(nums: list[int], target: int) -> int: FILE: en/codes/python/chapter_searching/binary_search_edge.py function binary_search_left_edge (line 14) | def binary_search_left_edge(nums: list[int], target: int) -> int: function binary_search_right_edge (line 25) | def binary_search_right_edge(nums: list[int], target: int) -> int: FILE: en/codes/python/chapter_searching/binary_search_insertion.py function binary_search_insertion_simple (line 8) | def binary_search_insertion_simple(nums: list[int], target: int) -> int: function binary_search_insertion (line 23) | def binary_search_insertion(nums: list[int], target: int) -> int: FILE: en/codes/python/chapter_searching/hashing_search.py function hashing_search_array (line 14) | def hashing_search_array(hmap: dict[int, int], target: int) -> int: function hashing_search_linkedlist (line 21) | def hashing_search_linkedlist( FILE: en/codes/python/chapter_searching/linear_search.py function linear_search_array (line 14) | def linear_search_array(nums: list[int], target: int) -> int: function linear_search_linkedlist (line 23) | def linear_search_linkedlist(head: ListNode, target: int) -> ListNode | ... FILE: en/codes/python/chapter_searching/two_sum.py function two_sum_brute_force (line 8) | def two_sum_brute_force(nums: list[int], target: int) -> list[int]: function two_sum_hash_table (line 18) | def two_sum_hash_table(nums: list[int], target: int) -> list[int]: FILE: en/codes/python/chapter_sorting/bubble_sort.py function bubble_sort (line 8) | def bubble_sort(nums: list[int]): function bubble_sort_with_flag (line 20) | def bubble_sort_with_flag(nums: list[int]): FILE: en/codes/python/chapter_sorting/bucket_sort.py function bucket_sort (line 8) | def bucket_sort(nums: list[float]): FILE: en/codes/python/chapter_sorting/counting_sort.py function counting_sort_naive (line 8) | def counting_sort_naive(nums: list[int]): function counting_sort (line 28) | def counting_sort(nums: list[int]): FILE: en/codes/python/chapter_sorting/heap_sort.py function sift_down (line 8) | def sift_down(nums: list[int], n: int, i: int): function heap_sort (line 28) | def heap_sort(nums: list[int]): FILE: en/codes/python/chapter_sorting/insertion_sort.py function insertion_sort (line 8) | def insertion_sort(nums: list[int]): FILE: en/codes/python/chapter_sorting/merge_sort.py function merge (line 8) | def merge(nums: list[int], left: int, mid: int, right: int): function merge_sort (line 38) | def merge_sort(nums: list[int], left: int, right: int): FILE: en/codes/python/chapter_sorting/quick_sort.py class QuickSort (line 8) | class QuickSort: method partition (line 11) | def partition(self, nums: list[int], left: int, right: int) -> int: method quick_sort (line 26) | def quick_sort(self, nums: list[int], left: int, right: int): class QuickSortMedian (line 38) | class QuickSortMedian: method median_three (line 41) | def median_three(self, nums: list[int], left: int, mid: int, right: in... method partition (line 50) | def partition(self, nums: list[int], left: int, right: int) -> int: method quick_sort (line 69) | def quick_sort(self, nums: list[int], left: int, right: int): class QuickSortTailCall (line 81) | class QuickSortTailCall: method partition (line 84) | def partition(self, nums: list[int], left: int, right: int) -> int: method quick_sort (line 99) | def quick_sort(self, nums: list[int], left: int, right: int): FILE: en/codes/python/chapter_sorting/radix_sort.py function digit (line 8) | def digit(num: int, exp: int) -> int: function counting_sort_digit (line 14) | def counting_sort_digit(nums: list[int], exp: int): function radix_sort (line 38) | def radix_sort(nums: list[int]): FILE: en/codes/python/chapter_sorting/selection_sort.py function selection_sort (line 8) | def selection_sort(nums: list[int]): FILE: en/codes/python/chapter_stack_and_queue/array_deque.py class ArrayDeque (line 8) | class ArrayDeque: method __init__ (line 11) | def __init__(self, capacity: int): method capacity (line 17) | def capacity(self) -> int: method size (line 21) | def size(self) -> int: method is_empty (line 25) | def is_empty(self) -> bool: method index (line 29) | def index(self, i: int) -> int: method push_first (line 36) | def push_first(self, num: int): method push_last (line 48) | def push_last(self, num: int): method pop_first (line 59) | def pop_first(self) -> int: method pop_last (line 67) | def pop_last(self) -> int: method peek_first (line 73) | def peek_first(self) -> int: method peek_last (line 79) | def peek_last(self) -> int: method to_array (line 87) | def to_array(self) -> list[int]: FILE: en/codes/python/chapter_stack_and_queue/array_queue.py class ArrayQueue (line 8) | class ArrayQueue: method __init__ (line 11) | def __init__(self, size: int): method capacity (line 17) | def capacity(self) -> int: method size (line 21) | def size(self) -> int: method is_empty (line 25) | def is_empty(self) -> bool: method push (line 29) | def push(self, num: int): method pop (line 40) | def pop(self) -> int: method peek (line 48) | def peek(self) -> int: method to_list (line 54) | def to_list(self) -> list[int]: FILE: en/codes/python/chapter_stack_and_queue/array_stack.py class ArrayStack (line 8) | class ArrayStack: method __init__ (line 11) | def __init__(self): method size (line 15) | def size(self) -> int: method is_empty (line 19) | def is_empty(self) -> bool: method push (line 23) | def push(self, item: int): method pop (line 27) | def pop(self) -> int: method peek (line 33) | def peek(self) -> int: method to_list (line 39) | def to_list(self) -> list[int]: FILE: en/codes/python/chapter_stack_and_queue/linkedlist_deque.py class ListNode (line 8) | class ListNode: method __init__ (line 11) | def __init__(self, val: int): class LinkedListDeque (line 18) | class LinkedListDeque: method __init__ (line 21) | def __init__(self): method size (line 27) | def size(self) -> int: method is_empty (line 31) | def is_empty(self) -> bool: method push (line 35) | def push(self, num: int, is_front: bool): method push_first (line 55) | def push_first(self, num: int): method push_last (line 59) | def push_last(self, num: int): method pop (line 63) | def pop(self, is_front: bool) -> int: method pop_first (line 88) | def pop_first(self) -> int: method pop_last (line 92) | def pop_last(self) -> int: method peek_first (line 96) | def peek_first(self) -> int: method peek_last (line 102) | def peek_last(self) -> int: method to_array (line 108) | def to_array(self) -> list[int]: FILE: en/codes/python/chapter_stack_and_queue/linkedlist_queue.py class LinkedListQueue (line 14) | class LinkedListQueue: method __init__ (line 17) | def __init__(self): method size (line 23) | def size(self) -> int: method is_empty (line 27) | def is_empty(self) -> bool: method push (line 31) | def push(self, num: int): method pop (line 45) | def pop(self) -> int: method peek (line 53) | def peek(self) -> int: method to_list (line 59) | def to_list(self) -> list[int]: FILE: en/codes/python/chapter_stack_and_queue/linkedlist_stack.py class LinkedListStack (line 14) | class LinkedListStack: method __init__ (line 17) | def __init__(self): method size (line 22) | def size(self) -> int: method is_empty (line 26) | def is_empty(self) -> bool: method push (line 30) | def push(self, val: int): method pop (line 37) | def pop(self) -> int: method peek (line 44) | def peek(self) -> int: method to_list (line 50) | def to_list(self) -> list[int]: FILE: en/codes/python/chapter_tree/array_binary_tree.py class ArrayBinaryTree (line 14) | class ArrayBinaryTree: method __init__ (line 17) | def __init__(self, arr: list[int | None]): method size (line 21) | def size(self): method val (line 25) | def val(self, i: int) -> int | None: method left (line 32) | def left(self, i: int) -> int | None: method right (line 36) | def right(self, i: int) -> int | None: method parent (line 40) | def parent(self, i: int) -> int | None: method level_order (line 44) | def level_order(self) -> list[int]: method dfs (line 53) | def dfs(self, i: int, order: str): method pre_order (line 69) | def pre_order(self) -> list[int]: method in_order (line 75) | def in_order(self) -> list[int]: method post_order (line 81) | def post_order(self) -> list[int]: FILE: en/codes/python/chapter_tree/avl_tree.py class AVLTree (line 14) | class AVLTree: method __init__ (line 17) | def __init__(self): method get_root (line 21) | def get_root(self) -> TreeNode | None: method height (line 25) | def height(self, node: TreeNode | None) -> int: method update_height (line 32) | def update_height(self, node: TreeNode | None): method balance_factor (line 37) | def balance_factor(self, node: TreeNode | None) -> int: method right_rotate (line 45) | def right_rotate(self, node: TreeNode | None) -> TreeNode | None: method left_rotate (line 58) | def left_rotate(self, node: TreeNode | None) -> TreeNode | None: method rotate (line 71) | def rotate(self, node: TreeNode | None) -> TreeNode | None: method insert (line 96) | def insert(self, val): method insert_helper (line 100) | def insert_helper(self, node: TreeNode | None, val: int) -> TreeNode: method remove (line 117) | def remove(self, val: int): method remove_helper (line 121) | def remove_helper(self, node: TreeNode | None, val: int) -> TreeNode |... method search (line 151) | def search(self, val: int) -> TreeNode | None: function test_insert (line 172) | def test_insert(tree: AVLTree, val: int): function test_remove (line 177) | def test_remove(tree: AVLTree, val: int): FILE: en/codes/python/chapter_tree/binary_search_tree.py class BinarySearchTree (line 14) | class BinarySearchTree: method __init__ (line 17) | def __init__(self): method get_root (line 22) | def get_root(self) -> TreeNode | None: method search (line 26) | def search(self, num: int) -> TreeNode | None: method insert (line 42) | def insert(self, num: int): method remove (line 68) | def remove(self, num: int): FILE: en/codes/python/chapter_tree/binary_tree_bfs.py function level_order (line 15) | def level_order(root: TreeNode | None) -> list[int]: FILE: en/codes/python/chapter_tree/binary_tree_dfs.py function pre_order (line 14) | def pre_order(root: TreeNode | None): function in_order (line 24) | def in_order(root: TreeNode | None): function post_order (line 34) | def post_order(root: TreeNode | None): FILE: en/codes/python/modules/list_node.py class ListNode (line 8) | class ListNode: method __init__ (line 11) | def __init__(self, val: int): function list_to_linked_list (line 16) | def list_to_linked_list(arr: list[int]) -> ListNode | None: function linked_list_to_list (line 26) | def linked_list_to_list(head: ListNode | None) -> list[int]: FILE: en/codes/python/modules/print_util.py function print_matrix (line 11) | def print_matrix(mat: list[list[int]]): function print_linked_list (line 19) | def print_linked_list(head: ListNode | None): class Trunk (line 25) | class Trunk: method __init__ (line 26) | def __init__(self, prev, string: str | None = None): function show_trunks (line 31) | def show_trunks(p: Trunk | None): function print_tree (line 38) | def print_tree( function print_dict (line 70) | def print_dict(hmap: dict): function print_heap (line 76) | def print_heap(heap: list[int]): FILE: en/codes/python/modules/tree_node.py class TreeNode (line 10) | class TreeNode: method __init__ (line 13) | def __init__(self, val: int = 0): function list_to_tree_dfs (line 36) | def list_to_tree_dfs(arr: list[int], i: int) -> TreeNode | None: function list_to_tree (line 49) | def list_to_tree(arr: list[int]) -> TreeNode | None: function tree_to_list_dfs (line 54) | def tree_to_list_dfs(root: TreeNode, i: int, res: list[int]) -> list[int]: function tree_to_list (line 65) | def tree_to_list(root: TreeNode | None) -> list[int]: FILE: en/codes/python/modules/vertex.py class Vertex (line 6) | class Vertex: method __init__ (line 9) | def __init__(self, val: int): function vals_to_vets (line 13) | def vals_to_vets(vals: list[int]) -> list["Vertex"]: function vets_to_vals (line 18) | def vets_to_vals(vets: list["Vertex"]) -> list[int]: FILE: en/codes/ruby/chapter_array_and_linkedlist/array.rb function random_access (line 8) | def random_access(nums) function extend (line 20) | def extend(nums, enlarge) function insert (line 34) | def insert(nums, num, index) function remove (line 46) | def remove(nums, index) function traverse (line 54) | def traverse(nums) function find (line 69) | def find(nums, target) FILE: en/codes/ruby/chapter_array_and_linkedlist/linked_list.rb function insert (line 12) | def insert(n0, _p) function remove (line 19) | def remove(n0) function access (line 29) | def access(head, index) function find (line 39) | def find(head, target) FILE: en/codes/ruby/chapter_array_and_linkedlist/my_list.rb class MyList (line 8) | class MyList method initialize (line 13) | def initialize method get (line 21) | def get(index) method set (line 28) | def set(index, num) method add (line 34) | def add(num) method insert (line 44) | def insert(index, num) method remove (line 61) | def remove(index) method extend_capacity (line 78) | def extend_capacity method to_array (line 86) | def to_array FILE: en/codes/ruby/chapter_backtracking/n_queens.rb function backtrack (line 8) | def backtrack(row, n, state, res, cols, diags1, diags2) function n_queens (line 35) | def n_queens(n) FILE: en/codes/ruby/chapter_backtracking/permutations_i.rb function backtrack (line 8) | def backtrack(state, choices, selected, res) function permutations_i (line 32) | def permutations_i(nums) FILE: en/codes/ruby/chapter_backtracking/permutations_ii.rb function backtrack (line 8) | def backtrack(state, choices, selected, res) function permutations_ii (line 34) | def permutations_ii(nums) FILE: en/codes/ruby/chapter_backtracking/preorder_traversal_i_compact.rb function pre_order (line 11) | def pre_order(root) FILE: en/codes/ruby/chapter_backtracking/preorder_traversal_ii_compact.rb function pre_order (line 11) | def pre_order(root) FILE: en/codes/ruby/chapter_backtracking/preorder_traversal_iii_compact.rb function pre_order (line 11) | def pre_order(root) FILE: en/codes/ruby/chapter_backtracking/preorder_traversal_iii_template.rb function is_solution? (line 11) | def is_solution?(state) function record_solution (line 16) | def record_solution(state, res) function is_valid? (line 21) | def is_valid?(state, choice) function make_choice (line 26) | def make_choice(state, choice) function undo_choice (line 31) | def undo_choice(state, choice) function backtrack (line 36) | def backtrack(state, choices, res) FILE: en/codes/ruby/chapter_backtracking/subset_sum_i.rb function backtrack (line 8) | def backtrack(state, target, choices, start, res) function subset_sum_i (line 30) | def subset_sum_i(nums, target) FILE: en/codes/ruby/chapter_backtracking/subset_sum_i_naive.rb function backtrack (line 8) | def backtrack(state, target, total, choices, res) function subset_sum_i_naive (line 29) | def subset_sum_i_naive(nums, target) FILE: en/codes/ruby/chapter_backtracking/subset_sum_ii.rb function backtrack (line 8) | def backtrack(state, target, choices, start, res) function subset_sum_ii (line 34) | def subset_sum_ii(nums, target) FILE: en/codes/ruby/chapter_computational_complexity/iteration.rb function for_loop (line 8) | def for_loop(n) function while_loop (line 20) | def while_loop(n) function while_loop_ii (line 34) | def while_loop_ii(n) function nested_for_loop (line 50) | def nested_for_loop(n) FILE: en/codes/ruby/chapter_computational_complexity/recursion.rb function recur (line 8) | def recur(n) function for_loop_recur (line 18) | def for_loop_recur(n) function tail_recur (line 38) | def tail_recur(n, res) function fib (line 46) | def fib(n) FILE: en/codes/ruby/chapter_computational_complexity/space_complexity.rb function function (line 12) | def function function constant (line 18) | def constant(n) function linear (line 31) | def linear(n) function linear_recur (line 43) | def linear_recur(n) function quadratic (line 50) | def quadratic(n) function quadratic_recur (line 56) | def quadratic_recur(n) function build_tree (line 65) | def build_tree(n) FILE: en/codes/ruby/chapter_computational_complexity/time_complexity.rb function constant (line 8) | def constant(n) function linear (line 18) | def linear(n) function array_traversal (line 25) | def array_traversal(nums) function quadratic (line 37) | def quadratic(n) function bubble_sort (line 51) | def bubble_sort(nums) function exponential (line 72) | def exponential(n) function exp_recur (line 86) | def exp_recur(n) function logarithmic (line 92) | def logarithmic(n) function log_recur (line 104) | def log_recur(n) function linear_log_recur (line 110) | def linear_log_recur(n) function factorial_recur (line 120) | def factorial_recur(n) FILE: en/codes/ruby/chapter_computational_complexity/worst_best_time_complexity.rb function random_numbers (line 8) | def random_numbers(n) function find_one (line 16) | def find_one(nums) FILE: en/codes/ruby/chapter_divide_and_conquer/binary_search_recur.rb function dfs (line 8) | def dfs(nums, target, i, j) function binary_search (line 28) | def binary_search(nums, target) FILE: en/codes/ruby/chapter_divide_and_conquer/build_tree.rb function dfs (line 11) | def dfs(preorder, inorder_map, i, l, r) function build_tree (line 29) | def build_tree(preorder, inorder) FILE: en/codes/ruby/chapter_divide_and_conquer/hanota.rb function move (line 8) | def move(src, tar) function dfs (line 16) | def dfs(i, src, buf, tar) function solve_hanota (line 32) | def solve_hanota(_A, _B, _C) FILE: en/codes/ruby/chapter_dynamic_programming/climbing_stairs_backtrack.rb function backtrack (line 8) | def backtrack(choices, state, n, res) function climbing_stairs_backtrack (line 23) | def climbing_stairs_backtrack(n) FILE: en/codes/ruby/chapter_dynamic_programming/climbing_stairs_constraint_dp.rb function climbing_stairs_constraint_dp (line 8) | def climbing_stairs_constraint_dp(n) FILE: en/codes/ruby/chapter_dynamic_programming/climbing_stairs_dfs.rb function dfs (line 8) | def dfs(i) function climbing_stairs_dfs (line 16) | def climbing_stairs_dfs(n) FILE: en/codes/ruby/chapter_dynamic_programming/climbing_stairs_dfs_mem.rb function dfs (line 8) | def dfs(i, mem) function climbing_stairs_dfs_mem (line 21) | def climbing_stairs_dfs_mem(n) FILE: en/codes/ruby/chapter_dynamic_programming/climbing_stairs_dp.rb function climbing_stairs_dp (line 8) | def climbing_stairs_dp(n) function climbing_stairs_dp_comp (line 22) | def climbing_stairs_dp_comp(n) FILE: en/codes/ruby/chapter_dynamic_programming/coin_change.rb function coin_change_dp (line 8) | def coin_change_dp(coins, amt) function coin_change_dp_comp (line 31) | def coin_change_dp_comp(coins, amt) FILE: en/codes/ruby/chapter_dynamic_programming/coin_change_ii.rb function coin_change_ii_dp (line 8) | def coin_change_ii_dp(coins, amt) function coin_change_ii_dp_comp (line 30) | def coin_change_ii_dp_comp(coins, amt) FILE: en/codes/ruby/chapter_dynamic_programming/edit_distance.rb function edit_distance_dfs (line 8) | def edit_distance_dfs(s, t, i, j) function edit_distance_dfs_mem (line 25) | def edit_distance_dfs_mem(s, t, mem, i, j) function edit_distance_dp (line 45) | def edit_distance_dp(s, t) function edit_distance_dp_comp (line 67) | def edit_distance_dp_comp(s, t) FILE: en/codes/ruby/chapter_dynamic_programming/knapsack.rb function knapsack_dfs (line 8) | def knapsack_dfs(wgt, val, i, c) function knapsack_dfs_mem (line 21) | def knapsack_dfs_mem(wgt, val, mem, i, c) function knapsack_dp (line 36) | def knapsack_dp(wgt, val, cap) function knapsack_dp_comp (line 56) | def knapsack_dp_comp(wgt, val, cap) FILE: en/codes/ruby/chapter_dynamic_programming/min_cost_climbing_stairs_dp.rb function min_cost_climbing_stairs_dp (line 8) | def min_cost_climbing_stairs_dp(cost) function min_cost_climbing_stairs_dp_comp (line 21) | def min_cost_climbing_stairs_dp_comp(cost) FILE: en/codes/ruby/chapter_dynamic_programming/min_path_sum.rb function min_path_sum_dfs (line 8) | def min_path_sum_dfs(grid, i, j) function min_path_sum_dfs_mem (line 21) | def min_path_sum_dfs_mem(grid, mem, i, j) function min_path_sum_dp (line 36) | def min_path_sum_dp(grid) function min_path_sum_dp_comp (line 55) | def min_path_sum_dp_comp(grid) FILE: en/codes/ruby/chapter_dynamic_programming/unbounded_knapsack.rb function unbounded_knapsack_dp (line 8) | def unbounded_knapsack_dp(wgt, val, cap) function unbounded_knapsack_dp_comp (line 28) | def unbounded_knapsack_dp_comp(wgt, val, cap) FILE: en/codes/ruby/chapter_graph/graph_adjacency_list.rb class GraphAdjList (line 10) | class GraphAdjList method initialize (line 14) | def initialize(edges) method size (line 26) | def size method add_edge (line 31) | def add_edge(vet1, vet2) method remove_edge (line 39) | def remove_edge(vet1, vet2) method add_vertex (line 48) | def add_vertex(vet) method remove_vertex (line 56) | def remove_vertex(vet) method __print__ (line 68) | def __print__ FILE: en/codes/ruby/chapter_graph/graph_adjacency_matrix.rb class GraphAdjMat (line 10) | class GraphAdjMat method initialize (line 11) | def initialize(vertices, edges) method size (line 25) | def size method add_vertex (line 30) | def add_vertex(val) method remove_vertex (line 42) | def remove_vertex(index) method add_edge (line 54) | def add_edge(i, j) method remove_edge (line 66) | def remove_edge(i, j) method __print__ (line 77) | def __print__ FILE: en/codes/ruby/chapter_graph/graph_bfs.rb function graph_bfs (line 12) | def graph_bfs(graph, start_vet) FILE: en/codes/ruby/chapter_graph/graph_dfs.rb function dfs (line 12) | def dfs(graph, visited, res, vet) function graph_dfs (line 24) | def graph_dfs(graph, start_vet) FILE: en/codes/ruby/chapter_greedy/coin_change_greedy.rb function coin_change_greedy (line 8) | def coin_change_greedy(coins, amt) FILE: en/codes/ruby/chapter_greedy/fractional_knapsack.rb class Item (line 8) | class Item method initialize (line 12) | def initialize(w, v) function fractional_knapsack (line 19) | def fractional_knapsack(wgt, val, cap) FILE: en/codes/ruby/chapter_greedy/max_capacity.rb function max_capacity (line 8) | def max_capacity(ht) FILE: en/codes/ruby/chapter_greedy/max_product_cutting.rb function max_product_cutting (line 8) | def max_product_cutting(n) FILE: en/codes/ruby/chapter_hashing/array_hash_map.rb class Pair (line 8) | class Pair method initialize (line 11) | def initialize(key, val) class ArrayHashMap (line 18) | class ArrayHashMap method initialize (line 20) | def initialize method hash_func (line 26) | def hash_func(key) method get (line 31) | def get(key) method put (line 40) | def put(key, val) method remove (line 47) | def remove(key) method entry_set (line 54) | def entry_set method key_set (line 61) | def key_set method value_set (line 68) | def value_set method print (line 75) | def print FILE: en/codes/ruby/chapter_hashing/hash_map_chaining.rb class HashMapChaining (line 10) | class HashMapChaining method initialize (line 12) | def initialize method hash_func (line 21) | def hash_func(key) method load_factor (line 26) | def load_factor method get (line 31) | def get(key) method put (line 43) | def put(key, val) method remove (line 62) | def remove(key) method extend (line 76) | def extend method print (line 92) | def print FILE: en/codes/ruby/chapter_hashing/hash_map_open_addressing.rb class HashMapOpenAddressing (line 10) | class HashMapOpenAddressing method initialize (line 14) | def initialize method hash_func (line 23) | def hash_func(key) method load_factor (line 28) | def load_factor method find_bucket (line 33) | def find_bucket(key) method get (line 58) | def get(key) method put (line 68) | def put(key, val) method remove (line 84) | def remove(key) method extend (line 95) | def extend method print (line 109) | def print FILE: en/codes/ruby/chapter_hashing/simple_hash.rb function add_hash (line 8) | def add_hash(key) function mul_hash (line 18) | def mul_hash(key) function xor_hash (line 28) | def xor_hash(key) function rot_hash (line 38) | def rot_hash(key) FILE: en/codes/ruby/chapter_heap/my_heap.rb class MaxHeap (line 10) | class MaxHeap method initialize (line 14) | def initialize(nums) method left (line 24) | def left(i) method right (line 29) | def right(i) method parent (line 34) | def parent(i) method swap (line 39) | def swap(i, j) method size (line 44) | def size method is_empty? (line 49) | def is_empty? method peek (line 54) | def peek method push (line 59) | def push(val) method sift_up (line 67) | def sift_up(i) method pop (line 81) | def pop method sift_down (line 95) | def sift_down(i) method __print__ (line 113) | def __print__ FILE: en/codes/ruby/chapter_heap/top_k.rb function push_min_heap (line 10) | def push_min_heap(heap, val) function pop_min_heap (line 16) | def pop_min_heap(heap) function peek_min_heap (line 22) | def peek_min_heap(heap) function get_min_heap (line 28) | def get_min_heap(heap) function top_k_heap (line 34) | def top_k_heap(nums, k) FILE: en/codes/ruby/chapter_searching/binary_search.rb function binary_search (line 8) | def binary_search(nums, target) function binary_search_lcro (line 30) | def binary_search_lcro(nums, target) FILE: en/codes/ruby/chapter_searching/binary_search_edge.rb function binary_search_left_edge (line 10) | def binary_search_left_edge(nums, target) function binary_search_right_edge (line 21) | def binary_search_right_edge(nums, target) FILE: en/codes/ruby/chapter_searching/binary_search_insertion.rb function binary_search_insertion_simple (line 8) | def binary_search_insertion_simple(nums, target) function binary_search_insertion (line 29) | def binary_search_insertion(nums, target) FILE: en/codes/ruby/chapter_searching/hashing_search.rb function hashing_search_array (line 10) | def hashing_search_array(hmap, target) function hashing_search_linkedlist (line 17) | def hashing_search_linkedlist(hmap, target) FILE: en/codes/ruby/chapter_searching/linear_search.rb function linear_search_array (line 10) | def linear_search_array(nums, target) function linear_search_linkedlist (line 20) | def linear_search_linkedlist(head, target) FILE: en/codes/ruby/chapter_searching/two_sum.rb function two_sum_brute_force (line 8) | def two_sum_brute_force(nums, target) function two_sum_hash_table (line 20) | def two_sum_hash_table(nums, target) FILE: en/codes/ruby/chapter_sorting/bubble_sort.rb function bubble_sort (line 8) | def bubble_sort(nums) function bubble_sort_with_flag (line 23) | def bubble_sort_with_flag(nums) FILE: en/codes/ruby/chapter_sorting/bucket_sort.rb function bucket_sort (line 8) | def bucket_sort(nums) FILE: en/codes/ruby/chapter_sorting/counting_sort.rb function counting_sort_naive (line 8) | def counting_sort_naive(nums) function counting_sort (line 28) | def counting_sort(nums) FILE: en/codes/ruby/chapter_sorting/heap_sort.rb function sift_down (line 8) | def sift_down(nums, n, i) function heap_sort (line 26) | def heap_sort(nums) FILE: en/codes/ruby/chapter_sorting/insertion_sort.rb function insertion_sort (line 8) | def insertion_sort(nums) FILE: en/codes/ruby/chapter_sorting/merge_sort.rb function merge (line 8) | def merge(nums, left, mid, right) function merge_sort (line 43) | def merge_sort(nums, left, right) FILE: en/codes/ruby/chapter_sorting/quick_sort.rb class QuickSort (line 8) | class QuickSort method partition (line 11) | def partition(nums, left, right) method quick_sort (line 30) | def quick_sort(nums, left, right) class QuickSortMedian (line 45) | class QuickSortMedian method median_three (line 48) | def median_three(nums, left, mid, right) method partition (line 59) | def partition(nums, left, right) method quick_sort (line 81) | def quick_sort(nums, left, right) class QuickSortTailCall (line 96) | class QuickSortTailCall method partition (line 99) | def partition(nums, left, right) method quick_sort (line 119) | def quick_sort(nums, left, right) FILE: en/codes/ruby/chapter_sorting/radix_sort.rb function digit (line 8) | def digit(num, exp) function counting_sort_digit (line 14) | def counting_sort_digit(nums, exp) function radix_sort (line 38) | def radix_sort(nums) FILE: en/codes/ruby/chapter_sorting/selection_sort.rb function selection_sort (line 8) | def selection_sort(nums) FILE: en/codes/ruby/chapter_stack_and_queue/array_deque.rb class ArrayDeque (line 8) | class ArrayDeque method initialize (line 13) | def initialize(capacity) method capacity (line 20) | def capacity method is_empty? (line 25) | def is_empty? method push_first (line 30) | def push_first(num) method push_last (line 45) | def push_last(num) method pop_first (line 59) | def pop_first method pop_last (line 68) | def pop_last method peek_first (line 75) | def peek_first method peek_last (line 82) | def peek_last method to_array (line 91) | def to_array method index (line 103) | def index(i) FILE: en/codes/ruby/chapter_stack_and_queue/array_queue.rb class ArrayQueue (line 8) | class ArrayQueue method initialize (line 13) | def initialize(size) method capacity (line 20) | def capacity method is_empty? (line 25) | def is_empty? method push (line 30) | def push(num) method pop (line 42) | def pop method peek (line 51) | def peek method to_array (line 58) | def to_array FILE: en/codes/ruby/chapter_stack_and_queue/array_stack.rb class ArrayStack (line 8) | class ArrayStack method initialize (line 10) | def initialize method size (line 15) | def size method is_empty? (line 20) | def is_empty? method push (line 25) | def push(item) method pop (line 30) | def pop method peek (line 37) | def peek method to_array (line 44) | def to_array FILE: en/codes/ruby/chapter_stack_and_queue/linkedlist_deque.rb class ListNode (line 8) | class ListNode method initialize (line 14) | def initialize(val) class LinkedListDeque (line 20) | class LinkedListDeque method initialize (line 25) | def initialize method is_empty? (line 32) | def is_empty? method push (line 37) | def push(num, is_front) method push_first (line 59) | def push_first(num) method push_last (line 64) | def push_last(num) method pop (line 69) | def pop(is_front) method pop_first (line 99) | def pop_first method pop_last (line 104) | def pop_last method peek_first (line 109) | def peek_first method peek_last (line 116) | def peek_last method to_array (line 123) | def to_array FILE: en/codes/ruby/chapter_stack_and_queue/linkedlist_queue.rb class LinkedListQueue (line 10) | class LinkedListQueue method initialize (line 15) | def initialize method is_empty? (line 22) | def is_empty? method push (line 27) | def push(num) method pop (line 45) | def pop method peek (line 54) | def peek method to_array (line 61) | def to_array FILE: en/codes/ruby/chapter_stack_and_queue/linkedlist_stack.rb class LinkedListStack (line 10) | class LinkedListStack method initialize (line 14) | def initialize method is_empty? (line 19) | def is_empty? method push (line 24) | def push(val) method pop (line 32) | def pop method peek (line 40) | def peek method to_array (line 47) | def to_array FILE: en/codes/ruby/chapter_tree/array_binary_tree.rb class ArrayBinaryTree (line 11) | class ArrayBinaryTree method initialize (line 13) | def initialize(arr) method size (line 18) | def size method val (line 23) | def val(i) method left (line 31) | def left(i) method right (line 36) | def right(i) method parent (line 41) | def parent(i) method level_order (line 46) | def level_order method dfs (line 58) | def dfs(i, order) method pre_order (line 71) | def pre_order method in_order (line 78) | def in_order method post_order (line 85) | def post_order FILE: en/codes/ruby/chapter_tree/avl_tree.rb class AVLTree (line 11) | class AVLTree method initialize (line 13) | def initialize method get_root (line 18) | def get_root method height (line 23) | def height(node) method update_height (line 31) | def update_height(node) method balance_factor (line 37) | def balance_factor(node) method right_rotate (line 46) | def right_rotate(node) method left_rotate (line 60) | def left_rotate(node) method rotate (line 74) | def rotate(node) method insert (line 103) | def insert(val) method insert_helper (line 108) | def insert_helper(node, val) method remove (line 126) | def remove(val) method remove_helper (line 131) | def remove_helper(node, val) method search (line 162) | def search(val) function test_insert (line 184) | def test_insert(tree, val) function test_remove (line 190) | def test_remove(tree, val) FILE: en/codes/ruby/chapter_tree/binary_search_tree.rb class BinarySearchTree (line 11) | class BinarySearchTree method initialize (line 13) | def initialize method get_root (line 19) | def get_root method search (line 24) | def search(num) method insert (line 45) | def insert(num) method remove (line 78) | def remove(num) FILE: en/codes/ruby/chapter_tree/binary_tree_bfs.rb function level_order (line 11) | def level_order(root) FILE: en/codes/ruby/chapter_tree/binary_tree_dfs.rb function pre_order (line 11) | def pre_order(root) function in_order (line 21) | def in_order(root) function post_order (line 31) | def post_order(root) FILE: en/codes/ruby/utils/list_node.rb class ListNode (line 8) | class ListNode method initialize (line 12) | def initialize(val=0, next_node=nil) function arr_to_linked_list (line 19) | def arr_to_linked_list(arr) function linked_list_to_arr (line 31) | def linked_list_to_arr(head) FILE: en/codes/ruby/utils/print_util.rb function print_matrix (line 10) | def print_matrix(mat) function print_linked_list (line 17) | def print_linked_list(head) class Trunk (line 26) | class Trunk method initialize (line 29) | def initialize(prev, str) function show_trunk (line 35) | def show_trunk(p) function print_tree (line 45) | def print_tree(root, prev=nil, is_right=false) function print_hash_map (line 70) | def print_hash_map(hmap) function print_heap (line 75) | def print_heap(heap) FILE: en/codes/ruby/utils/tree_node.rb class TreeNode (line 8) | class TreeNode method initialize (line 14) | def initialize(val=0) function arr_to_tree_dfs (line 21) | def arr_to_tree_dfs(arr, i) function arr_to_tree (line 33) | def arr_to_tree(arr) function tree_to_arr_dfs (line 38) | def tree_to_arr_dfs(root, i, res) function tree_to_arr (line 49) | def tree_to_arr(root) FILE: en/codes/ruby/utils/vertex.rb class Vertex (line 8) | class Vertex method initialize (line 11) | def initialize(val) function vals_to_vets (line 17) | def vals_to_vets(vals) function vets_to_vals (line 22) | def vets_to_vals(vets) FILE: en/codes/rust/chapter_array_and_linkedlist/array.rs function random_access (line 11) | fn random_access(nums: &[i32]) -> i32 { function extend (line 20) | fn extend(nums: &[i32], enlarge: usize) -> Vec { function insert (line 31) | fn insert(nums: &mut [i32], num: i32, index: usize) { function remove (line 41) | fn remove(nums: &mut [i32], index: usize) { function traverse (line 49) | fn traverse(nums: &[i32]) { function find (line 63) | fn find(nums: &[i32], target: i32) -> Option { function main (line 73) | fn main() { FILE: en/codes/rust/chapter_array_and_linkedlist/linked_list.rs function insert (line 13) | pub fn insert(n0: &Rc>>, P: Rc(n0: &Rc>>) { function access (line 31) | pub fn access(head: Rc>>, index: i32) -> Option(head: Rc>>, target: T) -> ... function main (line 67) | fn main() { FILE: en/codes/rust/chapter_array_and_linkedlist/list.rs function main (line 9) | fn main() { FILE: en/codes/rust/chapter_array_and_linkedlist/my_list.rs type MyList (line 11) | struct MyList { method new (line 21) | pub fn new(capacity: usize) -> Self { method size (line 32) | pub fn size(&self) -> usize { method capacity (line 37) | pub fn capacity(&self) -> usize { method get (line 42) | pub fn get(&self, index: usize) -> i32 { method set (line 51) | pub fn set(&mut self, index: usize, num: i32) { method add (line 59) | pub fn add(&mut self, num: i32) { method insert (line 70) | pub fn insert(&mut self, index: usize, num: i32) { method remove (line 88) | pub fn remove(&mut self, index: usize) -> i32 { method extend_capacity (line 104) | pub fn extend_capacity(&mut self) { method to_array (line 113) | pub fn to_array(&self) -> Vec { function main (line 124) | fn main() { FILE: en/codes/rust/chapter_backtracking/n_queens.rs function backtrack (line 8) | fn backtrack( function n_queens (line 42) | fn n_queens(n: usize) -> Vec>> { function main (line 64) | pub fn main() { FILE: en/codes/rust/chapter_backtracking/permutations_i.rs function backtrack (line 8) | fn backtrack(mut state: Vec, choices: &[i32], selected: &mut [bool]... function permutations_i (line 32) | fn permutations_i(nums: &mut [i32]) -> Vec> { function main (line 39) | pub fn main() { FILE: en/codes/rust/chapter_backtracking/permutations_ii.rs function backtrack (line 10) | fn backtrack(mut state: Vec, choices: &[i32], selected: &mut [bool]... function permutations_ii (line 36) | fn permutations_ii(nums: &mut [i32]) -> Vec> { function main (line 43) | pub fn main() { FILE: en/codes/rust/chapter_backtracking/preorder_traversal_i_compact.rs function pre_order (line 11) | fn pre_order(res: &mut Vec>>, root: Option<&Rc>>) -> bool { function record_solution (line 16) | fn record_solution( function is_valid (line 24) | fn is_valid(_: &mut Vec>>, choice: Option<&Rc>>, choice: Rc>>, _: Rc Vec> { function main (line 48) | pub fn main() { FILE: en/codes/rust/chapter_backtracking/subset_sum_i_naive.rs function backtrack (line 8) | fn backtrack( function subset_sum_i_naive (line 36) | fn subset_sum_i_naive(nums: &[i32], target: i32) -> Vec> { function main (line 45) | pub fn main() { FILE: en/codes/rust/chapter_backtracking/subset_sum_ii.rs function backtrack (line 8) | fn backtrack( function subset_sum_ii (line 43) | fn subset_sum_ii(nums: &mut [i32], target: i32) -> Vec> { function main (line 53) | pub fn main() { FILE: en/codes/rust/chapter_computational_complexity/iteration.rs function for_loop (line 8) | fn for_loop(n: i32) -> i32 { function while_loop (line 18) | fn while_loop(n: i32) -> i32 { function while_loop_ii (line 31) | fn while_loop_ii(n: i32) -> i32 { function nested_for_loop (line 46) | fn nested_for_loop(n: i32) -> String { function main (line 59) | fn main() { FILE: en/codes/rust/chapter_computational_complexity/recursion.rs function recur (line 8) | fn recur(n: i32) -> i32 { function for_loop_recur (line 20) | fn for_loop_recur(n: i32) -> i32 { function tail_recur (line 39) | fn tail_recur(n: i32, res: i32) -> i32 { function fib (line 49) | fn fib(n: i32) -> i32 { function main (line 61) | fn main() { FILE: en/codes/rust/chapter_computational_complexity/space_complexity.rs function function (line 13) | fn function() -> i32 { function constant (line 20) | fn constant(n: i32) { function linear (line 38) | fn linear(n: i32) { function linear_recur (line 54) | fn linear_recur(n: i32) { function quadratic (line 64) | fn quadratic(n: i32) { function quadratic_recur (line 79) | fn quadratic_recur(n: i32) -> i32 { function build_tree (line 90) | fn build_tree(n: i32) -> Option>> { function main (line 101) | fn main() { FILE: en/codes/rust/chapter_computational_complexity/time_complexity.rs function constant (line 8) | fn constant(n: i32) -> i32 { function linear (line 19) | fn linear(n: i32) -> i32 { function array_traversal (line 28) | fn array_traversal(nums: &[i32]) -> i32 { function quadratic (line 38) | fn quadratic(n: i32) -> i32 { function bubble_sort (line 50) | fn bubble_sort(nums: &mut [i32]) -> i32 { function exponential (line 70) | fn exponential(n: i32) -> i32 { function exp_recur (line 85) | fn exp_recur(n: i32) -> i32 { function logarithmic (line 93) | fn logarithmic(mut n: i32) -> i32 { function log_recur (line 103) | fn log_recur(n: i32) -> i32 { function linear_log_recur (line 111) | fn linear_log_recur(n: i32) -> i32 { function factorial_recur (line 123) | fn factorial_recur(n: i32) -> i32 { function main (line 136) | fn main() { FILE: en/codes/rust/chapter_computational_complexity/worst_best_time_complexity.rs function random_numbers (line 12) | fn random_numbers(n: i32) -> Vec { function find_one (line 21) | fn find_one(nums: &[i32]) -> Option { function main (line 33) | fn main() { FILE: en/codes/rust/chapter_divide_and_conquer/binary_search_recur.rs function dfs (line 8) | fn dfs(nums: &[i32], target: i32, i: i32, j: i32) -> i32 { function binary_search (line 27) | fn binary_search(nums: &[i32], target: i32) -> i32 { function main (line 34) | pub fn main() { FILE: en/codes/rust/chapter_divide_and_conquer/build_tree.rs function dfs (line 12) | fn dfs( function build_tree (line 36) | fn build_tree(preorder: &[i32], inorder: &[i32]) -> Option, tar: &mut Vec) { function dfs (line 18) | fn dfs(i: i32, src: &mut Vec, buf: &mut Vec, tar: &mut Vec, B: &mut Vec, C: &mut Vec) { function main (line 40) | pub fn main() { FILE: en/codes/rust/chapter_dynamic_programming/climbing_stairs_backtrack.rs function backtrack (line 8) | fn backtrack(choices: &[i32], state: i32, n: i32, res: &mut [i32]) { function climbing_stairs_backtrack (line 26) | fn climbing_stairs_backtrack(n: usize) -> i32 { function main (line 36) | pub fn main() { FILE: en/codes/rust/chapter_dynamic_programming/climbing_stairs_constraint_dp.rs function climbing_stairs_constraint_dp (line 8) | fn climbing_stairs_constraint_dp(n: usize) -> i32 { function main (line 28) | pub fn main() { FILE: en/codes/rust/chapter_dynamic_programming/climbing_stairs_dfs.rs function dfs (line 8) | fn dfs(i: usize) -> i32 { function climbing_stairs_dfs (line 19) | fn climbing_stairs_dfs(n: usize) -> i32 { function main (line 24) | pub fn main() { FILE: en/codes/rust/chapter_dynamic_programming/climbing_stairs_dfs_mem.rs function dfs (line 8) | fn dfs(i: usize, mem: &mut [i32]) -> i32 { function climbing_stairs_dfs_mem (line 25) | fn climbing_stairs_dfs_mem(n: usize) -> i32 { function main (line 32) | pub fn main() { FILE: en/codes/rust/chapter_dynamic_programming/climbing_stairs_dp.rs function climbing_stairs_dp (line 8) | fn climbing_stairs_dp(n: usize) -> i32 { function climbing_stairs_dp_comp (line 26) | fn climbing_stairs_dp_comp(n: usize) -> i32 { function main (line 40) | pub fn main() { FILE: en/codes/rust/chapter_dynamic_programming/coin_change.rs function coin_change_dp (line 8) | fn coin_change_dp(coins: &[i32], amt: usize) -> i32 { function coin_change_dp_comp (line 37) | fn coin_change_dp_comp(coins: &[i32], amt: usize) -> i32 { function main (line 64) | pub fn main() { FILE: en/codes/rust/chapter_dynamic_programming/coin_change_ii.rs function coin_change_ii_dp (line 8) | fn coin_change_ii_dp(coins: &[i32], amt: usize) -> i32 { function coin_change_ii_dp_comp (line 32) | fn coin_change_ii_dp_comp(coins: &[i32], amt: usize) -> i32 { function main (line 53) | pub fn main() { FILE: en/codes/rust/chapter_dynamic_programming/edit_distance.rs function edit_distance_dfs (line 8) | fn edit_distance_dfs(s: &str, t: &str, i: usize, j: usize) -> i32 { function edit_distance_dfs_mem (line 34) | fn edit_distance_dfs_mem(s: &str, t: &str, mem: &mut Vec>, i: u... function edit_distance_dp (line 65) | fn edit_distance_dp(s: &str, t: &str) -> i32 { function edit_distance_dp_comp (line 92) | fn edit_distance_dp_comp(s: &str, t: &str) -> i32 { function main (line 121) | pub fn main() { FILE: en/codes/rust/chapter_dynamic_programming/knapsack.rs function knapsack_dfs (line 8) | fn knapsack_dfs(wgt: &[i32], val: &[i32], i: usize, c: usize) -> i32 { function knapsack_dfs_mem (line 25) | fn knapsack_dfs_mem(wgt: &[i32], val: &[i32], mem: &mut Vec>, i... function knapsack_dp (line 47) | fn knapsack_dp(wgt: &[i32], val: &[i32], cap: usize) -> i32 { function knapsack_dp_comp (line 70) | fn knapsack_dp_comp(wgt: &[i32], val: &[i32], cap: usize) -> i32 { function main (line 88) | pub fn main() { FILE: en/codes/rust/chapter_dynamic_programming/min_cost_climbing_stairs_dp.rs function min_cost_climbing_stairs_dp (line 10) | fn min_cost_climbing_stairs_dp(cost: &[i32]) -> i32 { function min_cost_climbing_stairs_dp_comp (line 28) | fn min_cost_climbing_stairs_dp_comp(cost: &[i32]) -> i32 { function main (line 43) | pub fn main() { FILE: en/codes/rust/chapter_dynamic_programming/min_path_sum.rs function min_path_sum_dfs (line 8) | fn min_path_sum_dfs(grid: &Vec>, i: i32, j: i32) -> i32 { function min_path_sum_dfs_mem (line 25) | fn min_path_sum_dfs_mem(grid: &Vec>, mem: &mut Vec>, i... function min_path_sum_dp (line 47) | fn min_path_sum_dp(grid: &Vec>) -> i32 { function min_path_sum_dp_comp (line 70) | fn min_path_sum_dp_comp(grid: &Vec>) -> i32 { function main (line 92) | pub fn main() { FILE: en/codes/rust/chapter_dynamic_programming/unbounded_knapsack.rs function unbounded_knapsack_dp (line 8) | fn unbounded_knapsack_dp(wgt: &[i32], val: &[i32], cap: usize) -> i32 { function unbounded_knapsack_dp_comp (line 28) | fn unbounded_knapsack_dp_comp(wgt: &[i32], val: &[i32], cap: usize) -> i... function main (line 48) | pub fn main() { FILE: en/codes/rust/chapter_graph/graph_adjacency_list.rs type GraphAdjList (line 12) | pub struct GraphAdjList { method new (line 19) | pub fn new(edges: Vec<[Vertex; 2]>) -> Self { method size (line 35) | pub fn size(&self) -> usize { method add_edge (line 40) | pub fn add_edge(&mut self, vet1: Vertex, vet2: Vertex) { method remove_edge (line 51) | pub fn remove_edge(&mut self, vet1: Vertex, vet2: Vertex) { method add_vertex (line 65) | pub fn add_vertex(&mut self, vet: Vertex) { method remove_vertex (line 75) | pub fn remove_vertex(&mut self, vet: Vertex) { method print (line 85) | pub fn print(&self) { function main (line 96) | fn main() { FILE: en/codes/rust/chapter_graph/graph_adjacency_matrix.rs type GraphAdjMat (line 8) | pub struct GraphAdjMat { method new (line 17) | pub fn new(vertices: Vec, edges: Vec<[usize; 2]>) -> Self { method size (line 36) | pub fn size(&self) -> usize { method add_vertex (line 41) | pub fn add_vertex(&mut self, val: i32) { method remove_vertex (line 54) | pub fn remove_vertex(&mut self, index: usize) { method add_edge (line 69) | pub fn add_edge(&mut self, i: usize, j: usize) { method remove_edge (line 82) | pub fn remove_edge(&mut self, i: usize, j: usize) { method print (line 93) | pub fn print(&self) { function main (line 105) | fn main() { FILE: en/codes/rust/chapter_graph/graph_bfs.rs function graph_bfs (line 15) | fn graph_bfs(graph: GraphAdjList, start_vet: Vertex) -> Vec { function main (line 44) | fn main() { FILE: en/codes/rust/chapter_graph/graph_dfs.rs function dfs (line 14) | fn dfs(graph: &GraphAdjList, visited: &mut HashSet, res: &mut Ve... function graph_dfs (line 31) | fn graph_dfs(graph: GraphAdjList, start_vet: Vertex) -> Vec { function main (line 42) | fn main() { FILE: en/codes/rust/chapter_greedy/coin_change_greedy.rs function coin_change_greedy (line 8) | fn coin_change_greedy(coins: &[i32], mut amt: i32) -> i32 { function main (line 31) | fn main() { FILE: en/codes/rust/chapter_greedy/fractional_knapsack.rs type Item (line 8) | struct Item { method new (line 14) | fn new(w: i32, v: i32) -> Self { function fractional_knapsack (line 20) | fn fractional_knapsack(wgt: &[i32], val: &[i32], mut cap: i32) -> f64 { function main (line 51) | fn main() { FILE: en/codes/rust/chapter_greedy/max_capacity.rs function max_capacity (line 8) | fn max_capacity(ht: &[i32]) -> i32 { function main (line 30) | fn main() { FILE: en/codes/rust/chapter_greedy/max_product_cutting.rs function max_product_cutting (line 8) | fn max_product_cutting(n: i32) -> i32 { function main (line 29) | fn main() { FILE: en/codes/rust/chapter_hashing/array_hash_map.rs type Pair (line 9) | pub struct Pair { type ArrayHashMap (line 14) | pub struct ArrayHashMap { method new (line 19) | pub fn new() -> ArrayHashMap { method hash_func (line 27) | fn hash_func(&self, key: i32) -> usize { method get (line 32) | pub fn get(&self, key: i32) -> Option<&String> { method put (line 38) | pub fn put(&mut self, key: i32, val: &str) { method remove (line 47) | pub fn remove(&mut self, key: i32) { method entry_set (line 54) | pub fn entry_set(&self) -> Vec<&Pair> { method key_set (line 62) | pub fn key_set(&self) -> Vec<&i32> { method value_set (line 70) | pub fn value_set(&self) -> Vec<&String> { method print (line 78) | pub fn print(&self) { function main (line 85) | fn main() { FILE: en/codes/rust/chapter_hashing/build_in_hash.rs function main (line 13) | fn main() { FILE: en/codes/rust/chapter_hashing/hash_map.rs function main (line 12) | pub fn main() { FILE: en/codes/rust/chapter_hashing/hash_map_chaining.rs type Pair (line 9) | struct Pair { type HashMapChaining (line 15) | struct HashMapChaining { method new (line 25) | fn new() -> Self { method hash_func (line 36) | fn hash_func(&self, key: i32) -> usize { method load_factor (line 41) | fn load_factor(&self) -> f32 { method remove (line 46) | fn remove(&mut self, key: i32) -> Option { method extend (line 63) | fn extend(&mut self) { method print (line 81) | fn print(&self) { method put (line 92) | fn put(&mut self, key: i32, val: String) { method get (line 115) | fn get(&self, key: i32) -> Option<&str> { function main (line 131) | pub fn main() { FILE: en/codes/rust/chapter_hashing/hash_map_open_addressing.rs type HashMapOpenAddressing (line 14) | struct HashMapOpenAddressing { method new (line 25) | fn new() -> Self { method hash_func (line 40) | fn hash_func(&self, key: i32) -> usize { method load_factor (line 45) | fn load_factor(&self) -> f64 { method find_bucket (line 50) | fn find_bucket(&mut self, key: i32) -> usize { method get (line 81) | fn get(&mut self, key: i32) -> Option<&str> { method put (line 93) | fn put(&mut self, key: i32, val: String) { method remove (line 111) | fn remove(&mut self, key: i32) { method extend (line 122) | fn extend(&mut self) { method print (line 141) | fn print(&self) { function main (line 156) | fn main() { FILE: en/codes/rust/chapter_hashing/simple_hash.rs function add_hash (line 8) | fn add_hash(key: &str) -> i32 { function mul_hash (line 20) | fn mul_hash(key: &str) -> i32 { function xor_hash (line 32) | fn xor_hash(key: &str) -> i32 { function rot_hash (line 44) | fn rot_hash(key: &str) -> i32 { function main (line 56) | fn main() { FILE: en/codes/rust/chapter_heap/heap.rs function test_push_max (line 11) | fn test_push_max(heap: &mut BinaryHeap, val: i32) { function test_pop_max (line 17) | fn test_pop_max(heap: &mut BinaryHeap) { function main (line 24) | fn main() { FILE: en/codes/rust/chapter_heap/my_heap.rs type MaxHeap (line 10) | struct MaxHeap { method new (line 17) | fn new(nums: Vec) -> Self { method left (line 28) | fn left(i: usize) -> usize { method right (line 33) | fn right(i: usize) -> usize { method parent (line 38) | fn parent(i: usize) -> usize { method swap (line 43) | fn swap(&mut self, i: usize, j: usize) { method size (line 48) | fn size(&self) -> usize { method is_empty (line 53) | fn is_empty(&self) -> bool { method peek (line 58) | fn peek(&self) -> Option { method push (line 63) | fn push(&mut self, val: i32) { method sift_up (line 71) | fn sift_up(&mut self, mut i: usize) { method pop (line 91) | fn pop(&mut self) -> i32 { method sift_down (line 107) | fn sift_down(&mut self, mut i: usize) { method print (line 129) | fn print(&self) { function main (line 135) | fn main() { FILE: en/codes/rust/chapter_heap/top_k.rs function top_k_heap (line 13) | fn top_k_heap(nums: Vec, k: usize) -> BinaryHeap> { function main (line 32) | fn main() { FILE: en/codes/rust/chapter_searching/binary_search.rs function binary_search (line 8) | fn binary_search(nums: &[i32], target: i32) -> i32 { function binary_search_lcro (line 31) | fn binary_search_lcro(nums: &[i32], target: i32) -> i32 { function main (line 54) | pub fn main() { FILE: en/codes/rust/chapter_searching/binary_search_edge.rs function binary_search_left_edge (line 12) | fn binary_search_left_edge(nums: &[i32], target: i32) -> i32 { function binary_search_right_edge (line 24) | fn binary_search_right_edge(nums: &[i32], target: i32) -> i32 { function main (line 38) | fn main() { FILE: en/codes/rust/chapter_searching/binary_search_insertion.rs function binary_search_insertion_simple (line 9) | fn binary_search_insertion_simple(nums: &[i32], target: i32) -> i32 { function binary_search_insertion (line 26) | pub fn binary_search_insertion(nums: &[i32], target: i32) -> i32 { function main (line 43) | fn main() { FILE: en/codes/rust/chapter_searching/hashing_search.rs function hashing_search_array (line 13) | fn hashing_search_array<'a>(map: &'a HashMap, target: i32) -... function hashing_search_linked_list (line 20) | fn hashing_search_linked_list( function main (line 30) | pub fn main() { FILE: en/codes/rust/chapter_searching/linear_search.rs function linear_search_array (line 12) | fn linear_search_array(nums: &[i32], target: i32) -> i32 { function linear_search_linked_list (line 25) | fn linear_search_linked_list( function main (line 42) | pub fn main() { FILE: en/codes/rust/chapter_searching/two_sum.rs function two_sum_brute_force (line 11) | pub fn two_sum_brute_force(nums: &Vec, target: i32) -> Option, target: i32) -> Option usize { method quick_sort (line 29) | pub fn quick_sort(left: i32, right: i32, nums: &mut [i32]) { type QuickSortMedian (line 43) | struct QuickSortMedian; method median_three (line 47) | fn median_three(nums: &mut [i32], left: usize, mid: usize, right: usiz... method partition (line 59) | fn partition(nums: &mut [i32], left: usize, right: usize) -> usize { method quick_sort (line 80) | pub fn quick_sort(left: i32, right: i32, nums: &mut [i32]) { type QuickSortTailCall (line 94) | struct QuickSortTailCall; method partition (line 98) | fn partition(nums: &mut [i32], left: usize, right: usize) -> usize { method quick_sort (line 115) | pub fn quick_sort(mut left: i32, mut right: i32, nums: &mut [i32]) { function main (line 133) | fn main() { FILE: en/codes/rust/chapter_sorting/radix_sort.rs function digit (line 10) | fn digit(num: i32, exp: i32) -> usize { function counting_sort_digit (line 16) | fn counting_sort_digit(nums: &mut [i32], exp: i32) { function radix_sort (line 42) | fn radix_sort(nums: &mut [i32]) { function main (line 54) | fn main() { FILE: en/codes/rust/chapter_sorting/selection_sort.rs function selection_sort (line 10) | fn selection_sort(nums: &mut [i32]) { function main (line 30) | pub fn main() { FILE: en/codes/rust/chapter_stack_and_queue/array_deque.rs type ArrayDeque (line 8) | struct ArrayDeque { function new (line 16) | pub fn new(capacity: usize) -> Self { function capacity (line 25) | pub fn capacity(&self) -> usize { function size (line 30) | pub fn size(&self) -> usize { function is_empty (line 35) | pub fn is_empty(&self) -> bool { function index (line 40) | fn index(&self, i: i32) -> usize { function push_first (line 48) | pub fn push_first(&mut self, num: T) { function push_last (line 62) | pub fn push_last(&mut self, num: T) { function pop_first (line 75) | fn pop_first(&mut self) -> T { function pop_last (line 84) | fn pop_last(&mut self) -> T { function peek_first (line 91) | fn peek_first(&self) -> T { function peek_last (line 99) | fn peek_last(&self) -> T { function to_array (line 109) | fn to_array(&self) -> Vec { function main (line 122) | fn main() { FILE: en/codes/rust/chapter_stack_and_queue/array_queue.rs type ArrayQueue (line 8) | struct ArrayQueue { function new (line 17) | fn new(capacity: i32) -> ArrayQueue { function capacity (line 27) | fn capacity(&self) -> i32 { function size (line 32) | fn size(&self) -> i32 { function is_empty (line 37) | fn is_empty(&self) -> bool { function push (line 42) | fn push(&mut self, num: T) { function pop (line 56) | fn pop(&mut self) -> T { function peek (line 65) | fn peek(&self) -> T { function to_vector (line 73) | fn to_vector(&self) -> Vec { function main (line 86) | fn main() { FILE: en/codes/rust/chapter_stack_and_queue/array_stack.rs type ArrayStack (line 10) | struct ArrayStack { function new (line 16) | fn new() -> ArrayStack { function size (line 23) | fn size(&self) -> usize { function is_empty (line 28) | fn is_empty(&self) -> bool { function push (line 33) | fn push(&mut self, num: T) { function pop (line 38) | fn pop(&mut self) -> Option { function peek (line 43) | fn peek(&self) -> Option<&T> { function to_array (line 51) | fn to_array(&self) -> &Vec { function main (line 57) | fn main() { FILE: en/codes/rust/chapter_stack_and_queue/deque.rs function main (line 11) | pub fn main() { FILE: en/codes/rust/chapter_stack_and_queue/linkedlist_deque.rs type ListNode (line 13) | pub struct ListNode { function new (line 20) | pub fn new(val: T) -> Rc>> { type LinkedListDeque (line 31) | pub struct LinkedListDeque { function new (line 38) | pub fn new() -> Self { function size (line 47) | pub fn size(&self) -> usize { function is_empty (line 52) | pub fn is_empty(&self) -> bool { function push (line 57) | fn push(&mut self, num: T, is_front: bool) { function push_first (line 95) | pub fn push_first(&mut self, num: T) { function push_last (line 100) | pub fn push_last(&mut self, num: T) { function pop (line 105) | fn pop(&mut self, is_front: bool) -> Option { function pop_first (line 145) | pub fn pop_first(&mut self) -> Option { function pop_last (line 150) | pub fn pop_last(&mut self) -> Option { function peek_first (line 155) | pub fn peek_first(&self) -> Option<&Rc>>> { function peek_last (line 160) | pub fn peek_last(&self) -> Option<&Rc>>> { function to_array (line 165) | pub fn to_array(&self, head: Option<&Rc>>>) -> Vec { function main (line 180) | fn main() { FILE: en/codes/rust/chapter_stack_and_queue/linkedlist_queue.rs type LinkedListQueue (line 14) | pub struct LinkedListQueue { function new (line 21) | pub fn new() -> Self { function size (line 30) | pub fn size(&self) -> usize { function is_empty (line 35) | pub fn is_empty(&self) -> bool { function push (line 40) | pub fn push(&mut self, num: T) { function pop (line 59) | pub fn pop(&mut self) -> Option { function peek (line 75) | pub fn peek(&self) -> Option<&Rc>>> { function to_array (line 80) | pub fn to_array(&self, head: Option<&Rc>>>) -> Vec { function main (line 97) | fn main() { FILE: en/codes/rust/chapter_stack_and_queue/linkedlist_stack.rs type LinkedListStack (line 14) | pub struct LinkedListStack { function new (line 20) | pub fn new() -> Self { function size (line 28) | pub fn size(&self) -> usize { function is_empty (line 33) | pub fn is_empty(&self) -> bool { function push (line 38) | pub fn push(&mut self, num: T) { function pop (line 46) | pub fn pop(&mut self) -> Option { function peek (line 56) | pub fn peek(&self) -> Option<&Rc>>> { function to_array (line 61) | pub fn to_array(&self) -> Vec { function main (line 76) | fn main() { FILE: en/codes/rust/chapter_stack_and_queue/queue.rs function main (line 12) | pub fn main() { FILE: en/codes/rust/chapter_stack_and_queue/stack.rs function main (line 10) | pub fn main() { FILE: en/codes/rust/chapter_tree/array_binary_tree.rs type ArrayBinaryTree (line 10) | struct ArrayBinaryTree { method new (line 16) | fn new(arr: Vec>) -> Self { method size (line 21) | fn size(&self) -> i32 { method val (line 26) | fn val(&self, i: i32) -> Option { method left (line 36) | fn left(&self, i: i32) -> i32 { method right (line 41) | fn right(&self, i: i32) -> i32 { method parent (line 46) | fn parent(&self, i: i32) -> i32 { method level_order (line 51) | fn level_order(&self) -> Vec { method dfs (line 56) | fn dfs(&self, i: i32, order: &'static str, res: &mut Vec) { method pre_order (line 78) | fn pre_order(&self) -> Vec { method in_order (line 85) | fn in_order(&self) -> Vec { method post_order (line 92) | fn post_order(&self) -> Vec { function main (line 100) | fn main() { FILE: en/codes/rust/chapter_tree/avl_tree.rs type OptionTreeNodeRc (line 13) | type OptionTreeNodeRc = Option>>; type AVLTree (line 16) | struct AVLTree { method new (line 22) | fn new() -> Self { method height (line 27) | fn height(node: OptionTreeNodeRc) -> i32 { method update_height (line 36) | fn update_height(node: OptionTreeNodeRc) { method balance_factor (line 46) | fn balance_factor(node: OptionTreeNodeRc) -> i32 { method right_rotate (line 58) | fn right_rotate(node: OptionTreeNodeRc) -> OptionTreeNodeRc { method left_rotate (line 77) | fn left_rotate(node: OptionTreeNodeRc) -> OptionTreeNodeRc { method rotate (line 96) | fn rotate(node: OptionTreeNodeRc) -> OptionTreeNodeRc { method insert (line 131) | fn insert(&mut self, val: i32) { method insert_helper (line 136) | fn insert_helper(node: OptionTreeNodeRc, val: i32) -> OptionTreeNodeRc { method remove (line 170) | fn remove(&self, val: i32) { method remove_helper (line 175) | fn remove_helper(node: OptionTreeNodeRc, val: i32) -> OptionTreeNodeRc { method search (line 225) | fn search(&self, val: i32) -> OptionTreeNodeRc { function main (line 250) | fn main() { FILE: en/codes/rust/chapter_tree/binary_search_tree.rs type OptionTreeNodeRc (line 15) | type OptionTreeNodeRc = Option>>; type BinarySearchTree (line 18) | pub struct BinarySearchTree { method new (line 24) | pub fn new() -> Self { method get_root (line 30) | pub fn get_root(&self) -> OptionTreeNodeRc { method search (line 35) | pub fn search(&self, num: i32) -> OptionTreeNodeRc { method insert (line 54) | pub fn insert(&mut self, num: i32) { method remove (line 90) | pub fn remove(&mut self, num: i32) { function main (line 161) | fn main() { FILE: en/codes/rust/chapter_tree/binary_tree.rs function main (line 10) | fn main() { FILE: en/codes/rust/chapter_tree/binary_tree_bfs.rs function level_order (line 14) | fn level_order(root: &Rc>) -> Vec { function main (line 35) | fn main() { FILE: en/codes/rust/chapter_tree/binary_tree_dfs.rs function pre_order (line 14) | fn pre_order(root: Option<&Rc>>) -> Vec { function in_order (line 32) | fn in_order(root: Option<&Rc>>) -> Vec { function post_order (line 50) | fn post_order(root: Option<&Rc>>) -> Vec { function main (line 69) | fn main() { FILE: en/codes/rust/src/include/list_node.rs type ListNode (line 12) | pub struct ListNode { function new (line 18) | pub fn new(val: T) -> Rc>> { function arr_to_linked_list (line 23) | pub fn arr_to_linked_list(array: &[T]) -> Option>>> function linked_list_to_hashmap (line 40) | pub fn linked_list_to_hashmap( FILE: en/codes/rust/src/include/print_util.rs type Trunk (line 15) | struct Trunk<'a, 'b> { function print_array (line 21) | pub fn print_array(nums: &[T]) { function print_hash_map (line 33) | pub fn print_hash_map(map: &HashMap(queue: &VecDeque) { function print_linked_list (line 49) | pub fn print_linked_list(head: &Rc>>) { function print_tree (line 57) | pub fn print_tree(root: &Rc>) { function _print_tree (line 62) | fn _print_tree(root: Option<&Rc>>, prev: Option<&Trunk... function show_trunks (line 89) | fn show_trunks(trunk: Option<&Trunk>) { function print_heap (line 97) | pub fn print_heap(heap: Vec) { FILE: en/codes/rust/src/include/tree_node.rs type TreeNode (line 12) | pub struct TreeNode { method new (line 22) | pub fn new(val: i32) -> Rc> { function vec_to_tree_dfs (line 59) | fn vec_to_tree_dfs(arr: &[Option], i: usize) -> Option>) -> Option... function tree_to_vec_dfs (line 75) | fn tree_to_vec_dfs(root: Option<&Rc>>, i: usize, res: ... function tree_to_vec (line 88) | pub fn tree_to_vec(root: Option>>) -> Vec Self { function vals_to_vets (line 20) | pub fn vals_to_vets(vals: Vec) -> Vec { function vets_to_vals (line 25) | pub fn vets_to_vals(vets: Vec) -> Vec { FILE: en/codes/typescript/chapter_array_and_linkedlist/array.ts function randomAccess (line 8) | function randomAccess(nums: number[]): number { function extend (line 19) | function extend(nums: number[], enlarge: number): number[] { function insert (line 31) | function insert(nums: number[], num: number, index: number): void { function remove (line 41) | function remove(nums: number[], index: number): void { function traverse (line 49) | function traverse(nums: number[]): void { function find (line 62) | function find(nums: number[], target: number): number { FILE: en/codes/typescript/chapter_array_and_linkedlist/linked_list.ts function insert (line 11) | function insert(n0: ListNode, P: ListNode): void { function remove (line 18) | function remove(n0: ListNode): void { function access (line 29) | function access(head: ListNode | null, index: number): ListNode | null { function find (line 40) | function find(head: ListNode | null, target: number): number { FILE: en/codes/typescript/chapter_array_and_linkedlist/my_list.ts class MyList (line 8) | class MyList { method constructor (line 15) | constructor() { method size (line 20) | public size(): number { method capacity (line 25) | public capacity(): number { method get (line 30) | public get(index: number): number { method set (line 37) | public set(index: number, num: number): void { method add (line 43) | public add(num: number): void { method insert (line 52) | public insert(index: number, num: number): void { method remove (line 68) | public remove(index: number): number { method extendCapacity (line 82) | public extendCapacity(): void { method toArray (line 92) | public toArray(): number[] { FILE: en/codes/typescript/chapter_backtracking/n_queens.ts function backtrack (line 8) | function backtrack( function nQueens (line 42) | function nQueens(n: number): string[][][] { FILE: en/codes/typescript/chapter_backtracking/permutations_i.ts function backtrack (line 8) | function backtrack( function permutationsI (line 36) | function permutationsI(nums: number[]): number[][] { FILE: en/codes/typescript/chapter_backtracking/permutations_ii.ts function backtrack (line 8) | function backtrack( function permutationsII (line 38) | function permutationsII(nums: number[]): number[][] { FILE: en/codes/typescript/chapter_backtracking/preorder_traversal_i_compact.ts function preOrder (line 12) | function preOrder(root: TreeNode | null, res: TreeNode[]): void { FILE: en/codes/typescript/chapter_backtracking/preorder_traversal_ii_compact.ts function preOrder (line 12) | function preOrder( FILE: en/codes/typescript/chapter_backtracking/preorder_traversal_iii_compact.ts function preOrder (line 12) | function preOrder( FILE: en/codes/typescript/chapter_backtracking/preorder_traversal_iii_template.ts function isSolution (line 12) | function isSolution(state: TreeNode[]): boolean { function recordSolution (line 17) | function recordSolution(state: TreeNode[], res: TreeNode[][]): void { function isValid (line 22) | function isValid(state: TreeNode[], choice: TreeNode): boolean { function makeChoice (line 27) | function makeChoice(state: TreeNode[], choice: TreeNode): void { function undoChoice (line 32) | function undoChoice(state: TreeNode[]): void { function backtrack (line 37) | function backtrack( FILE: en/codes/typescript/chapter_backtracking/subset_sum_i.ts function backtrack (line 8) | function backtrack( function subsetSumI (line 38) | function subsetSumI(nums: number[], target: number): number[][] { FILE: en/codes/typescript/chapter_backtracking/subset_sum_i_naive.ts function backtrack (line 8) | function backtrack( function subsetSumINaive (line 36) | function subsetSumINaive(nums: number[], target: number): number[][] { FILE: en/codes/typescript/chapter_backtracking/subset_sum_ii.ts function backtrack (line 8) | function backtrack( function subsetSumII (line 43) | function subsetSumII(nums: number[], target: number): number[][] { FILE: en/codes/typescript/chapter_computational_complexity/iteration.ts function forLoop (line 8) | function forLoop(n: number): number { function whileLoop (line 18) | function whileLoop(n: number): number { function whileLoopII (line 30) | function whileLoopII(n: number): number { function nestedForLoop (line 44) | function nestedForLoop(n: number): string { FILE: en/codes/typescript/chapter_computational_complexity/recursion.ts function recur (line 8) | function recur(n: number): number { function forLoopRecur (line 18) | function forLoopRecur(n: number): number { function tailRecur (line 37) | function tailRecur(n: number, res: number): number { function fib (line 45) | function fib(n: number): number { FILE: en/codes/typescript/chapter_computational_complexity/space_complexity.ts function constFunc (line 12) | function constFunc(): number { function constant (line 18) | function constant(n: number): void { function linear (line 35) | function linear(n: number): void { function linearRecur (line 51) | function linearRecur(n: number): void { function quadratic (line 58) | function quadratic(n: number): void { function quadraticRecur (line 75) | function quadraticRecur(n: number): number { function buildTree (line 83) | function buildTree(n: number): TreeNode | null { FILE: en/codes/typescript/chapter_computational_complexity/time_complexity.ts function constant (line 8) | function constant(n: number): number { function linear (line 16) | function linear(n: number): number { function arrayTraversal (line 23) | function arrayTraversal(nums: number[]): number { function quadratic (line 33) | function quadratic(n: number): number { function bubbleSort (line 45) | function bubbleSort(nums: number[]): number { function exponential (line 64) | function exponential(n: number): number { function expRecur (line 79) | function expRecur(n: number): number { function logarithmic (line 85) | function logarithmic(n: number): number { function logRecur (line 95) | function logRecur(n: number): number { function linearLogRecur (line 101) | function linearLogRecur(n: number): number { function factorialRecur (line 111) | function factorialRecur(n: number): number { FILE: en/codes/typescript/chapter_computational_complexity/worst_best_time_complexity.ts function randomNumbers (line 8) | function randomNumbers(n: number): number[] { function findOne (line 25) | function findOne(nums: number[]): number { FILE: en/codes/typescript/chapter_divide_and_conquer/binary_search_recur.ts function dfs (line 8) | function dfs(nums: number[], target: number, i: number, j: number): numb... function binarySearch (line 28) | function binarySearch(nums: number[], target: number): number { FILE: en/codes/typescript/chapter_divide_and_conquer/build_tree.ts function dfs (line 11) | function dfs( function buildTree (line 33) | function buildTree(preorder: number[], inorder: number[]): TreeNode | nu... FILE: en/codes/typescript/chapter_divide_and_conquer/hanota.ts function move (line 8) | function move(src: number[], tar: number[]): void { function dfs (line 16) | function dfs(i: number, src: number[], buf: number[], tar: number[]): vo... function solveHanota (line 31) | function solveHanota(A: number[], B: number[], C: number[]): void { FILE: en/codes/typescript/chapter_dynamic_programming/climbing_stairs_backtrack.ts function backtrack (line 8) | function backtrack( function climbingStairsBacktrack (line 27) | function climbingStairsBacktrack(n: number): number { FILE: en/codes/typescript/chapter_dynamic_programming/climbing_stairs_constraint_dp.ts function climbingStairsConstraintDP (line 8) | function climbingStairsConstraintDP(n: number): number { FILE: en/codes/typescript/chapter_dynamic_programming/climbing_stairs_dfs.ts function dfs (line 8) | function dfs(i: number): number { function climbingStairsDFS (line 17) | function climbingStairsDFS(n: number): number { FILE: en/codes/typescript/chapter_dynamic_programming/climbing_stairs_dfs_mem.ts function dfs (line 8) | function dfs(i: number, mem: number[]): number { function climbingStairsDFSMem (line 21) | function climbingStairsDFSMem(n: number): number { FILE: en/codes/typescript/chapter_dynamic_programming/climbing_stairs_dp.ts function climbingStairsDP (line 8) | function climbingStairsDP(n: number): number { function climbingStairsDPComp (line 23) | function climbingStairsDPComp(n: number): number { FILE: en/codes/typescript/chapter_dynamic_programming/coin_change.ts function coinChangeDP (line 8) | function coinChangeDP(coins: Array, amt: number): number { function coinChangeDPComp (line 35) | function coinChangeDPComp(coins: Array, amt: number): number { FILE: en/codes/typescript/chapter_dynamic_programming/coin_change_ii.ts function coinChangeIIDP (line 8) | function coinChangeIIDP(coins: Array, amt: number): number { function coinChangeIIDPComp (line 34) | function coinChangeIIDPComp(coins: Array, amt: number): number { FILE: en/codes/typescript/chapter_dynamic_programming/edit_distance.ts function editDistanceDFS (line 8) | function editDistanceDFS(s: string, t: string, i: number, j: number): nu... function editDistanceDFSMem (line 31) | function editDistanceDFSMem( function editDistanceDP (line 64) | function editDistanceDP(s: string, t: string): number { function editDistanceDPComp (line 94) | function editDistanceDPComp(s: string, t: string): number { FILE: en/codes/typescript/chapter_dynamic_programming/knapsack.ts function knapsackDFS (line 8) | function knapsackDFS( function knapsackDFSMem (line 30) | function knapsackDFSMem( function knapsackDP (line 59) | function knapsackDP( function knapsackDPComp (line 88) | function knapsackDPComp( FILE: en/codes/typescript/chapter_dynamic_programming/min_cost_climbing_stairs_dp.ts function minCostClimbingStairsDP (line 8) | function minCostClimbingStairsDP(cost: Array): number { function minCostClimbingStairsDPComp (line 26) | function minCostClimbingStairsDPComp(cost: Array): number { FILE: en/codes/typescript/chapter_dynamic_programming/min_path_sum.ts function minPathSumDFS (line 8) | function minPathSumDFS( function minPathSumDFSMem (line 29) | function minPathSumDFSMem( function minPathSumDP (line 56) | function minPathSumDP(grid: Array>): number { function minPathSumDPComp (line 82) | function minPathSumDPComp(grid: Array>): number { FILE: en/codes/typescript/chapter_dynamic_programming/unbounded_knapsack.ts function unboundedKnapsackDP (line 8) | function unboundedKnapsackDP( function unboundedKnapsackDPComp (line 37) | function unboundedKnapsackDPComp( FILE: en/codes/typescript/chapter_graph/graph_adjacency_list.ts class GraphAdjList (line 10) | class GraphAdjList { method constructor (line 15) | constructor(edges: Vertex[][]) { method size (line 26) | size(): number { method addEdge (line 31) | addEdge(vet1: Vertex, vet2: Vertex): void { method removeEdge (line 45) | removeEdge(vet1: Vertex, vet2: Vertex): void { method addVertex (line 60) | addVertex(vet: Vertex): void { method removeVertex (line 67) | removeVertex(vet: Vertex): void { method print (line 83) | print(): void { FILE: en/codes/typescript/chapter_graph/graph_adjacency_matrix.ts class GraphAdjMat (line 8) | class GraphAdjMat { method constructor (line 13) | constructor(vertices: number[], edges: number[][]) { method size (line 28) | size(): number { method addVertex (line 33) | addVertex(val: number): void { method removeVertex (line 50) | removeVertex(index: number): void { method addEdge (line 67) | addEdge(i: number, j: number): void { method removeEdge (line 79) | removeEdge(i: number, j: number): void { method print (line 89) | print(): void { FILE: en/codes/typescript/chapter_graph/graph_bfs.ts function graphBFS (line 12) | function graphBFS(graph: GraphAdjList, startVet: Vertex): Vertex[] { FILE: en/codes/typescript/chapter_graph/graph_dfs.ts function dfs (line 11) | function dfs( function graphDFS (line 31) | function graphDFS(graph: GraphAdjList, startVet: Vertex): Vertex[] { FILE: en/codes/typescript/chapter_greedy/coin_change_greedy.ts function coinChangeGreedy (line 8) | function coinChangeGreedy(coins: number[], amt: number): number { FILE: en/codes/typescript/chapter_greedy/fractional_knapsack.ts class Item (line 8) | class Item { method constructor (line 12) | constructor(w: number, v: number) { function fractionalKnapsack (line 19) | function fractionalKnapsack(wgt: number[], val: number[], cap: number): ... FILE: en/codes/typescript/chapter_greedy/max_capacity.ts function maxCapacity (line 8) | function maxCapacity(ht: number[]): number { FILE: en/codes/typescript/chapter_greedy/max_product_cutting.ts function maxProductCutting (line 8) | function maxProductCutting(n: number): number { FILE: en/codes/typescript/chapter_hashing/array_hash_map.ts class Pair (line 8) | class Pair { method constructor (line 12) | constructor(key: number, val: string) { class ArrayHashMap (line 19) | class ArrayHashMap { method constructor (line 22) | constructor() { method hashFunc (line 28) | private hashFunc(key: number): number { method get (line 33) | public get(key: number): string | null { method set (line 41) | public set(key: number, val: string) { method delete (line 47) | public delete(key: number) { method entries (line 54) | public entries(): (Pair | null)[] { method keys (line 65) | public keys(): (number | undefined)[] { method values (line 76) | public values(): (string | undefined)[] { method print (line 87) | public print() { FILE: en/codes/typescript/chapter_hashing/hash_map_chaining.ts class Pair (line 8) | class Pair { method constructor (line 11) | constructor(key: number, val: string) { class HashMapChaining (line 18) | class HashMapChaining { method constructor (line 26) | constructor() { method #hashFunc (line 35) | #hashFunc(key: number): number { method #loadFactor (line 40) | #loadFactor(): number { method get (line 45) | get(key: number): string | null { method put (line 59) | put(key: number, val: string): void { method remove (line 80) | remove(key: number): void { method #extend (line 94) | #extend(): void { method print (line 110) | print(): void { FILE: en/codes/typescript/chapter_hashing/hash_map_open_addressing.ts class Pair (line 8) | class Pair { method constructor (line 12) | constructor(key: number, val: string) { class HashMapOpenAddressing (line 19) | class HashMapOpenAddressing { method constructor (line 28) | constructor() { method hashFunc (line 38) | private hashFunc(key: number): number { method loadFactor (line 43) | private loadFactor(): number { method findBucket (line 48) | private findBucket(key: number): number { method get (line 78) | get(key: number): string | null { method put (line 93) | put(key: number, val: string): void { method remove (line 114) | remove(key: number): void { method extend (line 128) | private extend(): void { method print (line 144) | print(): void { FILE: en/codes/typescript/chapter_hashing/simple_hash.ts function addHash (line 8) | function addHash(key: string): number { function mulHash (line 18) | function mulHash(key: string): number { function xorHash (line 28) | function xorHash(key: string): number { function rotHash (line 38) | function rotHash(key: string): number { FILE: en/codes/typescript/chapter_heap/my_heap.ts class MaxHeap (line 10) | class MaxHeap { method constructor (line 13) | constructor(nums?: number[]) { method left (line 23) | private left(i: number): number { method right (line 28) | private right(i: number): number { method parent (line 33) | private parent(i: number): number { method swap (line 38) | private swap(i: number, j: number): void { method size (line 45) | public size(): number { method isEmpty (line 50) | public isEmpty(): boolean { method peek (line 55) | public peek(): number { method push (line 60) | public push(val: number): void { method siftUp (line 68) | private siftUp(i: number): void { method pop (line 82) | public pop(): number { method siftDown (line 96) | private siftDown(i: number): void { method print (line 114) | public print(): void { method getMaxHeap (line 119) | public getMaxHeap(): number[] { FILE: en/codes/typescript/chapter_heap/top_k.ts function pushMinHeap (line 10) | function pushMinHeap(maxHeap: MaxHeap, val: number): void { function popMinHeap (line 16) | function popMinHeap(maxHeap: MaxHeap): number { function peekMinHeap (line 22) | function peekMinHeap(maxHeap: MaxHeap): number { function getMinHeap (line 28) | function getMinHeap(maxHeap: MaxHeap): number[] { function topKHeap (line 34) | function topKHeap(nums: number[], k: number): number[] { FILE: en/codes/typescript/chapter_searching/binary_search.ts function binarySearch (line 8) | function binarySearch(nums: number[], target: number): number { function binarySearchLCRO (line 31) | function binarySearchLCRO(nums: number[], target: number): number { FILE: en/codes/typescript/chapter_searching/binary_search_edge.ts function binarySearchLeftEdge (line 9) | function binarySearchLeftEdge(nums: Array, target: number): numb... function binarySearchRightEdge (line 21) | function binarySearchRightEdge(nums: Array, target: number): num... FILE: en/codes/typescript/chapter_searching/binary_search_insertion.ts function binarySearchInsertionSimple (line 8) | function binarySearchInsertionSimple( function binarySearchInsertion (line 29) | function binarySearchInsertion(nums: Array, target: number): num... FILE: en/codes/typescript/chapter_searching/hashing_search.ts function hashingSearchArray (line 10) | function hashingSearchArray(map: Map, target: number): n... function hashingSearchLinkedList (line 17) | function hashingSearchLinkedList( FILE: en/codes/typescript/chapter_searching/linear_search.ts function linearSearchArray (line 10) | function linearSearchArray(nums: number[], target: number): number { function linearSearchLinkedList (line 23) | function linearSearchLinkedList( FILE: en/codes/typescript/chapter_searching/two_sum.ts function twoSumBruteForce (line 8) | function twoSumBruteForce(nums: number[], target: number): number[] { function twoSumHashTable (line 22) | function twoSumHashTable(nums: number[], target: number): number[] { FILE: en/codes/typescript/chapter_sorting/bubble_sort.ts function bubbleSort (line 8) | function bubbleSort(nums: number[]): void { function bubbleSortWithFlag (line 24) | function bubbleSortWithFlag(nums: number[]): void { FILE: en/codes/typescript/chapter_sorting/bucket_sort.ts function bucketSort (line 8) | function bucketSort(nums: number[]): void { FILE: en/codes/typescript/chapter_sorting/counting_sort.ts function countingSortNaive (line 9) | function countingSortNaive(nums: number[]): void { function countingSort (line 29) | function countingSort(nums: number[]): void { FILE: en/codes/typescript/chapter_sorting/heap_sort.ts function siftDown (line 8) | function siftDown(nums: number[], n: number, i: number): void { function heapSort (line 32) | function heapSort(nums: number[]): void { FILE: en/codes/typescript/chapter_sorting/insertion_sort.ts function insertionSort (line 8) | function insertionSort(nums: number[]): void { FILE: en/codes/typescript/chapter_sorting/merge_sort.ts function merge (line 8) | function merge(nums: number[], left: number, mid: number, right: number)... function mergeSort (line 38) | function mergeSort(nums: number[], left: number, right: number): void { FILE: en/codes/typescript/chapter_sorting/quick_sort.ts class QuickSort (line 8) | class QuickSort { method swap (line 10) | swap(nums: number[], i: number, j: number): void { method partition (line 17) | partition(nums: number[], left: number, right: number): number { method quickSort (line 36) | quickSort(nums: number[], left: number, right: number): void { class QuickSortMedian (line 50) | class QuickSortMedian { method swap (line 52) | swap(nums: number[], i: number, j: number): void { method medianThree (line 59) | medianThree( method partition (line 76) | partition(nums: number[], left: number, right: number): number { method quickSort (line 103) | quickSort(nums: number[], left: number, right: number): void { class QuickSortTailCall (line 117) | class QuickSortTailCall { method swap (line 119) | swap(nums: number[], i: number, j: number): void { method partition (line 126) | partition(nums: number[], left: number, right: number): number { method quickSort (line 144) | quickSort(nums: number[], left: number, right: number): void { FILE: en/codes/typescript/chapter_sorting/radix_sort.ts function digit (line 8) | function digit(num: number, exp: number): number { function countingSortDigit (line 14) | function countingSortDigit(nums: number[], exp: number): void { function radixSort (line 42) | function radixSort(nums: number[]): void { FILE: en/codes/typescript/chapter_sorting/selection_sort.ts function selectionSort (line 8) | function selectionSort(nums: number[]): void { FILE: en/codes/typescript/chapter_stack_and_queue/array_deque.ts class ArrayDeque (line 8) | class ArrayDeque { method constructor (line 14) | constructor(capacity: number) { method capacity (line 21) | capacity(): number { method size (line 26) | size(): number { method isEmpty (line 31) | isEmpty(): boolean { method index (line 36) | index(i: number): number { method pushFirst (line 44) | pushFirst(num: number): void { method pushLast (line 58) | pushLast(num: number): void { method popFirst (line 71) | popFirst(): number { method popLast (line 80) | popLast(): number { method peekFirst (line 87) | peekFirst(): number { method peekLast (line 93) | peekLast(): number { method toArray (line 101) | toArray(): number[] { FILE: en/codes/typescript/chapter_stack_and_queue/array_queue.ts class ArrayQueue (line 8) | class ArrayQueue { method constructor (line 13) | constructor(capacity: number) { method capacity (line 19) | get capacity(): number { method size (line 24) | get size(): number { method isEmpty (line 29) | isEmpty(): boolean { method push (line 34) | push(num: number): void { method pop (line 48) | pop(): number { method peek (line 57) | peek(): number { method toArray (line 63) | toArray(): number[] { FILE: en/codes/typescript/chapter_stack_and_queue/array_stack.ts class ArrayStack (line 8) | class ArrayStack { method constructor (line 10) | constructor() { method size (line 15) | get size(): number { method isEmpty (line 20) | isEmpty(): boolean { method push (line 25) | push(num: number): void { method pop (line 30) | pop(): number | undefined { method top (line 36) | top(): number | undefined { method toArray (line 42) | toArray() { FILE: en/codes/typescript/chapter_stack_and_queue/linkedlist_deque.ts class ListNode (line 8) | class ListNode { method constructor (line 13) | constructor(val: number) { class LinkedListDeque (line 21) | class LinkedListDeque { method constructor (line 26) | constructor() { method pushLast (line 33) | pushLast(val: number): void { method pushFirst (line 49) | pushFirst(val: number): void { method popLast (line 65) | popLast(): number { method popFirst (line 82) | popFirst(): number { method peekLast (line 99) | peekLast(): number { method peekFirst (line 104) | peekFirst(): number { method size (line 109) | size(): number { method isEmpty (line 114) | isEmpty(): boolean { method print (line 119) | print(): void { FILE: en/codes/typescript/chapter_stack_and_queue/linkedlist_queue.ts class LinkedListQueue (line 10) | class LinkedListQueue { method constructor (line 15) | constructor() { method size (line 21) | get size(): number { method isEmpty (line 26) | isEmpty(): boolean { method push (line 31) | push(num: number): void { method pop (line 47) | pop(): number { method peek (line 57) | peek(): number { method toArray (line 63) | toArray(): number[] { FILE: en/codes/typescript/chapter_stack_and_queue/linkedlist_stack.ts class LinkedListStack (line 10) | class LinkedListStack { method constructor (line 14) | constructor() { method size (line 19) | get size(): number { method isEmpty (line 24) | isEmpty(): boolean { method push (line 29) | push(num: number): void { method pop (line 37) | pop(): number { method peek (line 46) | peek(): number { method toArray (line 52) | toArray(): number[] { FILE: en/codes/typescript/chapter_tree/array_binary_tree.ts type Order (line 10) | type Order = 'pre' | 'in' | 'post'; class ArrayBinaryTree (line 13) | class ArrayBinaryTree { method constructor (line 17) | constructor(arr: (number | null)[]) { method size (line 22) | size(): number { method val (line 27) | val(i: number): number | null { method left (line 34) | left(i: number): number { method right (line 39) | right(i: number): number { method parent (line 44) | parent(i: number): number { method levelOrder (line 49) | levelOrder(): number[] { method #dfs (line 59) | #dfs(i: number, order: Order, res: (number | null)[]): void { method preOrder (line 73) | preOrder(): (number | null)[] { method inOrder (line 80) | inOrder(): (number | null)[] { method postOrder (line 87) | postOrder(): (number | null)[] { FILE: en/codes/typescript/chapter_tree/avl_tree.ts class AVLTree (line 11) | class AVLTree { method constructor (line 14) | constructor() { method height (line 19) | height(node: TreeNode): number { method updateHeight (line 25) | private updateHeight(node: TreeNode): void { method balanceFactor (line 32) | balanceFactor(node: TreeNode): number { method rightRotate (line 40) | private rightRotate(node: TreeNode): TreeNode { method leftRotate (line 54) | private leftRotate(node: TreeNode): TreeNode { method rotate (line 68) | private rotate(node: TreeNode): TreeNode { method insert (line 98) | insert(val: number): void { method insertHelper (line 103) | private insertHelper(node: TreeNode, val: number): TreeNode { method remove (line 121) | remove(val: number): void { method removeHelper (line 126) | private removeHelper(node: TreeNode, val: number): TreeNode { method search (line 161) | search(val: number): TreeNode { function testInsert (line 181) | function testInsert(tree: AVLTree, val: number): void { function testRemove (line 187) | function testRemove(tree: AVLTree, val: number): void { FILE: en/codes/typescript/chapter_tree/binary_search_tree.ts class BinarySearchTree (line 11) | class BinarySearchTree { method constructor (line 15) | constructor() { method getRoot (line 21) | getRoot(): TreeNode | null { method search (line 26) | search(num: number): TreeNode | null { method insert (line 42) | insert(num: number): void { method remove (line 67) | remove(num: number): void { FILE: en/codes/typescript/chapter_tree/binary_tree_bfs.ts function levelOrder (line 12) | function levelOrder(root: TreeNode | null): number[] { FILE: en/codes/typescript/chapter_tree/binary_tree_dfs.ts function preOrder (line 15) | function preOrder(root: TreeNode | null): void { function inOrder (line 26) | function inOrder(root: TreeNode | null): void { function postOrder (line 37) | function postOrder(root: TreeNode | null): void { FILE: en/codes/typescript/modules/ListNode.ts class ListNode (line 8) | class ListNode { method constructor (line 11) | constructor(val?: number, next?: ListNode | null) { function arrToLinkedList (line 18) | function arrToLinkedList(arr: number[]): ListNode | null { FILE: en/codes/typescript/modules/PrintUtil.ts function printLinkedList (line 11) | function printLinkedList(head: ListNode | null): void { class Trunk (line 20) | class Trunk { method constructor (line 24) | constructor(prev: Trunk | null, str: string) { function printTree (line 35) | function printTree(root: TreeNode | null) { function printTreeHelper (line 40) | function printTreeHelper( function showTrunks (line 75) | function showTrunks(p: Trunk | null) { function printHeap (line 85) | function printHeap(arr: number[]): void { FILE: en/codes/typescript/modules/TreeNode.ts class TreeNode (line 8) | class TreeNode { method constructor (line 13) | constructor( function arrToTree (line 27) | function arrToTree(arr: (number | null)[], i: number = 0): TreeNode | nu... FILE: en/codes/typescript/modules/Vertex.ts class Vertex (line 8) | class Vertex { method constructor (line 10) | constructor(val: number) { method valsToVets (line 15) | public static valsToVets(vals: number[]): Vertex[] { method vetsToVals (line 24) | public static vetsToVals(vets: Vertex[]): number[] { FILE: ja/codes/c/chapter_array_and_linkedlist/array.c function randomAccess (line 10) | int randomAccess(int *nums, int size) { function insert (line 35) | void insert(int *nums, int size, int num, int index) { function removeItem (line 46) | void removeItem(int *nums, int size, int index) { function traverse (line 54) | void traverse(int *nums, int size) { function find (line 63) | int find(int *nums, int size, int target) { function main (line 72) | int main() { FILE: ja/codes/c/chapter_array_and_linkedlist/linked_list.c function insert (line 10) | void insert(ListNode *n0, ListNode *P) { function removeItem (line 18) | void removeItem(ListNode *n0) { function ListNode (line 30) | ListNode *access(ListNode *head, int index) { function find (line 40) | int find(ListNode *head, int target) { function main (line 52) | int main() { FILE: ja/codes/c/chapter_array_and_linkedlist/my_list.c type MyList (line 10) | typedef struct { function MyList (line 20) | MyList *newMyList() { function delMyList (line 30) | void delMyList(MyList *nums) { function size (line 36) | int size(MyList *nums) { function capacity (line 41) | int capacity(MyList *nums) { function get (line 46) | int get(MyList *nums, int index) { function set (line 52) | void set(MyList *nums, int index, int num) { function add (line 58) | void add(MyList *nums, int num) { function insert (line 67) | void insert(MyList *nums, int index, int num) { function removeItem (line 82) | int removeItem(MyList *nums, int index) { function extendCapacity (line 93) | void extendCapacity(MyList *nums) { function main (line 117) | int main() { FILE: ja/codes/c/chapter_backtracking/n_queens.c function backtrack (line 12) | void backtrack(int row, int n, char state[MAX_SIZE][MAX_SIZE], char ***r... function main (line 64) | int main() { FILE: ja/codes/c/chapter_backtracking/permutations_i.c function backtrack (line 13) | void backtrack(int *state, int stateSize, int *choices, int choicesSize,... function main (line 58) | int main() { FILE: ja/codes/c/chapter_backtracking/permutations_ii.c function backtrack (line 13) | void backtrack(int *state, int stateSize, int *choices, int choicesSize,... function main (line 60) | int main() { FILE: ja/codes/c/chapter_backtracking/preorder_traversal_i_compact.c function preOrder (line 16) | void preOrder(TreeNode *root) { function main (line 29) | int main() { FILE: ja/codes/c/chapter_backtracking/preorder_traversal_ii_compact.c function preOrder (line 18) | void preOrder(TreeNode *root) { function main (line 38) | int main() { FILE: ja/codes/c/chapter_backtracking/preorder_traversal_iii_compact.c function preOrder (line 18) | void preOrder(TreeNode *root) { function main (line 39) | int main() { FILE: ja/codes/c/chapter_backtracking/preorder_traversal_iii_template.c function isSolution (line 18) | bool isSolution(void) { function recordSolution (line 23) | void recordSolution(void) { function isValid (line 31) | bool isValid(TreeNode *choice) { function makeChoice (line 36) | void makeChoice(TreeNode *choice) { function undoChoice (line 41) | void undoChoice(void) { function backtrack (line 46) | void backtrack(TreeNode *choices[2]) { function main (line 69) | int main() { FILE: ja/codes/c/chapter_backtracking/subset_sum_i.c function backtrack (line 22) | void backtrack(int target, int *choices, int choicesSize, int start) { function cmp (line 50) | int cmp(const void *a, const void *b) { function subsetSumI (line 55) | void subsetSumI(int *nums, int numsSize, int target) { function main (line 62) | int main() { FILE: ja/codes/c/chapter_backtracking/subset_sum_i_naive.c function backtrack (line 22) | void backtrack(int target, int total, int *choices, int choicesSize) { function subsetSumINaive (line 47) | void subsetSumINaive(int *nums, int numsSize, int target) { function main (line 53) | int main() { FILE: ja/codes/c/chapter_backtracking/subset_sum_ii.c function backtrack (line 22) | void backtrack(int target, int *choices, int choicesSize, int start) { function cmp (line 54) | int cmp(const void *a, const void *b) { function subsetSumII (line 59) | void subsetSumII(int *nums, int numsSize, int target) { function main (line 67) | int main() { FILE: ja/codes/c/chapter_computational_complexity/iteration.c function forLoop (line 10) | int forLoop(int n) { function whileLoop (line 20) | int whileLoop(int n) { function whileLoopII (line 32) | int whileLoopII(int n) { function main (line 63) | int main() { FILE: ja/codes/c/chapter_computational_complexity/recursion.c function recur (line 10) | int recur(int n) { function forLoopRecur (line 21) | int forLoopRecur(int n) { function tailRecur (line 40) | int tailRecur(int n, int res) { function fib (line 49) | int fib(int n) { function main (line 60) | int main() { FILE: ja/codes/c/chapter_computational_complexity/space_complexity.c function func (line 10) | int func() { function constant (line 16) | void constant(int n) { type HashTable (line 34) | typedef struct { function linear (line 41) | void linear(int n) { function linearRecur (line 75) | void linearRecur(int n) { function quadratic (line 83) | void quadratic(int n) { function quadraticRecur (line 102) | int quadraticRecur(int n) { function TreeNode (line 113) | TreeNode *buildTree(int n) { function main (line 123) | int main() { FILE: ja/codes/c/chapter_computational_complexity/time_complexity.c function constant (line 10) | int constant(int n) { function linear (line 21) | int linear(int n) { function arrayTraversal (line 30) | int arrayTraversal(int *nums, int n) { function quadratic (line 40) | int quadratic(int n) { function bubbleSort (line 52) | int bubbleSort(int *nums, int n) { function exponential (line 71) | int exponential(int n) { function expRecur (line 86) | int expRecur(int n) { function logarithmic (line 93) | int logarithmic(int n) { function logRecur (line 103) | int logRecur(int n) { function linearLogRecur (line 110) | int linearLogRecur(int n) { function factorialRecur (line 121) | int factorialRecur(int n) { function main (line 132) | int main(int argc, char *argv[]) { FILE: ja/codes/c/chapter_computational_complexity/worst_best_time_complexity.c function findOne (line 28) | int findOne(int *nums, int n) { function main (line 39) | int main(int argc, char *argv[]) { FILE: ja/codes/c/chapter_divide_and_conquer/binary_search_recur.c function dfs (line 10) | int dfs(int nums[], int target, int i, int j) { function binarySearch (line 30) | int binarySearch(int nums[], int target, int numsSize) { function main (line 37) | int main() { FILE: ja/codes/c/chapter_divide_and_conquer/build_tree.c function TreeNode (line 13) | TreeNode *dfs(int *preorder, int *inorderMap, int i, int l, int r, int s... function TreeNode (line 33) | TreeNode *buildTree(int *preorder, int preorderSize, int *inorder, int i... function main (line 45) | int main() { FILE: ja/codes/c/chapter_divide_and_conquer/hanota.c function move (line 13) | void move(int *src, int *srcSize, int *tar, int *tarSize) { function dfs (line 24) | void dfs(int i, int *src, int *srcSize, int *buf, int *bufSize, int *tar... function solveHanota (line 39) | void solveHanota(int *A, int *ASize, int *B, int *BSize, int *C, int *CS... function main (line 45) | int main() { FILE: ja/codes/c/chapter_dynamic_programming/climbing_stairs_backtrack.c function backtrack (line 10) | void backtrack(int *choices, int state, int n, int *res, int len) { function climbingStairsBacktrack (line 27) | int climbingStairsBacktrack(int n) { function main (line 40) | int main() { FILE: ja/codes/c/chapter_dynamic_programming/climbing_stairs_constraint_dp.c function climbingStairsConstraintDP (line 10) | int climbingStairsConstraintDP(int n) { function main (line 39) | int main() { FILE: ja/codes/c/chapter_dynamic_programming/climbing_stairs_dfs.c function dfs (line 10) | int dfs(int i) { function climbingStairsDFS (line 20) | int climbingStairsDFS(int n) { function main (line 25) | int main() { FILE: ja/codes/c/chapter_dynamic_programming/climbing_stairs_dfs_mem.c function dfs (line 10) | int dfs(int i, int *mem) { function climbingStairsDFSMem (line 25) | int climbingStairsDFSMem(int n) { function main (line 37) | int main() { FILE: ja/codes/c/chapter_dynamic_programming/climbing_stairs_dp.c function climbingStairsDP (line 10) | int climbingStairsDP(int n) { function climbingStairsDPComp (line 28) | int climbingStairsDPComp(int n) { function main (line 41) | int main() { FILE: ja/codes/c/chapter_dynamic_programming/coin_change.c function myMin (line 10) | int myMin(int a, int b) { function coinChangeDP (line 15) | int coinChangeDP(int coins[], int amt, int coinsSize) { function coinChangeDPComp (line 49) | int coinChangeDPComp(int coins[], int amt, int coinsSize) { function main (line 78) | int main() { FILE: ja/codes/c/chapter_dynamic_programming/coin_change_ii.c function coinChangeIIDP (line 10) | int coinChangeIIDP(int coins[], int amt, int coinsSize) { function coinChangeIIDPComp (line 43) | int coinChangeIIDPComp(int coins[], int amt, int coinsSize) { function main (line 67) | int main() { FILE: ja/codes/c/chapter_dynamic_programming/edit_distance.c function myMin (line 10) | int myMin(int a, int b) { function editDistanceDFS (line 15) | int editDistanceDFS(char *s, char *t, int i, int j) { function editDistanceDFSMem (line 37) | int editDistanceDFSMem(char *s, char *t, int memCols, int **mem, int i, ... function editDistanceDP (line 63) | int editDistanceDP(char *s, char *t, int n, int m) { function editDistanceDPComp (line 96) | int editDistanceDPComp(char *s, char *t, int n, int m) { function main (line 127) | int main() { FILE: ja/codes/c/chapter_dynamic_programming/knapsack.c function myMax (line 10) | int myMax(int a, int b) { function knapsackDFS (line 15) | int knapsackDFS(int wgt[], int val[], int i, int c) { function knapsackDFSMem (line 32) | int knapsackDFSMem(int wgt[], int val[], int memCols, int **mem, int i, ... function knapsackDP (line 54) | int knapsackDP(int wgt[], int val[], int cap, int wgtSize) { function knapsackDPComp (line 82) | int knapsackDPComp(int wgt[], int val[], int cap, int wgtSize) { function main (line 103) | int main() { FILE: ja/codes/c/chapter_dynamic_programming/min_cost_climbing_stairs_dp.c function myMin (line 10) | int myMin(int a, int b) { function minCostClimbingStairsDP (line 15) | int minCostClimbingStairsDP(int cost[], int costSize) { function minCostClimbingStairsDPComp (line 35) | int minCostClimbingStairsDPComp(int cost[], int costSize) { function main (line 49) | int main() { FILE: ja/codes/c/chapter_dynamic_programming/min_path_sum.c function myMin (line 13) | int myMin(int a, int b) { function minPathSumDFS (line 18) | int minPathSumDFS(int grid[MAX_SIZE][MAX_SIZE], int i, int j) { function minPathSumDFSMem (line 35) | int minPathSumDFSMem(int grid[MAX_SIZE][MAX_SIZE], int mem[MAX_SIZE][MAX... function minPathSumDP (line 57) | int minPathSumDP(int grid[MAX_SIZE][MAX_SIZE], int n, int m) { function minPathSumDPComp (line 87) | int minPathSumDPComp(int grid[MAX_SIZE][MAX_SIZE], int n, int m) { function main (line 111) | int main() { FILE: ja/codes/c/chapter_dynamic_programming/unbounded_knapsack.c function myMax (line 10) | int myMax(int a, int b) { function unboundedKnapsackDP (line 15) | int unboundedKnapsackDP(int wgt[], int val[], int cap, int wgtSize) { function unboundedKnapsackDPComp (line 43) | int unboundedKnapsackDPComp(int wgt[], int val[], int cap, int wgtSize) { function main (line 66) | int main() { FILE: ja/codes/c/chapter_graph/graph_adjacency_list.c type AdjListNode (line 13) | typedef struct AdjListNode { type GraphAdjList (line 19) | typedef struct { function GraphAdjList (line 25) | GraphAdjList *newGraphAdjList() { function delGraphAdjList (line 38) | void delGraphAdjList(GraphAdjList *graph) { function AdjListNode (line 55) | AdjListNode *findNode(GraphAdjList *graph, Vertex *vet) { function addEdgeHelper (line 65) | void addEdgeHelper(AdjListNode *head, Vertex *vet) { function addEdge (line 74) | void addEdge(GraphAdjList *graph, Vertex *vet1, Vertex *vet2) { function removeEdgeHelper (line 84) | void removeEdgeHelper(AdjListNode *head, Vertex *vet) { function removeEdge (line 101) | void removeEdge(GraphAdjList *graph, Vertex *vet1, Vertex *vet2) { function addVertex (line 111) | void addVertex(GraphAdjList *graph, Vertex *vet) { function removeVertex (line 121) | void removeVertex(GraphAdjList *graph, Vertex *vet) { function printGraph (line 159) | void printGraph(const GraphAdjList *graph) { FILE: ja/codes/c/chapter_graph/graph_adjacency_list_test.c function main (line 10) | int main() { FILE: ja/codes/c/chapter_graph/graph_adjacency_matrix.c type GraphAdjMat (line 13) | typedef struct { function GraphAdjMat (line 20) | GraphAdjMat *newGraphAdjMat() { function delGraphAdjMat (line 32) | void delGraphAdjMat(GraphAdjMat *graph) { function addVertex (line 37) | void addVertex(GraphAdjMat *graph, int val) { function removeVertex (line 52) | void removeVertex(GraphAdjMat *graph, int index) { function addEdge (line 78) | void addEdge(GraphAdjMat *graph, int i, int j) { function removeEdge (line 89) | void removeEdge(GraphAdjMat *graph, int i, int j) { function printGraphAdjMat (line 99) | void printGraphAdjMat(GraphAdjMat *graph) { function main (line 109) | int main() { FILE: ja/codes/c/chapter_graph/graph_bfs.c type Queue (line 13) | typedef struct { function Queue (line 19) | Queue *newQueue() { function isEmpty (line 26) | int isEmpty(Queue *q) { function enqueue (line 31) | void enqueue(Queue *q, Vertex *vet) { function Vertex (line 38) | Vertex *dequeue(Queue *q) { function isVisited (line 46) | int isVisited(Vertex **visited, int size, Vertex *vet) { function graphBFS (line 57) | void graphBFS(GraphAdjList *graph, Vertex *startVet, Vertex **res, int *... function main (line 82) | int main() { FILE: ja/codes/c/chapter_graph/graph_dfs.c function isVisited (line 13) | int isVisited(Vertex **res, int size, Vertex *vet) { function dfs (line 24) | void dfs(GraphAdjList *graph, Vertex **res, int *resSize, Vertex *vet) { function graphDFS (line 41) | void graphDFS(GraphAdjList *graph, Vertex *startVet, Vertex **res, int *... function main (line 46) | int main() { FILE: ja/codes/c/chapter_greedy/coin_change_greedy.c function coinChangeGreedy (line 10) | int coinChangeGreedy(int *coins, int size, int amt) { function main (line 29) | int main() { FILE: ja/codes/c/chapter_greedy/fractional_knapsack.c type Item (line 10) | typedef struct { function sortByValueDensity (line 16) | int sortByValueDensity(const void *a, const void *b) { function fractionalKnapsack (line 23) | float fractionalKnapsack(int wgt[], int val[], int itemCount, int cap) { function main (line 50) | int main(void) { FILE: ja/codes/c/chapter_greedy/max_capacity.c function myMin (line 10) | int myMin(int a, int b) { function myMax (line 14) | int myMax(int a, int b) { function maxCapacity (line 19) | int maxCapacity(int ht[], int htLength) { function main (line 41) | int main(void) { FILE: ja/codes/c/chapter_greedy/max_product_cutting.c function maxProductCutting (line 10) | int maxProductCutting(int n) { function main (line 31) | int main(void) { FILE: ja/codes/c/chapter_hashing/array_hash_map.c type Pair (line 13) | typedef struct { type MapSet (line 19) | typedef struct { type ArrayHashMap (line 25) | typedef struct { function ArrayHashMap (line 30) | ArrayHashMap *newArrayHashMap() { function delArrayHashMap (line 39) | void delArrayHashMap(ArrayHashMap *hmap) { function hashFunc (line 50) | int hashFunc(int key) { function put (line 65) | void put(ArrayHashMap *hmap, const int key, const char *val) { function removeItem (line 76) | void removeItem(ArrayHashMap *hmap, const int key) { function pairSet (line 84) | void pairSet(ArrayHashMap *hmap, MapSet *set) { function keySet (line 108) | void keySet(ArrayHashMap *hmap, MapSet *set) { function valueSet (line 130) | void valueSet(ArrayHashMap *hmap, MapSet *set) { function print (line 152) | void print(ArrayHashMap *hmap) { function main (line 164) | int main() { FILE: ja/codes/c/chapter_hashing/hash_map_chaining.c type Pair (line 15) | typedef struct { type Node (line 21) | typedef struct Node { type HashMapChaining (line 27) | typedef struct { function HashMapChaining (line 36) | HashMapChaining *newHashMapChaining() { function delHashMapChaining (line 50) | void delHashMapChaining(HashMapChaining *hashMap) { function hashFunc (line 65) | int hashFunc(HashMapChaining *hashMap, int key) { function loadFactor (line 70) | double loadFactor(HashMapChaining *hashMap) { function extend (line 92) | void extend(HashMapChaining *hashMap) { function put (line 120) | void put(HashMapChaining *hashMap, int key, const char *val) { function removeItem (line 147) | void removeItem(HashMapChaining *hashMap, int key) { function print (line 171) | void print(HashMapChaining *hashMap) { function main (line 184) | int main() { FILE: ja/codes/c/chapter_hashing/hash_map_open_addressing.c type Pair (line 10) | typedef struct { type HashMapOpenAddressing (line 16) | typedef struct { function HashMapOpenAddressing (line 29) | HashMapOpenAddressing *newHashMapOpenAddressing() { function delHashMapOpenAddressing (line 44) | void delHashMapOpenAddressing(HashMapOpenAddressing *hashMap) { function hashFunc (line 58) | int hashFunc(HashMapOpenAddressing *hashMap, int key) { function loadFactor (line 63) | double loadFactor(HashMapOpenAddressing *hashMap) { function findBucket (line 68) | int findBucket(HashMapOpenAddressing *hashMap, int key) { function put (line 107) | void put(HashMapOpenAddressing *hashMap, int key, char *val) { function removeItem (line 134) | void removeItem(HashMapOpenAddressing *hashMap, int key) { function extend (line 148) | void extend(HashMapOpenAddressing *hashMap) { function print (line 169) | void print(HashMapOpenAddressing *hashMap) { function main (line 183) | int main() { FILE: ja/codes/c/chapter_hashing/simple_hash.c function addHash (line 10) | int addHash(char *key) { function mulHash (line 20) | int mulHash(char *key) { function xorHash (line 30) | int xorHash(char *key) { function rotHash (line 41) | int rotHash(char *key) { function main (line 52) | int main() { FILE: ja/codes/c/chapter_heap/my_heap.c type MaxHeap (line 12) | typedef struct { function MaxHeap (line 25) | MaxHeap *newMaxHeap(int nums[], int size) { function delMaxHeap (line 38) | void delMaxHeap(MaxHeap *maxHeap) { function left (line 44) | int left(MaxHeap *maxHeap, int i) { function right (line 49) | int right(MaxHeap *maxHeap, int i) { function parent (line 54) | int parent(MaxHeap *maxHeap, int i) { function swap (line 59) | void swap(MaxHeap *maxHeap, int i, int j) { function size (line 66) | int size(MaxHeap *maxHeap) { function isEmpty (line 71) | int isEmpty(MaxHeap *maxHeap) { function peek (line 76) | int peek(MaxHeap *maxHeap) { function push (line 81) | void push(MaxHeap *maxHeap, int val) { function pop (line 96) | int pop(MaxHeap *maxHeap) { function siftDown (line 115) | void siftDown(MaxHeap *maxHeap, int i) { function siftUp (line 139) | void siftUp(MaxHeap *maxHeap, int i) { FILE: ja/codes/c/chapter_heap/my_heap_test.c function main (line 10) | int main() { FILE: ja/codes/c/chapter_heap/top_k.c function pushMinHeap (line 10) | void pushMinHeap(MaxHeap *maxHeap, int val) { function popMinHeap (line 16) | int popMinHeap(MaxHeap *maxHeap) { function peekMinHeap (line 22) | int peekMinHeap(MaxHeap *maxHeap) { function main (line 62) | int main() { FILE: ja/codes/c/chapter_searching/binary_search.c function binarySearch (line 10) | int binarySearch(int *nums, int len, int target) { function binarySearchLCRO (line 28) | int binarySearchLCRO(int *nums, int len, int target) { function main (line 46) | int main() { FILE: ja/codes/c/chapter_searching/binary_search_edge.c function binarySearchInsertion (line 10) | int binarySearchInsertion(int *nums, int numSize, int target) { function binarySearchLeftEdge (line 25) | int binarySearchLeftEdge(int *nums, int numSize, int target) { function binarySearchRightEdge (line 37) | int binarySearchRightEdge(int *nums, int numSize, int target) { function main (line 51) | int main() { FILE: ja/codes/c/chapter_searching/binary_search_insertion.c function binarySearchInsertionSimple (line 10) | int binarySearchInsertionSimple(int *nums, int numSize, int target) { function binarySearchInsertion (line 27) | int binarySearchInsertion(int *nums, int numSize, int target) { function main (line 44) | int main() { FILE: ja/codes/c/chapter_searching/two_sum.c type HashTable (line 26) | typedef struct { function HashTable (line 33) | HashTable *find(HashTable *h, int key) { function insert (line 40) | void insert(HashTable **h, int key, int val) { function main (line 69) | int main() { FILE: ja/codes/c/chapter_sorting/bubble_sort.c function bubbleSort (line 10) | void bubbleSort(int nums[], int size) { function bubbleSortWithFlag (line 25) | void bubbleSortWithFlag(int nums[], int size) { function main (line 44) | int main() { FILE: ja/codes/c/chapter_sorting/bucket_sort.c function compare (line 12) | int compare(const void *a, const void *b) { function bucketSort (line 19) | void bucketSort(float nums[], int n) { function main (line 49) | int main() { FILE: ja/codes/c/chapter_sorting/counting_sort.c function countingSortNaive (line 11) | void countingSortNaive(int nums[], int size) { function countingSort (line 38) | void countingSort(int nums[], int size) { function main (line 73) | int main() { FILE: ja/codes/c/chapter_sorting/heap_sort.c function siftDown (line 10) | void siftDown(int nums[], int n, int i) { function heapSort (line 34) | void heapSort(int nums[], int n) { function main (line 51) | int main() { FILE: ja/codes/c/chapter_sorting/insertion_sort.c function insertionSort (line 10) | void insertionSort(int nums[], int size) { function main (line 26) | int main() { FILE: ja/codes/c/chapter_sorting/merge_sort.c function merge (line 10) | void merge(int *nums, int left, int mid, int right) { function mergeSort (line 41) | void mergeSort(int *nums, int left, int right) { function main (line 54) | int main() { FILE: ja/codes/c/chapter_sorting/quick_sort.c function swap (line 10) | void swap(int nums[], int i, int j) { function partition (line 17) | int partition(int nums[], int left, int right) { function quickSort (line 37) | void quickSort(int nums[], int left, int right) { function medianThree (line 52) | int medianThree(int nums[], int left, int mid, int right) { function partitionMedian (line 62) | int partitionMedian(int nums[], int left, int right) { function quickSortMedian (line 81) | void quickSortMedian(int nums[], int left, int right) { function quickSortTailCall (line 95) | void quickSortTailCall(int nums[], int left, int right) { function main (line 116) | int main() { FILE: ja/codes/c/chapter_sorting/radix_sort.c function digit (line 10) | int digit(int num, int exp) { function countingSortDigit (line 16) | void countingSortDigit(int nums[], int size, int exp) { function radixSort (line 49) | void radixSort(int nums[], int size) { function main (line 67) | int main() { FILE: ja/codes/c/chapter_sorting/selection_sort.c function selectionSort (line 10) | void selectionSort(int nums[], int n) { function main (line 27) | int main() { FILE: ja/codes/c/chapter_stack_and_queue/array_deque.c type ArrayDeque (line 10) | typedef struct { function ArrayDeque (line 18) | ArrayDeque *newArrayDeque(int capacity) { function delArrayDeque (line 28) | void delArrayDeque(ArrayDeque *deque) { function capacity (line 34) | int capacity(ArrayDeque *deque) { function size (line 39) | int size(ArrayDeque *deque) { function empty (line 44) | bool empty(ArrayDeque *deque) { function dequeIndex (line 49) | int dequeIndex(ArrayDeque *deque, int i) { function pushFirst (line 57) | void pushFirst(ArrayDeque *deque, int num) { function pushLast (line 71) | void pushLast(ArrayDeque *deque, int num) { function peekFirst (line 84) | int peekFirst(ArrayDeque *deque) { function peekLast (line 91) | int peekLast(ArrayDeque *deque) { function popFirst (line 99) | int popFirst(ArrayDeque *deque) { function popLast (line 108) | int popLast(ArrayDeque *deque) { function main (line 127) | int main() { FILE: ja/codes/c/chapter_stack_and_queue/array_queue.c type ArrayQueue (line 10) | typedef struct { function ArrayQueue (line 18) | ArrayQueue *newArrayQueue(int capacity) { function delArrayQueue (line 28) | void delArrayQueue(ArrayQueue *queue) { function capacity (line 34) | int capacity(ArrayQueue *queue) { function size (line 39) | int size(ArrayQueue *queue) { function empty (line 44) | bool empty(ArrayQueue *queue) { function peek (line 49) | int peek(ArrayQueue *queue) { function push (line 55) | void push(ArrayQueue *queue, int num) { function pop (line 69) | int pop(ArrayQueue *queue) { function main (line 90) | int main() { FILE: ja/codes/c/chapter_stack_and_queue/array_stack.c type ArrayStack (line 12) | typedef struct { function ArrayStack (line 18) | ArrayStack *newArrayStack() { function delArrayStack (line 27) | void delArrayStack(ArrayStack *stack) { function size (line 33) | int size(ArrayStack *stack) { function isEmpty (line 38) | bool isEmpty(ArrayStack *stack) { function push (line 43) | void push(ArrayStack *stack, int num) { function peek (line 53) | int peek(ArrayStack *stack) { function pop (line 62) | int pop(ArrayStack *stack) { function main (line 69) | int main() { FILE: ja/codes/c/chapter_stack_and_queue/linkedlist_deque.c type DoublyListNode (line 10) | typedef struct DoublyListNode { function DoublyListNode (line 17) | DoublyListNode *newDoublyListNode(int num) { function delDoublyListNode (line 26) | void delDoublyListNode(DoublyListNode *node) { type LinkedListDeque (line 31) | typedef struct { function LinkedListDeque (line 37) | LinkedListDeque *newLinkedListDeque() { function delLinkedListdeque (line 46) | void delLinkedListdeque(LinkedListDeque *deque) { function size (line 58) | int size(LinkedListDeque *deque) { function empty (line 63) | bool empty(LinkedListDeque *deque) { function push (line 68) | void push(LinkedListDeque *deque, int num, bool isFront) { function pushFirst (line 92) | void pushFirst(LinkedListDeque *deque, int num) { function pushLast (line 97) | void pushLast(LinkedListDeque *deque, int num) { function peekFirst (line 102) | int peekFirst(LinkedListDeque *deque) { function peekLast (line 108) | int peekLast(LinkedListDeque *deque) { function pop (line 114) | int pop(LinkedListDeque *deque, bool isFront) { function popFirst (line 145) | int popFirst(LinkedListDeque *deque) { function popLast (line 150) | int popLast(LinkedListDeque *deque) { function printLinkedListDeque (line 155) | void printLinkedListDeque(LinkedListDeque *deque) { function main (line 169) | int main() { FILE: ja/codes/c/chapter_stack_and_queue/linkedlist_queue.c type LinkedListQueue (line 10) | typedef struct { function LinkedListQueue (line 16) | LinkedListQueue *newLinkedListQueue() { function delLinkedListQueue (line 25) | void delLinkedListQueue(LinkedListQueue *queue) { function size (line 37) | int size(LinkedListQueue *queue) { function empty (line 42) | bool empty(LinkedListQueue *queue) { function push (line 47) | void push(LinkedListQueue *queue, int num) { function peek (line 64) | int peek(LinkedListQueue *queue) { function pop (line 70) | int pop(LinkedListQueue *queue) { function printLinkedListQueue (line 80) | void printLinkedListQueue(LinkedListQueue *queue) { function main (line 94) | int main() { FILE: ja/codes/c/chapter_stack_and_queue/linkedlist_stack.c type LinkedListStack (line 10) | typedef struct { function LinkedListStack (line 16) | LinkedListStack *newLinkedListStack() { function delLinkedListStack (line 24) | void delLinkedListStack(LinkedListStack *s) { function size (line 34) | int size(LinkedListStack *s) { function isEmpty (line 39) | bool isEmpty(LinkedListStack *s) { function push (line 44) | void push(LinkedListStack *s, int num) { function peek (line 53) | int peek(LinkedListStack *s) { function pop (line 62) | int pop(LinkedListStack *s) { function main (line 73) | int main() { FILE: ja/codes/c/chapter_tree/array_binary_tree.c type ArrayBinaryTree (line 10) | typedef struct { function ArrayBinaryTree (line 16) | ArrayBinaryTree *newArrayBinaryTree(int *arr, int arrSize) { function delArrayBinaryTree (line 25) | void delArrayBinaryTree(ArrayBinaryTree *abt) { function size (line 31) | int size(ArrayBinaryTree *abt) { function val (line 36) | int val(ArrayBinaryTree *abt, int i) { function left (line 44) | int left(int i) { function right (line 49) | int right(int i) { function parent (line 54) | int parent(int i) { function dfs (line 72) | void dfs(ArrayBinaryTree *abt, int i, char *order, int *res, int *index) { function main (line 117) | int main() { FILE: ja/codes/c/chapter_tree/avl_tree.c type AVLTree (line 10) | typedef struct { function AVLTree (line 15) | AVLTree *newAVLTree() { function delAVLTree (line 22) | void delAVLTree(AVLTree *tree) { function height (line 28) | int height(TreeNode *node) { function updateHeight (line 37) | void updateHeight(TreeNode *node) { function balanceFactor (line 49) | int balanceFactor(TreeNode *node) { function TreeNode (line 59) | TreeNode *rightRotate(TreeNode *node) { function TreeNode (line 74) | TreeNode *leftRotate(TreeNode *node) { function TreeNode (line 89) | TreeNode *rotate(TreeNode *node) { function TreeNode (line 119) | TreeNode *insertHelper(TreeNode *node, int val) { function insert (line 141) | void insert(AVLTree *tree, int val) { function TreeNode (line 146) | TreeNode *removeHelper(TreeNode *node, int val) { function removeItem (line 190) | void removeItem(AVLTree *tree, int val) { function TreeNode (line 195) | TreeNode *search(AVLTree *tree, int val) { function testInsert (line 214) | void testInsert(AVLTree *tree, int val) { function testRemove (line 220) | void testRemove(AVLTree *tree, int val) { function main (line 227) | int main() { FILE: ja/codes/c/chapter_tree/binary_search_tree.c type BinarySearchTree (line 10) | typedef struct { function BinarySearchTree (line 15) | BinarySearchTree *newBinarySearchTree() { function delBinarySearchTree (line 23) | void delBinarySearchTree(BinarySearchTree *bst) { function TreeNode (line 29) | TreeNode *getRoot(BinarySearchTree *bst) { function TreeNode (line 34) | TreeNode *search(BinarySearchTree *bst, int num) { function insert (line 54) | void insert(BinarySearchTree *bst, int num) { function removeItem (line 87) | void removeItem(BinarySearchTree *bst, int num) { function main (line 138) | int main() { FILE: ja/codes/c/chapter_tree/binary_tree.c function main (line 10) | int main() { FILE: ja/codes/c/chapter_tree/binary_tree_bfs.c function main (line 54) | int main() { FILE: ja/codes/c/chapter_tree/binary_tree_dfs.c function preOrder (line 15) | void preOrder(TreeNode *root, int *size) { function inOrder (line 25) | void inOrder(TreeNode *root, int *size) { function postOrder (line 35) | void postOrder(TreeNode *root, int *size) { function main (line 45) | int main() { FILE: ja/codes/c/utils/common_test.c function testListNode (line 9) | void testListNode() { function testTreeNode (line 16) | void testTreeNode() { function main (line 29) | int main(int argc, char *argv[]) { FILE: ja/codes/c/utils/list_node.h type ListNode (line 15) | typedef struct ListNode { function ListNode (line 21) | ListNode *newListNode(int val) { function ListNode (line 30) | ListNode *arrToLinkedList(const int *arr, size_t size) { function freeMemoryLinkedList (line 45) | void freeMemoryLinkedList(ListNode *cur) { FILE: ja/codes/c/utils/print_util.h function printArray (line 22) | void printArray(int arr[], int size) { function printArrayFloat (line 35) | void printArrayFloat(float arr[], int size) { function printLinkedList (line 48) | void printLinkedList(ListNode *node) { type Trunk (line 59) | typedef struct Trunk { function Trunk (line 64) | Trunk *newTrunk(Trunk *prev, char *str) { function showTrunks (line 72) | void showTrunks(Trunk *trunk) { function printTreeHelper (line 85) | void printTreeHelper(TreeNode *node, Trunk *prev, bool isRight) { function printTree (line 113) | void printTree(TreeNode *root) { function printHeap (line 118) | void printHeap(int arr[], int size) { FILE: ja/codes/c/utils/tree_node.h type TreeNode (line 19) | typedef struct TreeNode { function TreeNode (line 27) | TreeNode *newTreeNode(int val) { function TreeNode (line 55) | TreeNode *arrayToTreeDFS(int *arr, int size, int i) { function TreeNode (line 67) | TreeNode *arrayToTree(int *arr, int size) { function treeToArrayDFS (line 72) | void treeToArrayDFS(TreeNode *root, int i, int *res, int *size) { function freeMemoryTree (line 95) | void freeMemoryTree(TreeNode *root) { FILE: ja/codes/c/utils/uthash.h type UT_hash_bucket (line 1072) | typedef struct UT_hash_bucket { type UT_hash_table (line 1096) | typedef struct UT_hash_table { type UT_hash_handle (line 1129) | typedef struct UT_hash_handle { FILE: ja/codes/c/utils/vector.h type vector (line 15) | typedef struct vector { function vector (line 23) | vector *newVector() { function vector (line 33) | vector *_newVector(int size, void *elem, int elemSize) { function delVector (line 48) | void delVector(vector *v) { function vectorPushback (line 67) | void vectorPushback(vector *v, void *elem, int elemSize) { function vectorPopback (line 78) | void vectorPopback(vector *v) { function vectorClear (line 86) | void vectorClear(vector *v) { function vectorSize (line 95) | int vectorSize(vector *v) { function vectorSet (line 120) | void vectorSet(vector *v, int pos, void *elem, int elemSize) { function vectorExpand (line 132) | void vectorExpand(vector *v) { function vectorShrink (line 138) | void vectorShrink(vector *v) { function vectorInsert (line 144) | void vectorInsert(vector *v, int pos, void *elem, int elemSize) { function vectorErase (line 158) | void vectorErase(vector *v, int pos) { function vectorSwap (line 169) | void vectorSwap(vector *v, int i, int j) { function vectorEmpty (line 176) | bool vectorEmpty(vector *v) { function vectorFull (line 181) | bool vectorFull(vector *v) { function vectorEqual (line 186) | bool vectorEqual(vector *v1, vector *v2) { function vectorSort (line 203) | void vectorSort(vector *v, int (*cmp)(const void *, const void *)) { function printVector (line 209) | void printVector(vector *v, void (*printFunc)(vector *v, void *p)) { function printVectorMatrix (line 239) | void printVectorMatrix(vector *vv, void (*printFunc)(vector *v, void *p)) { FILE: ja/codes/c/utils/vertex.h type Vertex (line 15) | typedef struct { function Vertex (line 20) | Vertex *newVertex(int val) { function Vertex (line 28) | Vertex **valsToVets(int *vals, int size) { FILE: ja/codes/cpp/chapter_array_and_linkedlist/array.cpp function randomAccess (line 10) | int randomAccess(int *nums, int size) { function insert (line 33) | void insert(int *nums, int size, int num, int index) { function remove (line 43) | void remove(int *nums, int size, int index) { function traverse (line 51) | void traverse(int *nums, int size) { function find (line 60) | int find(int *nums, int size, int target) { function main (line 69) | int main() { FILE: ja/codes/cpp/chapter_array_and_linkedlist/linked_list.cpp function insert (line 10) | void insert(ListNode *n0, ListNode *P) { function remove (line 17) | void remove(ListNode *n0) { function ListNode (line 29) | ListNode *access(ListNode *head, int index) { function find (line 39) | int find(ListNode *head, int target) { function main (line 51) | int main() { FILE: ja/codes/cpp/chapter_array_and_linkedlist/list.cpp function main (line 10) | int main() { FILE: ja/codes/cpp/chapter_array_and_linkedlist/my_list.cpp class MyList (line 10) | class MyList { method MyList (line 19) | MyList() { method size (line 29) | int size() { method capacity (line 34) | int capacity() { method get (line 39) | int get(int index) { method set (line 47) | void set(int index, int num) { method add (line 54) | void add(int num) { method insert (line 64) | void insert(int index, int num) { method remove (line 80) | int remove(int index) { method extendCapacity (line 95) | void extendCapacity() { method toVector (line 110) | vector toVector() { function main (line 121) | int main() { FILE: ja/codes/cpp/chapter_backtracking/n_queens.cpp function backtrack (line 10) | void backtrack(int row, int n, vector> &state, vector>> nQueens(int n) { function main (line 51) | int main() { FILE: ja/codes/cpp/chapter_backtracking/permutations_i.cpp function backtrack (line 10) | void backtrack(vector &state, const vector &choices, vector> permutationsI(vector nums) { function main (line 43) | int main() { FILE: ja/codes/cpp/chapter_backtracking/permutations_ii.cpp function backtrack (line 10) | void backtrack(vector &state, const vector &choices, vector> permutationsII(vector nums) { function main (line 45) | int main() { FILE: ja/codes/cpp/chapter_backtracking/preorder_traversal_i_compact.cpp function preOrder (line 12) | void preOrder(TreeNode *root) { function main (line 25) | int main() { FILE: ja/codes/cpp/chapter_backtracking/preorder_traversal_ii_compact.cpp function preOrder (line 13) | void preOrder(TreeNode *root) { function main (line 30) | int main() { FILE: ja/codes/cpp/chapter_backtracking/preorder_traversal_iii_compact.cpp function preOrder (line 13) | void preOrder(TreeNode *root) { function main (line 31) | int main() { FILE: ja/codes/cpp/chapter_backtracking/preorder_traversal_iii_template.cpp function isSolution (line 10) | bool isSolution(vector &state) { function recordSolution (line 15) | void recordSolution(vector &state, vector... function isValid (line 20) | bool isValid(vector &state, TreeNode *choice) { function makeChoice (line 25) | void makeChoice(vector &state, TreeNode *choice) { function undoChoice (line 30) | void undoChoice(vector &state, TreeNode *choice) { function backtrack (line 35) | void backtrack(vector &state, vector &choices, v... function main (line 57) | int main() { FILE: ja/codes/cpp/chapter_backtracking/subset_sum_i.cpp function backtrack (line 10) | void backtrack(vector &state, int target, vector &choices, int... function subsetSumI (line 34) | vector> subsetSumI(vector &nums, int target) { function main (line 44) | int main() { FILE: ja/codes/cpp/chapter_backtracking/subset_sum_i_naive.cpp function backtrack (line 10) | void backtrack(vector &state, int target, int total, vector &c... function subsetSumINaive (line 32) | vector> subsetSumINaive(vector &nums, int target) { function main (line 41) | int main() { FILE: ja/codes/cpp/chapter_backtracking/subset_sum_ii.cpp function backtrack (line 10) | void backtrack(vector &state, int target, vector &choices, int... function subsetSumII (line 39) | vector> subsetSumII(vector &nums, int target) { function main (line 49) | int main() { FILE: ja/codes/cpp/chapter_computational_complexity/iteration.cpp function forLoop (line 10) | int forLoop(int n) { function whileLoop (line 20) | int whileLoop(int n) { function whileLoopII (line 32) | int whileLoopII(int n) { function string (line 46) | string nestedForLoop(int n) { function main (line 59) | int main() { FILE: ja/codes/cpp/chapter_computational_complexity/recursion.cpp function recur (line 10) | int recur(int n) { function forLoopRecur (line 21) | int forLoopRecur(int n) { function tailRecur (line 41) | int tailRecur(int n, int res) { function fib (line 50) | int fib(int n) { function main (line 61) | int main() { FILE: ja/codes/cpp/chapter_computational_complexity/space_complexity.cpp function func (line 10) | int func() { function constant (line 16) | void constant(int n) { function linear (line 33) | void linear(int n) { function linearRecur (line 49) | void linearRecur(int n) { function quadratic (line 57) | void quadratic(int n) { function quadraticRecur (line 70) | int quadraticRecur(int n) { function TreeNode (line 79) | TreeNode *buildTree(int n) { function main (line 89) | int main() { FILE: ja/codes/cpp/chapter_computational_complexity/time_complexity.cpp function constant (line 10) | int constant(int n) { function linear (line 19) | int linear(int n) { function arrayTraversal (line 27) | int arrayTraversal(vector &nums) { function quadratic (line 37) | int quadratic(int n) { function bubbleSort (line 49) | int bubbleSort(vector &nums) { function exponential (line 68) | int exponential(int n) { function expRecur (line 82) | int expRecur(int n) { function logarithmic (line 89) | int logarithmic(int n) { function logRecur (line 99) | int logRecur(int n) { function linearLogRecur (line 106) | int linearLogRecur(int n) { function factorialRecur (line 117) | int factorialRecur(int n) { function main (line 129) | int main() { FILE: ja/codes/cpp/chapter_computational_complexity/worst_best_time_complexity.cpp function randomNumbers (line 10) | vector randomNumbers(int n) { function findOne (line 24) | int findOne(vector &nums) { function main (line 35) | int main() { FILE: ja/codes/cpp/chapter_divide_and_conquer/binary_search_recur.cpp function dfs (line 10) | int dfs(vector &nums, int target, int i, int j) { function binarySearch (line 30) | int binarySearch(vector &nums, int target) { function main (line 37) | int main() { FILE: ja/codes/cpp/chapter_divide_and_conquer/build_tree.cpp function TreeNode (line 10) | TreeNode *dfs(vector &preorder, unordered_map &inorderMap... function TreeNode (line 27) | TreeNode *buildTree(vector &preorder, vector &inorder) { function main (line 38) | int main() { FILE: ja/codes/cpp/chapter_divide_and_conquer/hanota.cpp function move (line 10) | void move(vector &src, vector &tar) { function dfs (line 19) | void dfs(int i, vector &src, vector &buf, vector &tar) { function solveHanota (line 34) | void solveHanota(vector &A, vector &B, vector &C) { function main (line 41) | int main() { FILE: ja/codes/cpp/chapter_dynamic_programming/climbing_stairs_backtrack.cpp function backtrack (line 11) | void backtrack(vector &choices, int state, int n, vector &res) { function climbingStairsBacktrack (line 27) | int climbingStairsBacktrack(int n) { function main (line 36) | int main() { FILE: ja/codes/cpp/chapter_dynamic_programming/climbing_stairs_constraint_dp.cpp function climbingStairsConstraintDP (line 10) | int climbingStairsConstraintDP(int n) { function main (line 30) | int main() { FILE: ja/codes/cpp/chapter_dynamic_programming/climbing_stairs_dfs.cpp function dfs (line 10) | int dfs(int i) { function climbingStairsDFS (line 20) | int climbingStairsDFS(int n) { function main (line 25) | int main() { FILE: ja/codes/cpp/chapter_dynamic_programming/climbing_stairs_dfs_mem.cpp function dfs (line 10) | int dfs(int i, vector &mem) { function climbingStairsDFSMem (line 25) | int climbingStairsDFSMem(int n) { function main (line 32) | int main() { FILE: ja/codes/cpp/chapter_dynamic_programming/climbing_stairs_dp.cpp function climbingStairsDP (line 10) | int climbingStairsDP(int n) { function climbingStairsDPComp (line 26) | int climbingStairsDPComp(int n) { function main (line 39) | int main() { FILE: ja/codes/cpp/chapter_dynamic_programming/coin_change.cpp function coinChangeDP (line 10) | int coinChangeDP(vector &coins, int amt) { function coinChangeDPComp (line 35) | int coinChangeDPComp(vector &coins, int amt) { function main (line 57) | int main() { FILE: ja/codes/cpp/chapter_dynamic_programming/coin_change_ii.cpp function coinChangeIIDP (line 10) | int coinChangeIIDP(vector &coins, int amt) { function coinChangeIIDPComp (line 34) | int coinChangeIIDPComp(vector &coins, int amt) { function main (line 55) | int main() { FILE: ja/codes/cpp/chapter_dynamic_programming/edit_distance.cpp function editDistanceDFS (line 10) | int editDistanceDFS(string s, string t, int i, int j) { function editDistanceDFSMem (line 32) | int editDistanceDFSMem(string s, string t, vector> &mem, int... function editDistanceDP (line 58) | int editDistanceDP(string s, string t) { function editDistanceDPComp (line 84) | int editDistanceDPComp(string s, string t) { function main (line 113) | int main() { FILE: ja/codes/cpp/chapter_dynamic_programming/knapsack.cpp function knapsackDFS (line 8) | int knapsackDFS(vector &wgt, vector &val, int i, int c) { function knapsackDFSMem (line 25) | int knapsackDFSMem(vector &wgt, vector &val, vector &wgt, vector &val, int cap) { function knapsackDPComp (line 67) | int knapsackDPComp(vector &wgt, vector &val, int cap) { function main (line 85) | int main() { FILE: ja/codes/cpp/chapter_dynamic_programming/min_cost_climbing_stairs_dp.cpp function minCostClimbingStairsDP (line 10) | int minCostClimbingStairsDP(vector &cost) { function minCostClimbingStairsDPComp (line 27) | int minCostClimbingStairsDPComp(vector &cost) { function main (line 41) | int main() { FILE: ja/codes/cpp/chapter_dynamic_programming/min_path_sum.cpp function minPathSumDFS (line 10) | int minPathSumDFS(vector> &grid, int i, int j) { function minPathSumDFSMem (line 27) | int minPathSumDFSMem(vector> &grid, vector> &mem... function minPathSumDP (line 49) | int minPathSumDP(vector> &grid) { function minPathSumDPComp (line 72) | int minPathSumDPComp(vector> &grid) { function main (line 94) | int main() { FILE: ja/codes/cpp/chapter_dynamic_programming/unbounded_knapsack.cpp function unboundedKnapsackDP (line 10) | int unboundedKnapsackDP(vector &wgt, vector &val, int cap) { function unboundedKnapsackDPComp (line 30) | int unboundedKnapsackDPComp(vector &wgt, vector &val, int cap) { function main (line 50) | int main() { FILE: ja/codes/cpp/chapter_graph/graph_adjacency_list.cpp class GraphAdjList (line 10) | class GraphAdjList { method remove (line 16) | void remove(vector &vec, Vertex *vet) { method GraphAdjList (line 26) | GraphAdjList(const vector> &edges) { method size (line 36) | int size() { method addEdge (line 41) | void addEdge(Vertex *vet1, Vertex *vet2) { method removeEdge (line 50) | void removeEdge(Vertex *vet1, Vertex *vet2) { method addVertex (line 59) | void addVertex(Vertex *vet) { method removeVertex (line 67) | void removeVertex(Vertex *vet) { method print (line 79) | void print() { FILE: ja/codes/cpp/chapter_graph/graph_adjacency_list_test.cpp function main (line 10) | int main() { FILE: ja/codes/cpp/chapter_graph/graph_adjacency_matrix.cpp class GraphAdjMat (line 10) | class GraphAdjMat { method GraphAdjMat (line 16) | GraphAdjMat(const vector &vertices, const vector> &ed... method size (line 29) | int size() const { method addVertex (line 34) | void addVertex(int val) { method removeVertex (line 47) | void removeVertex(int index) { method addEdge (line 63) | void addEdge(int i, int j) { method removeEdge (line 75) | void removeEdge(int i, int j) { method print (line 85) | void print() { function main (line 94) | int main() { FILE: ja/codes/cpp/chapter_graph/graph_bfs.cpp function graphBFS (line 12) | vector graphBFS(GraphAdjList &graph, Vertex *startVet) { function main (line 38) | int main() { FILE: ja/codes/cpp/chapter_graph/graph_dfs.cpp function dfs (line 11) | void dfs(GraphAdjList &graph, unordered_set &visited, vector graphDFS(GraphAdjList &graph, Vertex *startVet) { function main (line 35) | int main() { FILE: ja/codes/cpp/chapter_greedy/coin_change_greedy.cpp function coinChangeGreedy (line 10) | int coinChangeGreedy(vector &coins, int amt) { function main (line 29) | int main() { FILE: ja/codes/cpp/chapter_greedy/fractional_knapsack.cpp class Item (line 10) | class Item { method Item (line 15) | Item(int w, int v) : w(w), v(v) { function fractionalKnapsack (line 20) | double fractionalKnapsack(vector &wgt, vector &val, int cap) { function main (line 46) | int main() { FILE: ja/codes/cpp/chapter_greedy/max_capacity.cpp function maxCapacity (line 10) | int maxCapacity(vector &ht) { function main (line 31) | int main() { FILE: ja/codes/cpp/chapter_greedy/max_product_cutting.cpp function maxProductCutting (line 10) | int maxProductCutting(int n) { function main (line 31) | int main() { FILE: ja/codes/cpp/chapter_hashing/array_hash_map.cpp type Pair (line 10) | struct Pair { method Pair (line 14) | Pair(int key, string val) { class ArrayHashMap (line 21) | class ArrayHashMap { method ArrayHashMap (line 26) | ArrayHashMap() { method hashFunc (line 40) | int hashFunc(int key) { method string (line 46) | string get(int key) { method put (line 55) | void put(int key, string val) { method remove (line 62) | void remove(int key) { method pairSet (line 70) | vector pairSet() { method keySet (line 81) | vector keySet() { method valueSet (line 92) | vector valueSet() { method print (line 103) | void print() { FILE: ja/codes/cpp/chapter_hashing/array_hash_map_test.cpp function main (line 10) | int main() { FILE: ja/codes/cpp/chapter_hashing/built_in_hash.cpp function main (line 10) | int main() { FILE: ja/codes/cpp/chapter_hashing/hash_map.cpp function main (line 10) | int main() { FILE: ja/codes/cpp/chapter_hashing/hash_map_chaining.cpp class HashMapChaining (line 10) | class HashMapChaining { method HashMapChaining (line 20) | HashMapChaining() : size(0), capacity(4), loadThres(2.0 / 3.0), extend... method hashFunc (line 35) | int hashFunc(int key) { method loadFactor (line 40) | double loadFactor() { method string (line 45) | string get(int key) { method put (line 58) | void put(int key, string val) { method remove (line 77) | void remove(int key) { method extend (line 93) | void extend() { method print (line 112) | void print() { function main (line 124) | int main() { FILE: ja/codes/cpp/chapter_hashing/hash_map_open_addressing.cpp class HashMapOpenAddressing (line 10) | class HashMapOpenAddressing { method HashMapOpenAddressing (line 21) | HashMapOpenAddressing() : size(0), buckets(capacity, nullptr) { method hashFunc (line 35) | int hashFunc(int key) { method loadFactor (line 40) | double loadFactor() { method findBucket (line 45) | int findBucket(int key) { method string (line 72) | string get(int key) { method put (line 84) | void put(int key, string val) { method remove (line 102) | void remove(int key) { method extend (line 114) | void extend() { method print (line 131) | void print() { function main (line 145) | int main() { FILE: ja/codes/cpp/chapter_hashing/simple_hash.cpp function addHash (line 10) | int addHash(string key) { function mulHash (line 20) | int mulHash(string key) { function xorHash (line 30) | int xorHash(string key) { function rotHash (line 40) | int rotHash(string key) { function main (line 50) | int main() { FILE: ja/codes/cpp/chapter_heap/heap.cpp function testPush (line 9) | void testPush(priority_queue &heap, int val) { function testPop (line 15) | void testPop(priority_queue &heap) { function main (line 23) | int main() { FILE: ja/codes/cpp/chapter_heap/my_heap.cpp class MaxHeap (line 10) | class MaxHeap { method left (line 16) | int left(int i) { method right (line 21) | int right(int i) { method parent (line 26) | int parent(int i) { method siftUp (line 31) | void siftUp(int i) { method siftDown (line 46) | void siftDown(int i) { method MaxHeap (line 65) | MaxHeap(vector nums) { method size (line 75) | int size() { method isEmpty (line 80) | bool isEmpty() { method peek (line 85) | int peek() { method push (line 90) | void push(int val) { method pop (line 98) | void pop() { method print (line 112) | void print() { function main (line 123) | int main() { FILE: ja/codes/cpp/chapter_heap/top_k.cpp function topKHeap (line 10) | priority_queue, greater> topKHeap(vector &num... function main (line 29) | int main() { FILE: ja/codes/cpp/chapter_searching/binary_search.cpp function binarySearch (line 10) | int binarySearch(vector &nums, int target) { function binarySearchLCRO (line 28) | int binarySearchLCRO(vector &nums, int target) { function main (line 46) | int main() { FILE: ja/codes/cpp/chapter_searching/binary_search_edge.cpp function binarySearchInsertion (line 10) | int binarySearchInsertion(const vector &nums, int target) { function binarySearchLeftEdge (line 25) | int binarySearchLeftEdge(vector &nums, int target) { function binarySearchRightEdge (line 37) | int binarySearchRightEdge(vector &nums, int target) { function main (line 51) | int main() { FILE: ja/codes/cpp/chapter_searching/binary_search_insertion.cpp function binarySearchInsertionSimple (line 10) | int binarySearchInsertionSimple(vector &nums, int target) { function binarySearchInsertion (line 27) | int binarySearchInsertion(vector &nums, int target) { function main (line 44) | int main() { FILE: ja/codes/cpp/chapter_searching/hashing_search.cpp function hashingSearchArray (line 10) | int hashingSearchArray(unordered_map map, int target) { function ListNode (line 19) | ListNode *hashingSearchLinkedList(unordered_map map, in... function main (line 28) | int main() { FILE: ja/codes/cpp/chapter_searching/linear_search.cpp function linearSearchArray (line 10) | int linearSearchArray(vector &nums, int target) { function ListNode (line 22) | ListNode *linearSearchLinkedList(ListNode *head, int target) { function main (line 35) | int main() { FILE: ja/codes/cpp/chapter_searching/two_sum.cpp function twoSumBruteForce (line 10) | vector twoSumBruteForce(vector &nums, int target) { function twoSumHashTable (line 23) | vector twoSumHashTable(vector &nums, int target) { function main (line 38) | int main() { FILE: ja/codes/cpp/chapter_sorting/bubble_sort.cpp function bubbleSort (line 10) | void bubbleSort(vector &nums) { function bubbleSortWithFlag (line 25) | void bubbleSortWithFlag(vector &nums) { function main (line 44) | int main() { FILE: ja/codes/cpp/chapter_sorting/bucket_sort.cpp function bucketSort (line 10) | void bucketSort(vector &nums) { function main (line 36) | int main() { FILE: ja/codes/cpp/chapter_sorting/counting_sort.cpp function countingSortNaive (line 11) | void countingSortNaive(vector &nums) { function countingSort (line 34) | void countingSort(vector &nums) { function main (line 65) | int main() { FILE: ja/codes/cpp/chapter_sorting/heap_sort.cpp function siftDown (line 10) | void siftDown(vector &nums, int n, int i) { function heapSort (line 32) | void heapSort(vector &nums) { function main (line 47) | int main() { FILE: ja/codes/cpp/chapter_sorting/insertion_sort.cpp function insertionSort (line 10) | void insertionSort(vector &nums) { function main (line 24) | int main() { FILE: ja/codes/cpp/chapter_sorting/merge_sort.cpp function merge (line 10) | void merge(vector &nums, int left, int mid, int right) { function mergeSort (line 37) | void mergeSort(vector &nums, int left, int right) { function main (line 50) | int main() { FILE: ja/codes/cpp/chapter_sorting/quick_sort.cpp class QuickSort (line 10) | class QuickSort { method partition (line 13) | static int partition(vector &nums, int left, int right) { method quickSort (line 29) | static void quickSort(vector &nums, int left, int right) { class QuickSortMedian (line 42) | class QuickSortMedian { method medianThree (line 45) | static int medianThree(vector &nums, int left, int mid, int right) { method partition (line 55) | static int partition(vector &nums, int left, int right) { method quickSort (line 75) | static void quickSort(vector &nums, int left, int right) { class QuickSortTailCall (line 88) | class QuickSortTailCall { method partition (line 91) | static int partition(vector &nums, int left, int right) { method quickSort (line 107) | static void quickSort(vector &nums, int left, int right) { function main (line 125) | int main() { FILE: ja/codes/cpp/chapter_sorting/radix_sort.cpp function digit (line 10) | int digit(int num, int exp) { function countingSortDigit (line 16) | void countingSortDigit(vector &nums, int exp) { function radixSort (line 43) | void radixSort(vector &nums) { function main (line 56) | int main() { FILE: ja/codes/cpp/chapter_sorting/selection_sort.cpp function selectionSort (line 10) | void selectionSort(vector &nums) { function main (line 26) | int main() { FILE: ja/codes/cpp/chapter_stack_and_queue/array_deque.cpp class ArrayDeque (line 10) | class ArrayDeque { method ArrayDeque (line 18) | ArrayDeque(int capacity) { method capacity (line 24) | int capacity() { method size (line 29) | int size() { method isEmpty (line 34) | bool isEmpty() { method index (line 39) | int index(int i) { method pushFirst (line 47) | void pushFirst(int num) { method pushLast (line 61) | void pushLast(int num) { method popFirst (line 74) | int popFirst() { method popLast (line 83) | int popLast() { method peekFirst (line 90) | int peekFirst() { method peekLast (line 97) | int peekLast() { method toVector (line 106) | vector toVector() { function main (line 117) | int main() { FILE: ja/codes/cpp/chapter_stack_and_queue/array_queue.cpp class ArrayQueue (line 10) | class ArrayQueue { method ArrayQueue (line 18) | ArrayQueue(int capacity) { method capacity (line 30) | int capacity() { method size (line 35) | int size() { method isEmpty (line 40) | bool isEmpty() { method push (line 45) | void push(int num) { method pop (line 59) | int pop() { method peek (line 68) | int peek() { method toVector (line 75) | vector toVector() { function main (line 86) | int main() { FILE: ja/codes/cpp/chapter_stack_and_queue/array_stack.cpp class ArrayStack (line 10) | class ArrayStack { method size (line 16) | int size() { method isEmpty (line 21) | bool isEmpty() { method push (line 26) | void push(int num) { method pop (line 31) | int pop() { method top (line 38) | int top() { method toVector (line 45) | vector toVector() { function main (line 51) | int main() { FILE: ja/codes/cpp/chapter_stack_and_queue/deque.cpp function main (line 10) | int main() { FILE: ja/codes/cpp/chapter_stack_and_queue/linkedlist_deque.cpp type DoublyListNode (line 10) | struct DoublyListNode { method DoublyListNode (line 14) | DoublyListNode(int val) : val(val), prev(nullptr), next(nullptr) { class LinkedListDeque (line 19) | class LinkedListDeque { method LinkedListDeque (line 26) | LinkedListDeque() : front(nullptr), rear(nullptr) { method size (line 41) | int size() { method isEmpty (line 46) | bool isEmpty() { method push (line 51) | void push(int num, bool isFront) { method pushFirst (line 73) | void pushFirst(int num) { method pushLast (line 78) | void pushLast(int num) { method pop (line 83) | int pop(bool isFront) { method popFirst (line 115) | int popFirst() { method popLast (line 120) | int popLast() { method peekFirst (line 125) | int peekFirst() { method peekLast (line 132) | int peekLast() { method toVector (line 139) | vector toVector() { function main (line 151) | int main() { FILE: ja/codes/cpp/chapter_stack_and_queue/linkedlist_queue.cpp class LinkedListQueue (line 10) | class LinkedListQueue { method LinkedListQueue (line 16) | LinkedListQueue() { method size (line 28) | int size() { method isEmpty (line 33) | bool isEmpty() { method push (line 38) | void push(int num) { method pop (line 55) | int pop() { method peek (line 67) | int peek() { method toVector (line 74) | vector toVector() { function main (line 86) | int main() { FILE: ja/codes/cpp/chapter_stack_and_queue/linkedlist_stack.cpp class LinkedListStack (line 10) | class LinkedListStack { method LinkedListStack (line 16) | LinkedListStack() { method size (line 27) | int size() { method isEmpty (line 32) | bool isEmpty() { method push (line 37) | void push(int num) { method pop (line 45) | int pop() { method top (line 56) | int top() { method toVector (line 63) | vector toVector() { function main (line 75) | int main() { FILE: ja/codes/cpp/chapter_stack_and_queue/queue.cpp function main (line 10) | int main() { FILE: ja/codes/cpp/chapter_stack_and_queue/stack.cpp function main (line 10) | int main() { FILE: ja/codes/cpp/chapter_tree/array_binary_tree.cpp class ArrayBinaryTree (line 10) | class ArrayBinaryTree { method ArrayBinaryTree (line 13) | ArrayBinaryTree(vector arr) { method size (line 18) | int size() { method val (line 23) | int val(int i) { method left (line 31) | int left(int i) { method right (line 36) | int right(int i) { method parent (line 41) | int parent(int i) { method levelOrder (line 46) | vector levelOrder() { method preOrder (line 57) | vector preOrder() { method inOrder (line 64) | vector inOrder() { method postOrder (line 71) | vector postOrder() { method dfs (line 81) | void dfs(int i, string order, vector &res) { function main (line 100) | int main() { FILE: ja/codes/cpp/chapter_tree/avl_tree.cpp class AVLTree (line 10) | class AVLTree { method updateHeight (line 13) | void updateHeight(TreeNode *node) { method TreeNode (line 19) | TreeNode *rightRotate(TreeNode *node) { method TreeNode (line 33) | TreeNode *leftRotate(TreeNode *node) { method TreeNode (line 47) | TreeNode *rotate(TreeNode *node) { method TreeNode (line 77) | TreeNode *insertHelper(TreeNode *node, int val) { method TreeNode (line 95) | TreeNode *removeHelper(TreeNode *node, int val) { method height (line 138) | int height(TreeNode *node) { method balanceFactor (line 144) | int balanceFactor(TreeNode *node) { method insert (line 153) | void insert(int val) { method remove (line 158) | void remove(int val) { method TreeNode (line 163) | TreeNode *search(int val) { method AVLTree (line 182) | AVLTree() : root(nullptr) { function testInsert (line 191) | void testInsert(AVLTree &tree, int val) { function testRemove (line 197) | void testRemove(AVLTree &tree, int val) { function main (line 204) | int main() { FILE: ja/codes/cpp/chapter_tree/binary_search_tree.cpp class BinarySearchTree (line 10) | class BinarySearchTree { method BinarySearchTree (line 16) | BinarySearchTree() { method TreeNode (line 27) | TreeNode *getRoot() { method TreeNode (line 32) | TreeNode *search(int num) { method insert (line 51) | void insert(int num) { method remove (line 80) | void remove(int num) { function main (line 135) | int main() { FILE: ja/codes/cpp/chapter_tree/binary_tree.cpp function main (line 10) | int main() { FILE: ja/codes/cpp/chapter_tree/binary_tree_bfs.cpp function levelOrder (line 10) | vector levelOrder(TreeNode *root) { function main (line 29) | int main() { FILE: ja/codes/cpp/chapter_tree/binary_tree_dfs.cpp function preOrder (line 13) | void preOrder(TreeNode *root) { function inOrder (line 23) | void inOrder(TreeNode *root) { function postOrder (line 33) | void postOrder(TreeNode *root) { function main (line 43) | int main() { FILE: ja/codes/cpp/utils/list_node.hpp type ListNode (line 15) | struct ListNode { method ListNode (line 18) | ListNode(int x) : val(x), next(nullptr) { function ListNode (line 23) | ListNode *vecToLinkedList(vector list) { method ListNode (line 18) | ListNode(int x) : val(x), next(nullptr) { function freeMemoryLinkedList (line 34) | void freeMemoryLinkedList(ListNode *cur) { FILE: ja/codes/cpp/utils/print_utils.hpp function vecFind (line 17) | int vecFind(const vector &vec, T ele) { function string (line 28) | string strJoin(const string &delim, const T &vec) { function string (line 40) | string strRepeat(string str, int n) { function printArray (line 48) | void printArray(T *arr, int n) { function string (line 60) | string getVectorString(vector &list) { function printVector (line 65) | void printVector(vector list) { function printVectorMatrix (line 70) | void printVectorMatrix(vector> &matrix) { function printLinkedList (line 78) | void printLinkedList(ListNode *head) { type Trunk (line 88) | struct Trunk { method Trunk (line 91) | Trunk(Trunk *prev, string str) { function showTrunks (line 97) | void showTrunks(Trunk *p) { function printTree (line 111) | void printTree(TreeNode *root, Trunk *prev, bool isRight) { function printTree (line 143) | void printTree(TreeNode *root) { function printStack (line 148) | void printStack(stack stk) { function printQueue (line 170) | void printQueue(queue queue) { function printDeque (line 186) | void printDeque(deque deque) { function printHashMap (line 203) | void printHashMap(unordered_map map) { function S (line 210) | S &Container(priority_queue &pq) { function printHeap (line 220) | void printHeap(priority_queue &heap) { FILE: ja/codes/cpp/utils/tree_node.hpp type TreeNode (line 15) | struct TreeNode { method TreeNode (line 21) | TreeNode() = default; method TreeNode (line 22) | explicit TreeNode(int x, TreeNode *parent = nullptr) : val(x), parent(... function TreeNode (line 43) | TreeNode *vectorToTreeDFS(vector &arr, int i) { method TreeNode (line 21) | TreeNode() = default; method TreeNode (line 22) | explicit TreeNode(int x, TreeNode *parent = nullptr) : val(x), parent(... function TreeNode (line 54) | TreeNode *vectorToTree(vector arr) { method TreeNode (line 21) | TreeNode() = default; method TreeNode (line 22) | explicit TreeNode(int x, TreeNode *parent = nullptr) : val(x), parent(... function treeToVecorDFS (line 59) | void treeToVecorDFS(TreeNode *root, int i, vector &res) { function treeToVecor (line 71) | vector treeToVecor(TreeNode *root) { function freeMemoryTree (line 78) | void freeMemoryTree(TreeNode *root) { FILE: ja/codes/cpp/utils/vertex.hpp type Vertex (line 14) | struct Vertex { method Vertex (line 16) | Vertex(int x) : val(x) { function valsToVets (line 21) | vector valsToVets(vector vals) { function vetsToVals (line 30) | vector vetsToVals(vector vets) { FILE: ja/codes/csharp/chapter_array_and_linkedlist/array.cs class array (line 7) | public class array { method RandomAccess (line 9) | int RandomAccess(int[] nums) { method Extend (line 19) | int[] Extend(int[] nums, int enlarge) { method Insert (line 31) | void Insert(int[] nums, int num, int index) { method Remove (line 41) | void Remove(int[] nums, int index) { method Traverse (line 49) | void Traverse(int[] nums) { method Find (line 62) | int Find(int[] nums, int target) { method ToString (line 71) | string ToString(int[] nums) { method Test (line 76) | [Test] FILE: ja/codes/csharp/chapter_array_and_linkedlist/linked_list.cs class linked_list (line 7) | public class linked_list { method Insert (line 9) | void Insert(ListNode n0, ListNode P) { method Remove (line 16) | void Remove(ListNode n0) { method Access (line 26) | ListNode? Access(ListNode? head, int index) { method Find (line 36) | int Find(ListNode? head, int target) { method Test (line 48) | [Test] FILE: ja/codes/csharp/chapter_array_and_linkedlist/list.cs class list (line 9) | public class list { method Test (line 10) | [Test] FILE: ja/codes/csharp/chapter_array_and_linkedlist/my_list.cs class MyList (line 10) | class MyList { method MyList (line 17) | public MyList() { method Size (line 22) | public int Size() { method Capacity (line 27) | public int Capacity() { method Get (line 32) | public int Get(int index) { method Set (line 40) | public void Set(int index, int num) { method Add (line 47) | public void Add(int num) { method Insert (line 57) | public void Insert(int index, int num) { method Remove (line 73) | public int Remove(int index) { method ExtendCapacity (line 88) | public void ExtendCapacity() { method ToArray (line 96) | public int[] ToArray() { class my_list (line 106) | public class my_list { method Test (line 107) | [Test] FILE: ja/codes/csharp/chapter_backtracking/n_queens.cs class n_queens (line 9) | public class n_queens { method Backtrack (line 11) | void Backtrack(int row, int n, List> state, List>> NQueens(int n) { method Test (line 62) | [Test] FILE: ja/codes/csharp/chapter_backtracking/permutations_i.cs class permutations_i (line 9) | public class permutations_i { method Backtrack (line 11) | void Backtrack(List state, int[] choices, bool[] selected, List> PermutationsI(int[] nums) { method Test (line 41) | [Test] FILE: ja/codes/csharp/chapter_backtracking/permutations_ii.cs class permutations_ii (line 9) | public class permutations_ii { method Backtrack (line 11) | void Backtrack(List state, int[] choices, bool[] selected, List> PermutationsII(int[] nums) { method Test (line 43) | [Test] FILE: ja/codes/csharp/chapter_backtracking/preorder_traversal_i_compact.cs class preorder_traversal_i_compact (line 9) | public class preorder_traversal_i_compact { method PreOrder (line 13) | void PreOrder(TreeNode? root) { method Test (line 25) | [Test] FILE: ja/codes/csharp/chapter_backtracking/preorder_traversal_ii_compact.cs class preorder_traversal_ii_compact (line 9) | public class preorder_traversal_ii_compact { method PreOrder (line 14) | void PreOrder(TreeNode? root) { method Test (line 30) | [Test] FILE: ja/codes/csharp/chapter_backtracking/preorder_traversal_iii_compact.cs class preorder_traversal_iii_compact (line 9) | public class preorder_traversal_iii_compact { method PreOrder (line 14) | void PreOrder(TreeNode? root) { method Test (line 31) | [Test] FILE: ja/codes/csharp/chapter_backtracking/preorder_traversal_iii_template.cs class preorder_traversal_iii_template (line 9) | public class preorder_traversal_iii_template { method IsSolution (line 11) | bool IsSolution(List state) { method RecordSolution (line 16) | void RecordSolution(List state, List> res) { method IsValid (line 21) | bool IsValid(List state, TreeNode choice) { method MakeChoice (line 26) | void MakeChoice(List state, TreeNode choice) { method UndoChoice (line 31) | void UndoChoice(List state, TreeNode choice) { method Backtrack (line 36) | void Backtrack(List state, List choices, List state, int target, int[] choices, int start, ... method SubsetSumI (line 35) | List> SubsetSumI(int[] nums, int target) { method Test (line 44) | [Test] FILE: ja/codes/csharp/chapter_backtracking/subset_sum_i_naive.cs class subset_sum_i_naive (line 9) | public class subset_sum_i_naive { method Backtrack (line 11) | void Backtrack(List state, int target, int total, int[] choices, ... method SubsetSumINaive (line 33) | List> SubsetSumINaive(int[] nums, int target) { method Test (line 41) | [Test] FILE: ja/codes/csharp/chapter_backtracking/subset_sum_ii.cs class subset_sum_ii (line 9) | public class subset_sum_ii { method Backtrack (line 11) | void Backtrack(List state, int target, int[] choices, int start, ... method SubsetSumII (line 40) | List> SubsetSumII(int[] nums, int target) { method Test (line 49) | [Test] FILE: ja/codes/csharp/chapter_computational_complexity/iteration.cs class iteration (line 9) | public class iteration { method ForLoop (line 11) | int ForLoop(int n) { method WhileLoop (line 21) | int WhileLoop(int n) { method WhileLoopII (line 33) | int WhileLoopII(int n) { method NestedForLoop (line 47) | string NestedForLoop(int n) { method Test (line 60) | [Test] FILE: ja/codes/csharp/chapter_computational_complexity/recursion.cs class recursion (line 9) | public class recursion { method Recur (line 11) | int Recur(int n) { method ForLoopRecur (line 22) | int ForLoopRecur(int n) { method TailRecur (line 41) | int TailRecur(int n, int res) { method Fib (line 50) | int Fib(int n) { method Test (line 61) | [Test] FILE: ja/codes/csharp/chapter_computational_complexity/space_complexity.cs class space_complexity (line 9) | public class space_complexity { method Function (line 11) | int Function() { method Constant (line 17) | void Constant(int n) { method Linear (line 34) | void Linear(int n) { method LinearRecur (line 50) | void LinearRecur(int n) { method Quadratic (line 57) | void Quadratic(int n) { method QuadraticRecur (line 72) | int QuadraticRecur(int n) { method BuildTree (line 80) | TreeNode? BuildTree(int n) { method Test (line 89) | [Test] FILE: ja/codes/csharp/chapter_computational_complexity/time_complexity.cs class time_complexity (line 9) | public class time_complexity { method Algorithm (line 10) | void Algorithm(int n) { method AlgorithmA (line 26) | void AlgorithmA(int n) { method AlgorithmB (line 31) | void AlgorithmB(int n) { method AlgorithmC (line 38) | void AlgorithmC(int n) { method Constant (line 45) | int Constant(int n) { method Linear (line 54) | int Linear(int n) { method ArrayTraversal (line 62) | int ArrayTraversal(int[] nums) { method Quadratic (line 72) | int Quadratic(int n) { method BubbleSort (line 84) | int BubbleSort(int[] nums) { method Exponential (line 101) | int Exponential(int n) { method ExpRecur (line 115) | int ExpRecur(int n) { method Logarithmic (line 121) | int Logarithmic(int n) { method LogRecur (line 131) | int LogRecur(int n) { method LinearLogRecur (line 137) | int LinearLogRecur(int n) { method FactorialRecur (line 147) | int FactorialRecur(int n) { method Test (line 157) | [Test] FILE: ja/codes/csharp/chapter_computational_complexity/worst_best_time_complexity.cs class worst_best_time_complexity (line 9) | public class worst_best_time_complexity { method RandomNumbers (line 11) | int[] RandomNumbers(int n) { method FindOne (line 27) | int FindOne(int[] nums) { method Test (line 39) | [Test] FILE: ja/codes/csharp/chapter_divide_and_conquer/binary_search_recur.cs class binary_search_recur (line 9) | public class binary_search_recur { method DFS (line 11) | int DFS(int[] nums, int target, int i, int j) { method BinarySearch (line 31) | int BinarySearch(int[] nums, int target) { method Test (line 37) | [Test] FILE: ja/codes/csharp/chapter_divide_and_conquer/build_tree.cs class build_tree (line 9) | public class build_tree { method DFS (line 11) | TreeNode? DFS(int[] preorder, Dictionary inorderMap, int i, ... method BuildTree (line 28) | TreeNode? BuildTree(int[] preorder, int[] inorder) { method Test (line 38) | [Test] FILE: ja/codes/csharp/chapter_divide_and_conquer/hanota.cs class hanota (line 9) | public class hanota { method Move (line 11) | void Move(List src, List tar) { method DFS (line 20) | void DFS(int i, List src, List buf, List tar) { method SolveHanota (line 35) | void SolveHanota(List A, List B, List C) { method Test (line 41) | [Test] FILE: ja/codes/csharp/chapter_dynamic_programming/climbing_stairs_backtrack.cs class climbing_stairs_backtrack (line 9) | public class climbing_stairs_backtrack { method Backtrack (line 11) | void Backtrack(List choices, int state, int n, List res) { method ClimbingStairsBacktrack (line 27) | int ClimbingStairsBacktrack(int n) { method Test (line 35) | [Test] FILE: ja/codes/csharp/chapter_dynamic_programming/climbing_stairs_constraint_dp.cs class climbing_stairs_constraint_dp (line 9) | public class climbing_stairs_constraint_dp { method ClimbingStairsConstraintDP (line 11) | int ClimbingStairsConstraintDP(int n) { method Test (line 30) | [Test] FILE: ja/codes/csharp/chapter_dynamic_programming/climbing_stairs_dfs.cs class climbing_stairs_dfs (line 9) | public class climbing_stairs_dfs { method DFS (line 11) | int DFS(int i) { method ClimbingStairsDFS (line 21) | int ClimbingStairsDFS(int n) { method Test (line 25) | [Test] FILE: ja/codes/csharp/chapter_dynamic_programming/climbing_stairs_dfs_mem.cs class climbing_stairs_dfs_mem (line 9) | public class climbing_stairs_dfs_mem { method DFS (line 11) | int DFS(int i, int[] mem) { method ClimbingStairsDFSMem (line 26) | int ClimbingStairsDFSMem(int n) { method Test (line 33) | [Test] FILE: ja/codes/csharp/chapter_dynamic_programming/climbing_stairs_dp.cs class climbing_stairs_dp (line 9) | public class climbing_stairs_dp { method ClimbingStairsDP (line 11) | int ClimbingStairsDP(int n) { method ClimbingStairsDPComp (line 27) | int ClimbingStairsDPComp(int n) { method Test (line 39) | [Test] FILE: ja/codes/csharp/chapter_dynamic_programming/coin_change.cs class coin_change (line 9) | public class coin_change { method CoinChangeDP (line 11) | int CoinChangeDP(int[] coins, int amt) { method CoinChangeDPComp (line 36) | int CoinChangeDPComp(int[] coins, int amt) { method Test (line 58) | [Test] FILE: ja/codes/csharp/chapter_dynamic_programming/coin_change_ii.cs class coin_change_ii (line 9) | public class coin_change_ii { method CoinChangeIIDP (line 11) | int CoinChangeIIDP(int[] coins, int amt) { method CoinChangeIIDPComp (line 35) | int CoinChangeIIDPComp(int[] coins, int amt) { method Test (line 55) | [Test] FILE: ja/codes/csharp/chapter_dynamic_programming/edit_distance.cs class edit_distance (line 9) | public class edit_distance { method EditDistanceDFS (line 11) | int EditDistanceDFS(string s, string t, int i, int j) { method EditDistanceDFSMem (line 33) | int EditDistanceDFSMem(string s, string t, int[][] mem, int i, int j) { method EditDistanceDP (line 59) | int EditDistanceDP(string s, string t) { method EditDistanceDPComp (line 85) | int EditDistanceDPComp(string s, string t) { method Test (line 113) | [Test] FILE: ja/codes/csharp/chapter_dynamic_programming/knapsack.cs class knapsack (line 9) | public class knapsack { method KnapsackDFS (line 11) | int KnapsackDFS(int[] weight, int[] val, int i, int c) { method KnapsackDFSMem (line 28) | int KnapsackDFSMem(int[] weight, int[] val, int[][] mem, int i, int c) { method KnapsackDP (line 50) | int KnapsackDP(int[] weight, int[] val, int cap) { method KnapsackDPComp (line 70) | int KnapsackDPComp(int[] weight, int[] val, int cap) { method Test (line 90) | [Test] FILE: ja/codes/csharp/chapter_dynamic_programming/min_cost_climbing_stairs_dp.cs class min_cost_climbing_stairs_dp (line 9) | public class min_cost_climbing_stairs_dp { method MinCostClimbingStairsDP (line 11) | int MinCostClimbingStairsDP(int[] cost) { method MinCostClimbingStairsDPComp (line 28) | int MinCostClimbingStairsDPComp(int[] cost) { method Test (line 41) | [Test] FILE: ja/codes/csharp/chapter_dynamic_programming/min_path_sum.cs class min_path_sum (line 9) | public class min_path_sum { method MinPathSumDFS (line 11) | int MinPathSumDFS(int[][] grid, int i, int j) { method MinPathSumDFSMem (line 28) | int MinPathSumDFSMem(int[][] grid, int[][] mem, int i, int j) { method MinPathSumDP (line 50) | int MinPathSumDP(int[][] grid) { method MinPathSumDPComp (line 73) | int MinPathSumDPComp(int[][] grid) { method Test (line 94) | [Test] FILE: ja/codes/csharp/chapter_dynamic_programming/unbounded_knapsack.cs class unbounded_knapsack (line 9) | public class unbounded_knapsack { method UnboundedKnapsackDP (line 11) | int UnboundedKnapsackDP(int[] wgt, int[] val, int cap) { method UnboundedKnapsackDPComp (line 31) | int UnboundedKnapsackDPComp(int[] wgt, int[] val, int cap) { method Test (line 50) | [Test] FILE: ja/codes/csharp/chapter_graph/graph_adjacency_list.cs class GraphAdjList (line 10) | public class GraphAdjList { method GraphAdjList (line 15) | public GraphAdjList(Vertex[][] edges) { method Size (line 26) | int Size() { method AddEdge (line 31) | public void AddEdge(Vertex vet1, Vertex vet2) { method RemoveEdge (line 40) | public void RemoveEdge(Vertex vet1, Vertex vet2) { method AddVertex (line 49) | public void AddVertex(Vertex vet) { method RemoveVertex (line 57) | public void RemoveVertex(Vertex vet) { method Print (line 69) | public void Print() { class graph_adjacency_list (line 80) | public class graph_adjacency_list { method Test (line 81) | [Test] FILE: ja/codes/csharp/chapter_graph/graph_adjacency_matrix.cs class GraphAdjMat (line 10) | class GraphAdjMat { method GraphAdjMat (line 15) | public GraphAdjMat(int[] vertices, int[][] edges) { method Size (line 30) | int Size() { method AddVertex (line 35) | public void AddVertex(int val) { method RemoveVertex (line 52) | public void RemoveVertex(int index) { method AddEdge (line 67) | public void AddEdge(int i, int j) { method RemoveEdge (line 78) | public void RemoveEdge(int i, int j) { method Print (line 87) | public void Print() { class graph_adjacency_matrix (line 95) | public class graph_adjacency_matrix { method Test (line 96) | [Test] FILE: ja/codes/csharp/chapter_graph/graph_bfs.cs class graph_bfs (line 9) | public class graph_bfs { method GraphBFS (line 12) | List GraphBFS(GraphAdjList graph, Vertex startVet) { method Test (line 37) | [Test] FILE: ja/codes/csharp/chapter_graph/graph_dfs.cs class graph_dfs (line 9) | public class graph_dfs { method DFS (line 11) | void DFS(GraphAdjList graph, HashSet visited, List res... method GraphDFS (line 26) | List GraphDFS(GraphAdjList graph, Vertex startVet) { method Test (line 35) | [Test] FILE: ja/codes/csharp/chapter_greedy/coin_change_greedy.cs class coin_change_greedy (line 9) | public class coin_change_greedy { method CoinChangeGreedy (line 11) | int CoinChangeGreedy(int[] coins, int amt) { method Test (line 29) | [Test] FILE: ja/codes/csharp/chapter_greedy/fractional_knapsack.cs class Item (line 10) | class Item(int w, int v) { class fractional_knapsack (line 15) | public class fractional_knapsack { method FractionalKnapsack (line 17) | double FractionalKnapsack(int[] wgt, int[] val, int cap) { method Test (line 42) | [Test] FILE: ja/codes/csharp/chapter_greedy/max_capacity.cs class max_capacity (line 9) | public class max_capacity { method MaxCapacity (line 11) | int MaxCapacity(int[] ht) { method Test (line 31) | [Test] FILE: ja/codes/csharp/chapter_greedy/max_product_cutting.cs class max_product_cutting (line 9) | public class max_product_cutting { method MaxProductCutting (line 11) | int MaxProductCutting(int n) { method Test (line 31) | [Test] FILE: ja/codes/csharp/chapter_hashing/array_hash_map.cs class Pair (line 10) | class Pair(int key, string val) { class ArrayHashMap (line 16) | class ArrayHashMap { method ArrayHashMap (line 18) | public ArrayHashMap() { method HashFunc (line 27) | int HashFunc(int key) { method Get (line 33) | public string? Get(int key) { method Put (line 41) | public void Put(int key, string val) { method Remove (line 48) | public void Remove(int key) { method PairSet (line 55) | public List PairSet() { method KeySet (line 65) | public List KeySet() { method ValueSet (line 75) | public List ValueSet() { method Print (line 85) | public void Print() { class array_hash_map (line 93) | public class array_hash_map { method Test (line 94) | [Test] FILE: ja/codes/csharp/chapter_hashing/built_in_hash.cs class built_in_hash (line 9) | public class built_in_hash { method Test (line 10) | [Test] FILE: ja/codes/csharp/chapter_hashing/hash_map.cs class hash_map (line 10) | public class hash_map { method Test (line 11) | [Test] FILE: ja/codes/csharp/chapter_hashing/hash_map_chaining.cs class HashMapChaining (line 10) | class HashMapChaining { method HashMapChaining (line 18) | public HashMapChaining() { method HashFunc (line 30) | int HashFunc(int key) { method LoadFactor (line 35) | double LoadFactor() { method Get (line 40) | public string? Get(int key) { method Put (line 53) | public void Put(int key, string val) { method Remove (line 72) | public void Remove(int key) { method Extend (line 85) | void Extend() { method Print (line 104) | public void Print() { class hash_map_chaining (line 117) | public class hash_map_chaining { method Test (line 118) | [Test] FILE: ja/codes/csharp/chapter_hashing/hash_map_open_addressing.cs class HashMapOpenAddressing (line 10) | class HashMapOpenAddressing { method HashMapOpenAddressing (line 19) | public HashMapOpenAddressing() { method HashFunc (line 25) | int HashFunc(int key) { method LoadFactor (line 30) | double LoadFactor() { method FindBucket (line 35) | int FindBucket(int key) { method Get (line 62) | public string? Get(int key) { method Put (line 74) | public void Put(int key, string val) { method Remove (line 92) | public void Remove(int key) { method Extend (line 103) | void Extend() { method Print (line 119) | public void Print() { class hash_map_open_addressing (line 132) | public class hash_map_open_addressing { method Test (line 133) | [Test] FILE: ja/codes/csharp/chapter_hashing/simple_hash.cs class simple_hash (line 9) | public class simple_hash { method AddHash (line 11) | int AddHash(string key) { method MulHash (line 21) | int MulHash(string key) { method XorHash (line 31) | int XorHash(string key) { method RotHash (line 41) | int RotHash(string key) { method Test (line 50) | [Test] FILE: ja/codes/csharp/chapter_heap/heap.cs class heap (line 9) | public class heap { method TestPush (line 10) | void TestPush(PriorityQueue heap, int val) { method TestPop (line 16) | void TestPop(PriorityQueue heap) { method Test (line 22) | [Test] FILE: ja/codes/csharp/chapter_heap/my_heap.cs class MaxHeap (line 10) | class MaxHeap { method MaxHeap (line 15) | public MaxHeap() { method MaxHeap (line 20) | public MaxHeap(IEnumerable nums) { method Left (line 31) | int Left(int i) { method Right (line 36) | int Right(int i) { method Parent (line 41) | int Parent(int i) { method Peek (line 46) | public int Peek() { method Push (line 51) | public void Push(int val) { method Size (line 59) | public int Size() { method IsEmpty (line 64) | public bool IsEmpty() { method SiftUp (line 69) | void SiftUp(int i) { method Pop (line 84) | public int Pop() { method SiftDown (line 100) | void SiftDown(int i) { method Swap (line 118) | void Swap(int i, int p) { method Print (line 123) | public void Print() { class my_heap (line 129) | public class my_heap { method Test (line 130) | [Test] FILE: ja/codes/csharp/chapter_heap/top_k.cs class top_k (line 9) | public class top_k { method TopKHeap (line 11) | PriorityQueue TopKHeap(int[] nums, int k) { method Test (line 29) | [Test] FILE: ja/codes/csharp/chapter_searching/binary_search.cs class binary_search (line 9) | public class binary_search { method BinarySearch (line 11) | int BinarySearch(int[] nums, int target) { method BinarySearchLCRO (line 29) | int BinarySearchLCRO(int[] nums, int target) { method Test (line 46) | [Test] FILE: ja/codes/csharp/chapter_searching/binary_search_edge.cs class binary_search_edge (line 9) | public class binary_search_edge { method BinarySearchLeftEdge (line 11) | int BinarySearchLeftEdge(int[] nums, int target) { method BinarySearchRightEdge (line 23) | int BinarySearchRightEdge(int[] nums, int target) { method Test (line 36) | [Test] FILE: ja/codes/csharp/chapter_searching/binary_search_insertion.cs class binary_search_insertion (line 9) | public class binary_search_insertion { method BinarySearchInsertionSimple (line 11) | public static int BinarySearchInsertionSimple(int[] nums, int target) { method BinarySearchInsertion (line 28) | public static int BinarySearchInsertion(int[] nums, int target) { method Test (line 44) | [Test] FILE: ja/codes/csharp/chapter_searching/hashing_search.cs class hashing_search (line 9) | public class hashing_search { method HashingSearchArray (line 11) | int HashingSearchArray(Dictionary map, int target) { method HashingSearchLinkedList (line 18) | ListNode? HashingSearchLinkedList(Dictionary map, int t... method Test (line 25) | [Test] FILE: ja/codes/csharp/chapter_searching/linear_search.cs class linear_search (line 9) | public class linear_search { method LinearSearchArray (line 11) | int LinearSearchArray(int[] nums, int target) { method LinearSearchLinkedList (line 23) | ListNode? LinearSearchLinkedList(ListNode? head, int target) { method Test (line 35) | [Test] FILE: ja/codes/csharp/chapter_searching/two_sum.cs class two_sum (line 9) | public class two_sum { method TwoSumBruteForce (line 11) | int[] TwoSumBruteForce(int[] nums, int target) { method TwoSumHashTable (line 24) | int[] TwoSumHashTable(int[] nums, int target) { method Test (line 38) | [Test] FILE: ja/codes/csharp/chapter_sorting/bubble_sort.cs class bubble_sort (line 9) | public class bubble_sort { method BubbleSort (line 11) | void BubbleSort(int[] nums) { method BubbleSortWithFlag (line 25) | void BubbleSortWithFlag(int[] nums) { method Test (line 41) | [Test] FILE: ja/codes/csharp/chapter_sorting/bucket_sort.cs class bucket_sort (line 9) | public class bucket_sort { method BucketSort (line 11) | void BucketSort(float[] nums) { method Test (line 39) | [Test] FILE: ja/codes/csharp/chapter_sorting/counting_sort.cs class counting_sort (line 9) | public class counting_sort { method CountingSortNaive (line 12) | void CountingSortNaive(int[] nums) { method CountingSort (line 35) | void CountingSort(int[] nums) { method Test (line 67) | [Test] FILE: ja/codes/csharp/chapter_sorting/heap_sort.cs class heap_sort (line 9) | public class heap_sort { method SiftDown (line 11) | void SiftDown(int[] nums, int n, int i) { method HeapSort (line 32) | void HeapSort(int[] nums) { method Test (line 46) | [Test] FILE: ja/codes/csharp/chapter_sorting/insertion_sort.cs class insertion_sort (line 9) | public class insertion_sort { method InsertionSort (line 11) | void InsertionSort(int[] nums) { method Test (line 24) | [Test] FILE: ja/codes/csharp/chapter_sorting/merge_sort.cs class merge_sort (line 9) | public class merge_sort { method Merge (line 11) | void Merge(int[] nums, int left, int mid, int right) { method MergeSort (line 38) | void MergeSort(int[] nums, int left, int right) { method Test (line 49) | [Test] FILE: ja/codes/csharp/chapter_sorting/quick_sort.cs class quickSort (line 9) | class quickSort { method Swap (line 11) | static void Swap(int[] nums, int i, int j) { method Partition (line 16) | static int Partition(int[] nums, int left, int right) { method QuickSort (line 31) | public static void QuickSort(int[] nums, int left, int right) { class QuickSortMedian (line 44) | class QuickSortMedian { method Swap (line 46) | static void Swap(int[] nums, int i, int j) { method MedianThree (line 51) | static int MedianThree(int[] nums, int left, int mid, int right) { method Partition (line 61) | static int Partition(int[] nums, int left, int right) { method QuickSort (line 80) | public static void QuickSort(int[] nums, int left, int right) { class QuickSortTailCall (line 93) | class QuickSortTailCall { method Swap (line 95) | static void Swap(int[] nums, int i, int j) { method Partition (line 100) | static int Partition(int[] nums, int left, int right) { method QuickSort (line 115) | public static void QuickSort(int[] nums, int left, int right) { class quick_sort (line 132) | public class quick_sort { method Test (line 133) | [Test] FILE: ja/codes/csharp/chapter_sorting/radix_sort.cs class radix_sort (line 9) | public class radix_sort { method Digit (line 11) | int Digit(int num, int exp) { method CountingSortDigit (line 17) | void CountingSortDigit(int[] nums, int exp) { method RadixSort (line 45) | void RadixSort(int[] nums) { method Test (line 61) | [Test] FILE: ja/codes/csharp/chapter_sorting/selection_sort.cs class selection_sort (line 9) | public class selection_sort { method SelectionSort (line 11) | void SelectionSort(int[] nums) { method Test (line 26) | [Test] FILE: ja/codes/csharp/chapter_stack_and_queue/array_deque.cs class ArrayDeque (line 10) | public class ArrayDeque { method ArrayDeque (line 16) | public ArrayDeque(int capacity) { method Capacity (line 22) | int Capacity() { method Size (line 27) | public int Size() { method IsEmpty (line 32) | public bool IsEmpty() { method Index (line 37) | int Index(int i) { method PushFirst (line 45) | public void PushFirst(int num) { method PushLast (line 59) | public void PushLast(int num) { method PopFirst (line 72) | public int PopFirst() { method PopLast (line 81) | public int PopLast() { method PeekFirst (line 88) | public int PeekFirst() { method PeekLast (line 96) | public int PeekLast() { method ToArray (line 106) | public int[] ToArray() { class array_deque (line 116) | public class array_deque { method Test (line 117) | [Test] FILE: ja/codes/csharp/chapter_stack_and_queue/array_queue.cs class ArrayQueue (line 10) | class ArrayQueue { method ArrayQueue (line 15) | public ArrayQueue(int capacity) { method Capacity (line 21) | int Capacity() { method Size (line 26) | public int Size() { method IsEmpty (line 31) | public bool IsEmpty() { method Push (line 36) | public void Push(int num) { method Pop (line 50) | public int Pop() { method Peek (line 59) | public int Peek() { method ToArray (line 66) | public int[] ToArray() { class array_queue (line 76) | public class array_queue { method Test (line 77) | [Test] FILE: ja/codes/csharp/chapter_stack_and_queue/array_stack.cs class ArrayStack (line 10) | class ArrayStack { method ArrayStack (line 12) | public ArrayStack() { method Size (line 18) | public int Size() { method IsEmpty (line 23) | public bool IsEmpty() { method Push (line 28) | public void Push(int num) { method Pop (line 33) | public int Pop() { method Peek (line 42) | public int Peek() { method ToArray (line 49) | public int[] ToArray() { class array_stack (line 54) | public class array_stack { method Test (line 55) | [Test] FILE: ja/codes/csharp/chapter_stack_and_queue/deque.cs class deque (line 9) | public class deque { method Test (line 10) | [Test] FILE: ja/codes/csharp/chapter_stack_and_queue/linkedlist_deque.cs class ListNode (line 10) | public class ListNode(int val) { class LinkedListDeque (line 17) | public class LinkedListDeque { method LinkedListDeque (line 21) | public LinkedListDeque() { method Size (line 27) | public int Size() { method IsEmpty (line 32) | public bool IsEmpty() { method Push (line 37) | void Push(int num, bool isFront) { method PushFirst (line 63) | public void PushFirst(int num) { method PushLast (line 68) | public void PushLast(int num) { method Pop (line 73) | int? Pop(bool isFront) { method PopFirst (line 105) | public int? PopFirst() { method PopLast (line 110) | public int? PopLast() { method PeekFirst (line 115) | public int? PeekFirst() { method PeekLast (line 122) | public int? PeekLast() { method ToArray (line 129) | public int?[] ToArray() { class linkedlist_deque (line 141) | public class linkedlist_deque { method Test (line 142) | [Test] FILE: ja/codes/csharp/chapter_stack_and_queue/linkedlist_queue.cs class LinkedListQueue (line 10) | class LinkedListQueue { method LinkedListQueue (line 14) | public LinkedListQueue() { method Size (line 20) | public int Size() { method IsEmpty (line 25) | public bool IsEmpty() { method Push (line 30) | public void Push(int num) { method Pop (line 46) | public int Pop() { method Peek (line 55) | public int Peek() { method ToArray (line 62) | public int[] ToArray() { class linkedlist_queue (line 76) | public class linkedlist_queue { method Test (line 77) | [Test] FILE: ja/codes/csharp/chapter_stack_and_queue/linkedlist_stack.cs class LinkedListStack (line 10) | class LinkedListStack { method LinkedListStack (line 14) | public LinkedListStack() { method Size (line 19) | public int Size() { method IsEmpty (line 24) | public bool IsEmpty() { method Push (line 29) | public void Push(int num) { method Pop (line 38) | public int Pop() { method Peek (line 46) | public int Peek() { method ToArray (line 53) | public int[] ToArray() { class linkedlist_stack (line 67) | public class linkedlist_stack { method Test (line 68) | [Test] FILE: ja/codes/csharp/chapter_stack_and_queue/queue.cs class queue (line 9) | public class queue { method Test (line 10) | [Test] FILE: ja/codes/csharp/chapter_stack_and_queue/stack.cs class stack (line 9) | public class stack { method Test (line 10) | [Test] FILE: ja/codes/csharp/chapter_tree/array_binary_tree.cs class ArrayBinaryTree (line 10) | public class ArrayBinaryTree(List arr) { method Size (line 14) | public int Size() { method Val (line 19) | public int? Val(int i) { method Left (line 27) | public int Left(int i) { method Right (line 32) | public int Right(int i) { method Parent (line 37) | public int Parent(int i) { method LevelOrder (line 42) | public List LevelOrder() { method DFS (line 53) | void DFS(int i, string order, List res) { method PreOrder (line 71) | public List PreOrder() { method InOrder (line 78) | public List InOrder() { method PostOrder (line 85) | public List PostOrder() { class array_binary_tree (line 92) | public class array_binary_tree { method Test (line 93) | [Test] FILE: ja/codes/csharp/chapter_tree/avl_tree.cs class AVLTree (line 10) | class AVLTree { method Height (line 14) | int Height(TreeNode? node) { method UpdateHeight (line 20) | void UpdateHeight(TreeNode node) { method BalanceFactor (line 26) | public int BalanceFactor(TreeNode? node) { method RightRotate (line 34) | TreeNode? RightRotate(TreeNode? node) { method LeftRotate (line 48) | TreeNode? LeftRotate(TreeNode? node) { method Rotate (line 62) | TreeNode? Rotate(TreeNode? node) { method Insert (line 92) | public void Insert(int val) { method InsertHelper (line 97) | TreeNode? InsertHelper(TreeNode? node, int val) { method Remove (line 114) | public void Remove(int val) { method RemoveHelper (line 119) | TreeNode? RemoveHelper(TreeNode? node, int val) { method Search (line 153) | public TreeNode? Search(int val) { class avl_tree (line 172) | public class avl_tree { method TestInsert (line 173) | static void TestInsert(AVLTree tree, int val) { method TestRemove (line 179) | static void TestRemove(AVLTree tree, int val) { method Test (line 185) | [Test] FILE: ja/codes/csharp/chapter_tree/binary_search_tree.cs class BinarySearchTree (line 9) | class BinarySearchTree { method BinarySearchTree (line 12) | public BinarySearchTree() { method GetRoot (line 18) | public TreeNode? GetRoot() { method Search (line 23) | public TreeNode? Search(int num) { method Insert (line 42) | public void Insert(int num) { method Remove (line 75) | public void Remove(int num) { class binary_search_tree (line 126) | public class binary_search_tree { method Test (line 127) | [Test] FILE: ja/codes/csharp/chapter_tree/binary_tree.cs class binary_tree (line 9) | public class binary_tree { method Test (line 10) | [Test] FILE: ja/codes/csharp/chapter_tree/binary_tree_bfs.cs class binary_tree_bfs (line 9) | public class binary_tree_bfs { method LevelOrder (line 12) | List LevelOrder(TreeNode root) { method Test (line 29) | [Test] FILE: ja/codes/csharp/chapter_tree/binary_tree_dfs.cs class binary_tree_dfs (line 9) | public class binary_tree_dfs { method PreOrder (line 13) | void PreOrder(TreeNode? root) { method InOrder (line 22) | void InOrder(TreeNode? root) { method PostOrder (line 31) | void PostOrder(TreeNode? root) { method Test (line 39) | [Test] FILE: ja/codes/csharp/utils/ListNode.cs class ListNode (line 8) | public class ListNode(int x) { method ArrToLinkedList (line 13) | public static ListNode? ArrToLinkedList(int[] arr) { method ToString (line 23) | public override string? ToString() { FILE: ja/codes/csharp/utils/PrintUtil.cs class Trunk (line 9) | public class Trunk(Trunk? prev, string str) { class PrintUtil (line 14) | public static class PrintUtil { method PrintList (line 16) | public static void PrintList(IList list) { method PrintList (line 20) | public static string PrintList(this IEnumerable list) { method PrintMatrix (line 25) | public static void PrintMatrix(T[][] matrix) { method PrintMatrix (line 34) | public static void PrintMatrix(List> matrix) { method PrintLinkedList (line 43) | public static void PrintLinkedList(ListNode? head) { method PrintTree (line 57) | public static void PrintTree(TreeNode? root) { method PrintTree (line 62) | public static void PrintTree(TreeNode? root, Trunk? prev, bool isRight) { method ShowTrunks (line 93) | public static void ShowTrunks(Trunk? p) { method PrintHashMap (line 103) | public static void PrintHashMap(Dictionary map) where K : ... method PrintHeap (line 110) | public static void PrintHeap(Queue queue) { method PrintHeap (line 120) | public static void PrintHeap(PriorityQueue queue) { FILE: ja/codes/csharp/utils/TreeNode.cs class TreeNode (line 10) | public class TreeNode(int? x) { method ListToTreeDFS (line 33) | static TreeNode? ListToTreeDFS(List arr, int i) { method ListToTree (line 45) | public static TreeNode? ListToTree(List arr) { method TreeToListDFS (line 50) | static void TreeToListDFS(TreeNode? root, int i, List res) { method TreeToList (line 62) | public static List TreeToList(TreeNode root) { FILE: ja/codes/csharp/utils/Vertex.cs class Vertex (line 10) | public class Vertex(int val) { method ValsToVets (line 14) | public static Vertex[] ValsToVets(int[] vals) { method VetsToVals (line 23) | public static List VetsToVals(List vets) { FILE: ja/codes/dart/build.dart function main (line 3) | void main() FILE: ja/codes/dart/chapter_array_and_linkedlist/array.dart function randomAccess (line 12) | int randomAccess(List nums) function extend (line 21) | List extend(List nums, int enlarge) function insert (line 33) | void insert(List nums, int _num, int index) function remove (line 43) | void remove(List nums, int index) function traverse (line 51) | void traverse(List nums) function find (line 68) | int find(List nums, int target) function main (line 76) | void main() FILE: ja/codes/dart/chapter_array_and_linkedlist/linked_list.dart function insert (line 11) | void insert(ListNode n0, ListNode P) function remove (line 18) | void remove(ListNode n0) function access (line 27) | ListNode? access(ListNode? head, int index) function find (line 36) | int find(ListNode? head, int target) function main (line 49) | void main() FILE: ja/codes/dart/chapter_array_and_linkedlist/list.dart function main (line 10) | void main() FILE: ja/codes/dart/chapter_array_and_linkedlist/my_list.dart class MyList (line 8) | class MyList { method size (line 20) | int size() method capacity (line 23) | int capacity() method get (line 26) | int get(int index) method set (line 32) | void set(int index, int _num) method add (line 38) | void add(int _num) method insert (line 47) | void insert(int index, int _num) method remove (line 61) | int remove(int index) method extendCapacity (line 75) | void extendCapacity() method toArray (line 87) | List toArray() function main (line 97) | void main() FILE: ja/codes/dart/chapter_backtracking/n_queens.dart function backtrack (line 8) | void backtrack( function nQueens (line 50) | List>> nQueens(int n) function main (line 64) | void main() FILE: ja/codes/dart/chapter_backtracking/permutations_i.dart function backtrack (line 8) | void backtrack( function permutationsI (line 37) | List> permutationsI(List nums) function main (line 44) | void main() FILE: ja/codes/dart/chapter_backtracking/permutations_ii.dart function backtrack (line 8) | void backtrack( function permutationsII (line 39) | List> permutationsII(List nums) function main (line 46) | void main() FILE: ja/codes/dart/chapter_backtracking/preorder_traversal_i_compact.dart function preOrder (line 11) | void preOrder(TreeNode? root, List res) function main (line 24) | void main() FILE: ja/codes/dart/chapter_backtracking/preorder_traversal_ii_compact.dart function preOrder (line 11) | void preOrder( function main (line 33) | void main() FILE: ja/codes/dart/chapter_backtracking/preorder_traversal_iii_compact.dart function preOrder (line 11) | void preOrder( function main (line 33) | void main() FILE: ja/codes/dart/chapter_backtracking/preorder_traversal_iii_template.dart function isSolution (line 11) | bool isSolution(List state) function recordSolution (line 16) | void recordSolution(List state, List> res) function isValid (line 21) | bool isValid(List state, TreeNode? choice) function makeChoice (line 26) | void makeChoice(List state, TreeNode? choice) function undoChoice (line 31) | void undoChoice(List state, TreeNode? choice) function backtrack (line 36) | void backtrack( function main (line 61) | void main() FILE: ja/codes/dart/chapter_backtracking/subset_sum_i.dart function backtrack (line 8) | void backtrack( function subsetSumI (line 38) | List> subsetSumI(List nums, int target) function main (line 48) | void main() FILE: ja/codes/dart/chapter_backtracking/subset_sum_i_naive.dart function backtrack (line 8) | void backtrack( function subsetSumINaive (line 36) | List> subsetSumINaive(List nums, int target) function main (line 45) | void main() FILE: ja/codes/dart/chapter_backtracking/subset_sum_ii.dart function backtrack (line 8) | void backtrack( function subsetSumII (line 43) | List> subsetSumII(List nums, int target) function main (line 53) | void main() FILE: ja/codes/dart/chapter_computational_complexity/iteration.dart function forLoop (line 8) | int forLoop(int n) function whileLoop (line 18) | int whileLoop(int n) function whileLoopII (line 30) | int whileLoopII(int n) function nestedForLoop (line 44) | String nestedForLoop(int n) function main (line 57) | void main() FILE: ja/codes/dart/chapter_computational_complexity/recursion.dart function recur (line 8) | int recur(int n) function forLoopRecur (line 18) | int forLoopRecur(int n) function tailRecur (line 37) | int tailRecur(int n, int res) function fib (line 45) | int fib(int n) function main (line 55) | void main() FILE: ja/codes/dart/chapter_computational_complexity/space_complexity.dart function function (line 15) | int function() function constant (line 21) | void constant(int n) function linear (line 38) | void linear(int n) function linearRecur (line 54) | void linearRecur(int n) function quadratic (line 61) | void quadratic(int n) function quadraticRecur (line 76) | int quadraticRecur(int n) function buildTree (line 84) | TreeNode? buildTree(int n) function main (line 93) | void main() FILE: ja/codes/dart/chapter_computational_complexity/time_complexity.dart function constant (line 10) | int constant(int n) function linear (line 20) | int linear(int n) function arrayTraversal (line 29) | int arrayTraversal(List nums) function quadratic (line 39) | int quadratic(int n) function bubbleSort (line 51) | int bubbleSort(List nums) function exponential (line 70) | int exponential(int n) function expRecur (line 84) | int expRecur(int n) function logarithmic (line 90) | int logarithmic(int n) function logRecur (line 100) | int logRecur(int n) function linearLogRecur (line 106) | int linearLogRecur(int n) function factorialRecur (line 116) | int factorialRecur(int n) function main (line 127) | void main() FILE: ja/codes/dart/chapter_computational_complexity/worst_best_time_complexity.dart function randomNumbers (line 8) | List randomNumbers(int n) function findOne (line 21) | int findOne(List nums) function main (line 32) | void main() FILE: ja/codes/dart/chapter_divide_and_conquer/binary_search_recur.dart function dfs (line 8) | int dfs(List nums, int target, int i, int j) function binarySearch (line 28) | int binarySearch(List nums, int target) function main (line 35) | void main() FILE: ja/codes/dart/chapter_divide_and_conquer/build_tree.dart function dfs (line 11) | TreeNode? dfs( function buildTree (line 35) | TreeNode? buildTree(List preorder, List inorder) function main (line 46) | void main() FILE: ja/codes/dart/chapter_divide_and_conquer/hanota.dart function move (line 8) | void move(List src, List tar) function dfs (line 16) | void dfs(int i, List src, List buf, List tar) function solveHanota (line 31) | void solveHanota(List A, List B, List C) function main (line 38) | void main() FILE: ja/codes/dart/chapter_dynamic_programming/climbing_stairs_backtrack.dart function backtrack (line 8) | void backtrack(List choices, int state, int n, List res) function climbingStairsBacktrack (line 24) | int climbingStairsBacktrack(int n) function main (line 34) | void main() FILE: ja/codes/dart/chapter_dynamic_programming/climbing_stairs_constraint_dp.dart function climbingStairsConstraintDP (line 8) | int climbingStairsConstraintDP(int n) function main (line 28) | void main() FILE: ja/codes/dart/chapter_dynamic_programming/climbing_stairs_dfs.dart function dfs (line 8) | int dfs(int i) function climbingStairsDFS (line 17) | int climbingStairsDFS(int n) function main (line 22) | void main() FILE: ja/codes/dart/chapter_dynamic_programming/climbing_stairs_dfs_mem.dart function dfs (line 8) | int dfs(int i, List mem) function climbingStairsDFSMem (line 21) | int climbingStairsDFSMem(int n) function main (line 28) | void main() FILE: ja/codes/dart/chapter_dynamic_programming/climbing_stairs_dp.dart function climbingStairsDP (line 8) | int climbingStairsDP(int n) function climbingStairsDPComp (line 23) | int climbingStairsDPComp(int n) function main (line 35) | void main() FILE: ja/codes/dart/chapter_dynamic_programming/coin_change.dart function coinChangeDP (line 10) | int coinChangeDP(List coins, int amt) function coinChangeDPComp (line 35) | int coinChangeDPComp(List coins, int amt) function main (line 57) | void main() FILE: ja/codes/dart/chapter_dynamic_programming/coin_change_ii.dart function coinChangeIIDP (line 8) | int coinChangeIIDP(List coins, int amt) function coinChangeIIDPComp (line 32) | int coinChangeIIDPComp(List coins, int amt) function main (line 53) | void main() FILE: ja/codes/dart/chapter_dynamic_programming/edit_distance.dart function editDistanceDFS (line 10) | int editDistanceDFS(String s, String t, int i, int j) function editDistanceDFSMem (line 28) | int editDistanceDFSMem(String s, String t, List> mem, int i, i... function editDistanceDP (line 49) | int editDistanceDP(String s, String t) function editDistanceDPComp (line 75) | int editDistanceDPComp(String s, String t) function main (line 104) | void main() FILE: ja/codes/dart/chapter_dynamic_programming/knapsack.dart function knapsackDFS (line 10) | int knapsackDFS(List wgt, List val, int i, int c) function knapsackDFSMem (line 27) | int knapsackDFSMem( function knapsackDP (line 55) | int knapsackDP(List wgt, List val, int cap) function knapsackDPComp (line 75) | int knapsackDPComp(List wgt, List val, int cap) function main (line 93) | void main() FILE: ja/codes/dart/chapter_dynamic_programming/min_cost_climbing_stairs_dp.dart function minCostClimbingStairsDP (line 10) | int minCostClimbingStairsDP(List cost) function minCostClimbingStairsDPComp (line 26) | int minCostClimbingStairsDPComp(List cost) function main (line 39) | void main() FILE: ja/codes/dart/chapter_dynamic_programming/min_path_sum.dart function minPathSumDFS (line 10) | int minPathSumDFS(List> grid, int i, int j) function minPathSumDFSMem (line 28) | int minPathSumDFSMem(List> grid, List> mem, int i, i... function minPathSumDP (line 51) | int minPathSumDP(List> grid) function minPathSumDPComp (line 74) | int minPathSumDPComp(List> grid) function main (line 95) | void main() FILE: ja/codes/dart/chapter_dynamic_programming/unbounded_knapsack.dart function unboundedKnapsackDP (line 10) | int unboundedKnapsackDP(List wgt, List val, int cap) function unboundedKnapsackDPComp (line 30) | int unboundedKnapsackDPComp(List wgt, List val, int cap) function main (line 50) | void main() FILE: ja/codes/dart/chapter_graph/graph_adjacency_list.dart class GraphAdjList (line 10) | class GraphAdjList { method size (line 24) | int size() method addEdge (line 29) | void addEdge(Vertex vet1, Vertex vet2) method removeEdge (line 41) | void removeEdge(Vertex vet1, Vertex vet2) method addVertex (line 53) | void addVertex(Vertex vet) method removeVertex (line 60) | void removeVertex(Vertex vet) method printAdjList (line 73) | void printAdjList() function main (line 86) | void main() FILE: ja/codes/dart/chapter_graph/graph_adjacency_matrix.dart class GraphAdjMat (line 10) | class GraphAdjMat { method size (line 30) | int size() method addVertex (line 35) | void addVertex(int val) method removeVertex (line 49) | void removeVertex(int index) method addEdge (line 65) | void addEdge(int i, int j) method removeEdge (line 77) | void removeEdge(int i, int j) method printAdjMat (line 87) | void printAdjMat() function main (line 95) | void main() FILE: ja/codes/dart/chapter_graph/graph_bfs.dart function graphBFS (line 13) | List graphBFS(GraphAdjList graph, Vertex startVet) function main (line 41) | void main() FILE: ja/codes/dart/chapter_graph/graph_dfs.dart function dfs (line 11) | void dfs( function graphDFS (line 30) | List graphDFS(GraphAdjList graph, Vertex startVet) function main (line 40) | void main() FILE: ja/codes/dart/chapter_greedy/coin_change_greedy.dart function coinChangeGreedy (line 8) | int coinChangeGreedy(List coins, int amt) function main (line 27) | void main() FILE: ja/codes/dart/chapter_greedy/fractional_knapsack.dart class Item (line 8) | class Item { function fractionalKnapsack (line 16) | double fractionalKnapsack(List wgt, List val, int cap) function main (line 39) | void main() FILE: ja/codes/dart/chapter_greedy/max_capacity.dart function maxCapacity (line 10) | int maxCapacity(List ht) function main (line 31) | void main() FILE: ja/codes/dart/chapter_greedy/max_product_cutting.dart function maxProductCutting (line 10) | int maxProductCutting(int n) function main (line 31) | void main() FILE: ja/codes/dart/chapter_hashing/array_hash_map.dart class Pair (line 8) | class Pair { class ArrayHashMap (line 15) | class ArrayHashMap { method _hashFunc (line 24) | int _hashFunc(int key) method get (line 30) | String? get(int key) method put (line 40) | void put(int key, String val) method remove (line 47) | void remove(int key) method pairSet (line 53) | List pairSet() method keySet (line 64) | List keySet() method values (line 75) | List values() method printHashMap (line 86) | void printHashMap() function main (line 94) | void main() FILE: ja/codes/dart/chapter_hashing/built_in_hash.dart function main (line 10) | void main() FILE: ja/codes/dart/chapter_hashing/hash_map.dart function main (line 8) | void main() FILE: ja/codes/dart/chapter_hashing/hash_map_chaining.dart class HashMapChaining (line 10) | class HashMapChaining { method hashFunc (line 27) | int hashFunc(int key) method loadFactor (line 32) | double loadFactor() method get (line 37) | String? get(int key) method put (line 51) | void put(int key, String val) method remove (line 72) | void remove(int key) method extend (line 86) | void extend() method printHashMap (line 102) | void printHashMap() function main (line 114) | void main() FILE: ja/codes/dart/chapter_hashing/hash_map_open_addressing.dart class HashMapOpenAddressing (line 10) | class HashMapOpenAddressing { method hashFunc (line 25) | int hashFunc(int key) method loadFactor (line 30) | double loadFactor() method findBucket (line 35) | int findBucket(int key) method get (line 62) | String? get(int key) method put (line 74) | void put(int key, String val) method remove (line 92) | void remove(int key) method extend (line 103) | void extend() method printHashMap (line 119) | void printHashMap() function main (line 133) | void main() FILE: ja/codes/dart/chapter_hashing/simple_hash.dart function addHash (line 8) | int addHash(String key) function mulHash (line 18) | int mulHash(String key) function xorHash (line 28) | int xorHash(String key) function rotHash (line 38) | int rotHash(String key) function main (line 48) | void main() FILE: ja/codes/dart/chapter_heap/my_heap.dart class MaxHeap (line 10) | class MaxHeap { method _left (line 24) | int _left(int i) method _right (line 29) | int _right(int i) method _parent (line 34) | int _parent(int i) method _swap (line 39) | void _swap(int i, int j) method size (line 46) | int size() method isEmpty (line 51) | bool isEmpty() method peek (line 56) | int peek() method push (line 61) | void push(int val) method siftUp (line 69) | void siftUp(int i) method pop (line 85) | int pop() method siftDown (line 99) | void siftDown(int i) method print (line 117) | void print() function main (line 123) | void main() FILE: ja/codes/dart/chapter_heap/top_k.dart function topKHeap (line 10) | MinHeap topKHeap(List nums, int k) function main (line 25) | void main() class MinHeap (line 35) | class MinHeap { method getHeap (line 49) | List getHeap() method _left (line 54) | int _left(int i) method _right (line 59) | int _right(int i) method _parent (line 64) | int _parent(int i) method _swap (line 69) | void _swap(int i, int j) method size (line 76) | int size() method isEmpty (line 81) | bool isEmpty() method peek (line 86) | int peek() method push (line 91) | void push(int val) method siftUp (line 99) | void siftUp(int i) method pop (line 115) | int pop() method siftDown (line 129) | void siftDown(int i) method print (line 147) | void print() FILE: ja/codes/dart/chapter_searching/binary_search.dart function binarySearch (line 8) | int binarySearch(List nums, int target) function binarySearchLCRO (line 30) | int binarySearchLCRO(List nums, int target) function main (line 52) | void main() FILE: ja/codes/dart/chapter_searching/binary_search_edge.dart function binarySearchLeftEdge (line 10) | int binarySearchLeftEdge(List nums, int target) function binarySearchRightEdge (line 22) | int binarySearchRightEdge(List nums, int target) function main (line 36) | void main() FILE: ja/codes/dart/chapter_searching/binary_search_insertion.dart function binarySearchInsertionSimple (line 8) | int binarySearchInsertionSimple(List nums, int target) function binarySearchInsertion (line 25) | int binarySearchInsertion(List nums, int target) function main (line 42) | void main() FILE: ja/codes/dart/chapter_searching/hashing_search.dart function hashingSearchArray (line 11) | int hashingSearchArray(Map map, int target) function hashingSearchLinkedList (line 21) | ListNode? hashingSearchLinkedList(Map map, int target) function main (line 31) | void main() FILE: ja/codes/dart/chapter_searching/linear_search.dart function linearSearchArray (line 10) | int linearSearchArray(List nums, int target) function linearSearchList (line 23) | ListNode? linearSearchList(ListNode? head, int target) function main (line 35) | void main() FILE: ja/codes/dart/chapter_searching/two_sum.dart function twoSumBruteForce (line 10) | List twoSumBruteForce(List nums, int target) function twoSumHashTable (line 22) | List twoSumHashTable(List nums, int target) function main (line 37) | void main() FILE: ja/codes/dart/chapter_sorting/bubble_sort.dart function bubbleSort (line 8) | void bubbleSort(List nums) function bubbleSortWithFlag (line 24) | void bubbleSortWithFlag(List nums) function main (line 43) | void main() FILE: ja/codes/dart/chapter_sorting/bucket_sort.dart function bucketSort (line 8) | void bucketSort(List nums) function main (line 34) | void main() FILE: ja/codes/dart/chapter_sorting/counting_sort.dart function countingSortNaive (line 10) | void countingSortNaive(List nums) function countingSort (line 33) | void countingSort(List nums) function main (line 64) | void main() FILE: ja/codes/dart/chapter_sorting/heap_sort.dart function siftDown (line 8) | void siftDown(List nums, int n, int i) function heapSort (line 28) | void heapSort(List nums) function main (line 45) | void main() FILE: ja/codes/dart/chapter_sorting/insertion_sort.dart function insertionSort (line 8) | void insertionSort(List nums) function main (line 22) | void main() FILE: ja/codes/dart/chapter_sorting/merge_sort.dart function merge (line 8) | void merge(List nums, int left, int mid, int right) function mergeSort (line 35) | void mergeSort(List nums, int left, int right) function main (line 47) | void main() FILE: ja/codes/dart/chapter_sorting/quick_sort.dart class QuickSort (line 8) | class QuickSort { method _swap (line 10) | void _swap(List nums, int i, int j) method _partition (line 17) | int _partition(List nums, int left, int right) method quickSort (line 30) | void quickSort(List nums, int left, int right) class QuickSortMedian (line 42) | class QuickSortMedian { method _swap (line 44) | void _swap(List nums, int i, int j) method _medianThree (line 51) | int _medianThree(List nums, int left, int mid, int right) method _partition (line 61) | int _partition(List nums, int left, int right) method quickSort (line 78) | void quickSort(List nums, int left, int right) class QuickSortTailCall (line 90) | class QuickSortTailCall { method _swap (line 92) | void _swap(List nums, int i, int j) method _partition (line 99) | int _partition(List nums, int left, int right) method quickSort (line 112) | void quickSort(List nums, int left, int right) function main (line 130) | void main() FILE: ja/codes/dart/chapter_sorting/radix_sort.dart function digit (line 8) | int digit(int _num, int exp) function countingSortDigit (line 14) | void countingSortDigit(List nums, int exp) function radixSort (line 40) | void radixSort(List nums) function main (line 55) | void main() FILE: ja/codes/dart/chapter_sorting/selection_sort.dart function selectionSort (line 8) | void selectionSort(List nums) function main (line 25) | void main() FILE: ja/codes/dart/chapter_stack_and_queue/array_deque.dart class ArrayDeque (line 8) | class ArrayDeque { method capacity (line 20) | int capacity() method size (line 25) | int size() method isEmpty (line 30) | bool isEmpty() method index (line 35) | int index(int i) method pushFirst (line 43) | void pushFirst(int _num) method pushLast (line 56) | void pushLast(int _num) method popFirst (line 68) | int popFirst() method popLast (line 77) | int popLast() method peekFirst (line 84) | int peekFirst() method peekLast (line 92) | int peekLast() method toArray (line 102) | List toArray() function main (line 113) | void main() FILE: ja/codes/dart/chapter_stack_and_queue/array_queue.dart class ArrayQueue (line 8) | class ArrayQueue { method capaCity (line 19) | int capaCity() method size (line 24) | int size() method isEmpty (line 29) | bool isEmpty() method push (line 34) | void push(int _num) method pop (line 47) | int pop() method peek (line 56) | int peek() method toArray (line 64) | List toArray() function main (line 75) | void main() FILE: ja/codes/dart/chapter_stack_and_queue/array_stack.dart class ArrayStack (line 8) | class ArrayStack { method size (line 15) | int size() method isEmpty (line 20) | bool isEmpty() method push (line 25) | void push(int _num) method pop (line 30) | int pop() method peek (line 38) | int peek() method toArray (line 46) | List toArray() function main (line 50) | void main() FILE: ja/codes/dart/chapter_stack_and_queue/deque.dart function main (line 9) | void main() FILE: ja/codes/dart/chapter_stack_and_queue/linkedlist_deque.dart class ListNode (line 8) | class ListNode { class LinkedListDeque (line 17) | class LinkedListDeque { method size (line 28) | int size() method isEmpty (line 33) | bool isEmpty() method push (line 38) | void push(int _num, bool isFront) method pushFirst (line 60) | void pushFirst(int _num) method pushLast (line 65) | void pushLast(int _num) method pop (line 70) | int? pop(bool isFront) method popFirst (line 102) | int? popFirst() method popLast (line 107) | int? popLast() method peekFirst (line 112) | int? peekFirst() method peekLast (line 117) | int? peekLast() method toArray (line 122) | List toArray() function main (line 134) | void main() FILE: ja/codes/dart/chapter_stack_and_queue/linkedlist_queue.dart class LinkedListQueue (line 10) | class LinkedListQueue { method size (line 21) | int size() method isEmpty (line 26) | bool isEmpty() method push (line 31) | void push(int _num) method pop (line 47) | int pop() method peek (line 56) | int peek() method toArray (line 64) | List toArray() function main (line 76) | void main() FILE: ja/codes/dart/chapter_stack_and_queue/linkedlist_stack.dart class LinkedListStack (line 10) | class LinkedListStack { method size (line 19) | int size() method isEmpty (line 24) | bool isEmpty() method push (line 29) | void push(int _num) method pop (line 37) | int pop() method peek (line 45) | int peek() method toList (line 53) | List toList() function main (line 66) | void main() FILE: ja/codes/dart/chapter_stack_and_queue/queue.dart function main (line 9) | void main() FILE: ja/codes/dart/chapter_stack_and_queue/stack.dart function main (line 7) | void main() FILE: ja/codes/dart/chapter_tree/array_binary_tree.dart class ArrayBinaryTree (line 11) | class ArrayBinaryTree { method size (line 18) | int size() method val (line 23) | int? val(int i) method left (line 32) | int? left(int i) method right (line 37) | int? right(int i) method parent (line 42) | int? parent(int i) method levelOrder (line 47) | List levelOrder() method dfs (line 58) | void dfs(int i, String order, List res) method preOrder (line 80) | List preOrder() method inOrder (line 87) | List inOrder() method postOrder (line 94) | List postOrder() function main (line 102) | void main() FILE: ja/codes/dart/chapter_tree/avl_tree.dart class AVLTree (line 11) | class AVLTree { method height (line 20) | int height(TreeNode? node) method updateHeight (line 26) | void updateHeight(TreeNode? node) method balanceFactor (line 32) | int balanceFactor(TreeNode? node) method rightRotate (line 40) | TreeNode? rightRotate(TreeNode? node) method leftRotate (line 54) | TreeNode? leftRotate(TreeNode? node) method rotate (line 68) | TreeNode? rotate(TreeNode? node) method insert (line 98) | void insert(int val) method insertHelper (line 103) | TreeNode? insertHelper(TreeNode? node, int val) method remove (line 120) | void remove(int val) method removeHelper (line 125) | TreeNode? removeHelper(TreeNode? node, int val) method search (line 159) | TreeNode? search(int val) function testInsert (line 177) | void testInsert(AVLTree tree, int val) function testRemove (line 183) | void testRemove(AVLTree tree, int val) function main (line 190) | void main() FILE: ja/codes/dart/chapter_tree/binary_search_tree.dart class BinarySearchTree (line 11) | class BinarySearchTree { method getRoot (line 21) | TreeNode? getRoot() method search (line 26) | TreeNode? search(int _num) method insert (line 45) | void insert(int _num) method remove (line 74) | void remove(int _num) function main (line 123) | void main() FILE: ja/codes/dart/chapter_tree/binary_tree.dart function main (line 10) | void main() FILE: ja/codes/dart/chapter_tree/binary_tree_bfs.dart function levelOrder (line 12) | List levelOrder(TreeNode? root) function main (line 28) | void main() FILE: ja/codes/dart/chapter_tree/binary_tree_dfs.dart function preOrder (line 14) | void preOrder(TreeNode? node) function inOrder (line 23) | void inOrder(TreeNode? node) function postOrder (line 32) | void postOrder(TreeNode? node) function main (line 41) | void main() FILE: ja/codes/dart/utils/list_node.dart class ListNode (line 8) | class ListNode { function listToLinkedList (line 16) | ListNode? listToLinkedList(List list) FILE: ja/codes/dart/utils/print_util.dart class Trunk (line 12) | class Trunk { function printMatrix (line 20) | void printMatrix(List> matrix) function printLinkedList (line 29) | void printLinkedList(ListNode? head) function printTree (line 45) | void printTree(TreeNode? root, [Trunk? prev = null, bool isRight = false]) function showTrunks (line 75) | void showTrunks(Trunk? p) function printHeap (line 85) | void printHeap(List heap) FILE: ja/codes/dart/utils/tree_node.dart class TreeNode (line 8) | class TreeNode { function listToTreeDFS (line 19) | TreeNode? listToTreeDFS(List arr, int i) function listToTree (line 30) | TreeNode? listToTree(List arr) function treeToListDFS (line 35) | void treeToListDFS(TreeNode? root, int i, List res) function treeToList (line 46) | List treeToList(TreeNode? root) FILE: ja/codes/dart/utils/vertex.dart class Vertex (line 8) | class Vertex { method valsToVets (line 13) | List valsToVets(List vals) method vetsToVals (line 22) | List vetsToVals(List vets) FILE: ja/codes/go/chapter_array_and_linkedlist/array.go function randomAccess (line 12) | func randomAccess(nums []int) (randomNum int) { function extend (line 21) | func extend(nums []int, enlarge int) []int { function insert (line 33) | func insert(nums []int, num int, index int) { function remove (line 43) | func remove(nums []int, index int) { function traverse (line 51) | func traverse(nums []int) { function find (line 70) | func find(nums []int, target int) (index int) { FILE: ja/codes/go/chapter_array_and_linkedlist/array_test.go function TestArray (line 18) | func TestArray(t *testing.T) { FILE: ja/codes/go/chapter_array_and_linkedlist/linked_list.go function insertNode (line 12) | func insertNode(n0 *ListNode, P *ListNode) { function removeItem (line 19) | func removeItem(n0 *ListNode) { function access (line 30) | func access(head *ListNode, index int) *ListNode { function findNode (line 41) | func findNode(head *ListNode, target int) int { FILE: ja/codes/go/chapter_array_and_linkedlist/linked_list_test.go function TestLinkedList (line 14) | func TestLinkedList(t *testing.T) { FILE: ja/codes/go/chapter_array_and_linkedlist/list_test.go function TestList (line 14) | func TestList(t *testing.T) { FILE: ja/codes/go/chapter_array_and_linkedlist/my_list.go type myList (line 8) | type myList struct method size (line 26) | func (l *myList) size() int { method capacity (line 31) | func (l *myList) capacity() int { method get (line 36) | func (l *myList) get(index int) int { method set (line 45) | func (l *myList) set(num, index int) { method add (line 53) | func (l *myList) add(num int) { method insert (line 64) | func (l *myList) insert(num, index int) { method remove (line 82) | func (l *myList) remove(index int) int { method extendCapacity (line 98) | func (l *myList) extendCapacity() { method toArray (line 106) | func (l *myList) toArray() []int { function newMyList (line 16) | func newMyList() *myList { FILE: ja/codes/go/chapter_array_and_linkedlist/my_list_test.go function TestMyList (line 13) | func TestMyList(t *testing.T) { FILE: ja/codes/go/chapter_backtracking/n_queens.go function backtrack (line 8) | func backtrack(row, n int, state *[][]string, res *[][][]string, cols, d... function nQueens (line 40) | func nQueens(n int) [][][]string { FILE: ja/codes/go/chapter_backtracking/n_queens_test.go function TestNQueens (line 12) | func TestNQueens(t *testing.T) { FILE: ja/codes/go/chapter_backtracking/permutation_test.go function TestPermutationI (line 14) | func TestPermutationI(t *testing.T) { function TestPermutationII (line 25) | func TestPermutationII(t *testing.T) { FILE: ja/codes/go/chapter_backtracking/permutations_i.go function backtrackI (line 8) | func backtrackI(state *[]int, choices *[]int, selected *[]bool, res *[][... function permutationsI (line 32) | func permutationsI(nums []int) [][]int { FILE: ja/codes/go/chapter_backtracking/permutations_ii.go function backtrackII (line 8) | func backtrackII(state *[]int, choices *[]int, selected *[]bool, res *[]... function permutationsII (line 35) | func permutationsII(nums []int) [][]int { FILE: ja/codes/go/chapter_backtracking/preorder_traversal_i_compact.go function preOrderI (line 12) | func preOrderI(root *TreeNode, res *[]*TreeNode) { FILE: ja/codes/go/chapter_backtracking/preorder_traversal_ii_compact.go function preOrderII (line 12) | func preOrderII(root *TreeNode, res *[][]*TreeNode, path *[]*TreeNode) { FILE: ja/codes/go/chapter_backtracking/preorder_traversal_iii_compact.go function preOrderIII (line 12) | func preOrderIII(root *TreeNode, res *[][]*TreeNode, path *[]*TreeNode) { FILE: ja/codes/go/chapter_backtracking/preorder_traversal_iii_template.go function isSolution (line 12) | func isSolution(state *[]*TreeNode) bool { function recordSolution (line 17) | func recordSolution(state *[]*TreeNode, res *[][]*TreeNode) { function isValid (line 22) | func isValid(state *[]*TreeNode, choice *TreeNode) bool { function makeChoice (line 27) | func makeChoice(state *[]*TreeNode, choice *TreeNode) { function undoChoice (line 32) | func undoChoice(state *[]*TreeNode, choice *TreeNode) { function backtrackIII (line 37) | func backtrackIII(state *[]*TreeNode, choices *[]*TreeNode, res *[][]*Tr... FILE: ja/codes/go/chapter_backtracking/preorder_traversal_test.go function TestPreorderTraversalICompact (line 14) | func TestPreorderTraversalICompact(t *testing.T) { function TestPreorderTraversalIICompact (line 31) | func TestPreorderTraversalIICompact(t *testing.T) { function TestPreorderTraversalIIICompact (line 51) | func TestPreorderTraversalIIICompact(t *testing.T) { function TestPreorderTraversalIIITemplate (line 71) | func TestPreorderTraversalIIITemplate(t *testing.T) { FILE: ja/codes/go/chapter_backtracking/subset_sum_i.go function backtrackSubsetSumI (line 10) | func backtrackSubsetSumI(start, target int, state, choices *[]int, res *... function subsetSumI (line 35) | func subsetSumI(nums []int, target int) [][]int { FILE: ja/codes/go/chapter_backtracking/subset_sum_i_naive.go function backtrackSubsetSumINaive (line 8) | func backtrackSubsetSumINaive(total, target int, state, choices *[]int, ... function subsetSumINaive (line 31) | func subsetSumINaive(nums []int, target int) [][]int { FILE: ja/codes/go/chapter_backtracking/subset_sum_ii.go function backtrackSubsetSumII (line 10) | func backtrackSubsetSumII(start, target int, state, choices *[]int, res ... function subsetSumII (line 40) | func subsetSumII(nums []int, target int) [][]int { FILE: ja/codes/go/chapter_backtracking/subset_sum_test.go function TestSubsetSumINaive (line 15) | func TestSubsetSumINaive(t *testing.T) { function TestSubsetSumI (line 30) | func TestSubsetSumI(t *testing.T) { function TestSubsetSumII (line 44) | func TestSubsetSumII(t *testing.T) { FILE: ja/codes/go/chapter_computational_complexity/iteration.go function forLoop (line 10) | func forLoop(n int) int { function whileLoop (line 20) | func whileLoop(n int) int { function whileLoopII (line 34) | func whileLoopII(n int) int { function nestedForLoop (line 49) | func nestedForLoop(n int) string { FILE: ja/codes/go/chapter_computational_complexity/iteration_test.go function TestIteration (line 13) | func TestIteration(t *testing.T) { FILE: ja/codes/go/chapter_computational_complexity/recursion.go function recur (line 10) | func recur(n int) int { function forLoopRecur (line 22) | func forLoopRecur(n int) int { function tailRecur (line 42) | func tailRecur(n int, res int) int { function fib (line 52) | func fib(n int) int { FILE: ja/codes/go/chapter_computational_complexity/recursion_test.go function TestRecursion (line 13) | func TestRecursion(t *testing.T) { FILE: ja/codes/go/chapter_computational_complexity/space_complexity.go type node (line 15) | type node struct function newNode (line 21) | func newNode(val int) *node { function function (line 26) | func function() int { function spaceConstant (line 32) | func spaceConstant(n int) { function spaceLinear (line 54) | func spaceLinear(n int) { function spaceLinearRecur (line 70) | func spaceLinearRecur(n int) { function spaceQuadratic (line 79) | func spaceQuadratic(n int) { function spaceQuadraticRecur (line 88) | func spaceQuadraticRecur(n int) int { function buildTree (line 98) | func buildTree(n int) *TreeNode { FILE: ja/codes/go/chapter_computational_complexity/space_complexity_test.go function TestSpaceComplexity (line 13) | func TestSpaceComplexity(t *testing.T) { FILE: ja/codes/go/chapter_computational_complexity/time_complexity.go function constant (line 8) | func constant(n int) int { function linear (line 18) | func linear(n int) int { function arrayTraversal (line 27) | func arrayTraversal(nums []int) int { function quadratic (line 37) | func quadratic(n int) int { function bubbleSort (line 49) | func bubbleSort(nums []int) int { function exponential (line 68) | func exponential(n int) int { function expRecur (line 82) | func expRecur(n int) int { function logarithmic (line 90) | func logarithmic(n int) int { function logRecur (line 100) | func logRecur(n int) int { function linearLogRecur (line 108) | func linearLogRecur(n int) int { function factorialRecur (line 120) | func factorialRecur(n int) int { FILE: ja/codes/go/chapter_computational_complexity/time_complexity_test.go function TestTimeComplexity (line 12) | func TestTimeComplexity(t *testing.T) { FILE: ja/codes/go/chapter_computational_complexity/worst_best_time_complexity.go function randomNumbers (line 12) | func randomNumbers(n int) []int { function findOne (line 26) | func findOne(nums []int) int { FILE: ja/codes/go/chapter_computational_complexity/worst_best_time_complexity_test.go function TestWorstBestTimeComplexity (line 12) | func TestWorstBestTimeComplexity(t *testing.T) { FILE: ja/codes/go/chapter_divide_and_conquer/binary_search_recur.go function dfs (line 8) | func dfs(nums []int, target, i, j int) int { function binarySearch (line 31) | func binarySearch(nums []int, target int) int { FILE: ja/codes/go/chapter_divide_and_conquer/binary_search_recur_test.go function TestBinarySearch (line 12) | func TestBinarySearch(t *testing.T) { FILE: ja/codes/go/chapter_divide_and_conquer/build_tree.go function dfsBuildTree (line 10) | func dfsBuildTree(preorder []int, inorderMap map[int]int, i, l, r int) *... function buildTree (line 28) | func buildTree(preorder, inorder []int) *TreeNode { FILE: ja/codes/go/chapter_divide_and_conquer/build_tree_test.go function TestBuildTree (line 14) | func TestBuildTree(t *testing.T) { FILE: ja/codes/go/chapter_divide_and_conquer/hanota.go function move (line 10) | func move(src, tar *list.List) { function dfsHanota (line 20) | func dfsHanota(i int, src, buf, tar *list.List) { function solveHanota (line 35) | func solveHanota(A, B, C *list.List) { FILE: ja/codes/go/chapter_divide_and_conquer/hanota_test.go function TestHanota (line 15) | func TestHanota(t *testing.T) { FILE: ja/codes/go/chapter_dynamic_programming/climbing_stairs_backtrack.go function backtrack (line 8) | func backtrack(choices []int, state, n int, res []int) { function climbingStairsBacktrack (line 26) | func climbingStairsBacktrack(n int) int { FILE: ja/codes/go/chapter_dynamic_programming/climbing_stairs_constraint_dp.go function climbingStairsConstraintDP (line 8) | func climbingStairsConstraintDP(n int) int { FILE: ja/codes/go/chapter_dynamic_programming/climbing_stairs_dfs.go function dfs (line 8) | func dfs(i int) int { function climbingStairsDFS (line 19) | func climbingStairsDFS(n int) int { FILE: ja/codes/go/chapter_dynamic_programming/climbing_stairs_dfs_mem.go function dfsMem (line 8) | func dfsMem(i int, mem []int) int { function climbingStairsDFSMem (line 25) | func climbingStairsDFSMem(n int) int { FILE: ja/codes/go/chapter_dynamic_programming/climbing_stairs_dp.go function climbingStairsDP (line 8) | func climbingStairsDP(n int) int { function climbingStairsDPComp (line 25) | func climbingStairsDPComp(n int) int { FILE: ja/codes/go/chapter_dynamic_programming/climbing_stairs_test.go function TestClimbingStairsBacktrack (line 12) | func TestClimbingStairsBacktrack(t *testing.T) { function TestClimbingStairsDFS (line 18) | func TestClimbingStairsDFS(t *testing.T) { function TestClimbingStairsDFSMem (line 24) | func TestClimbingStairsDFSMem(t *testing.T) { function TestClimbingStairsDP (line 30) | func TestClimbingStairsDP(t *testing.T) { function TestClimbingStairsDPComp (line 36) | func TestClimbingStairsDPComp(t *testing.T) { function TestClimbingStairsConstraintDP (line 42) | func TestClimbingStairsConstraintDP(t *testing.T) { function TestMinCostClimbingStairsDPComp (line 48) | func TestMinCostClimbingStairsDPComp(t *testing.T) { FILE: ja/codes/go/chapter_dynamic_programming/coin_change.go function coinChangeDP (line 10) | func coinChangeDP(coins []int, amt int) int { function coinChangeDPComp (line 41) | func coinChangeDPComp(coins []int, amt int) int { FILE: ja/codes/go/chapter_dynamic_programming/coin_change_ii.go function coinChangeIIDP (line 8) | func coinChangeIIDP(coins []int, amt int) int { function coinChangeIIDPComp (line 35) | func coinChangeIIDPComp(coins []int, amt int) int { FILE: ja/codes/go/chapter_dynamic_programming/coin_change_test.go function TestCoinChange (line 12) | func TestCoinChange(t *testing.T) { FILE: ja/codes/go/chapter_dynamic_programming/edit_distance.go function editDistanceDFS (line 8) | func editDistanceDFS(s string, t string, i int, j int) int { function editDistanceDFSMem (line 34) | func editDistanceDFSMem(s string, t string, mem [][]int, i int, j int) i... function editDistanceDP (line 65) | func editDistanceDP(s string, t string) int { function editDistanceDPComp (line 95) | func editDistanceDPComp(s string, t string) int { function MinInt (line 124) | func MinInt(a, b int) int { FILE: ja/codes/go/chapter_dynamic_programming/edit_distance_test.go function TestEditDistanceDFS (line 12) | func TestEditDistanceDFS(test *testing.T) { FILE: ja/codes/go/chapter_dynamic_programming/knapsack.go function knapsackDFS (line 10) | func knapsackDFS(wgt, val []int, i, c int) int { function knapsackDFSMem (line 27) | func knapsackDFSMem(wgt, val []int, mem [][]int, i, c int) int { function knapsackDP (line 49) | func knapsackDP(wgt, val []int, cap int) int { function knapsackDPComp (line 72) | func knapsackDPComp(wgt, val []int, cap int) int { FILE: ja/codes/go/chapter_dynamic_programming/knapsack_test.go function TestKnapsack (line 12) | func TestKnapsack(t *testing.T) { function TestUnboundedKnapsack (line 42) | func TestUnboundedKnapsack(t *testing.T) { FILE: ja/codes/go/chapter_dynamic_programming/min_cost_climbing_stairs_dp.go function minCostClimbingStairsDP (line 8) | func minCostClimbingStairsDP(cost []int) int { function minCostClimbingStairsDPComp (line 32) | func minCostClimbingStairsDPComp(cost []int) int { FILE: ja/codes/go/chapter_dynamic_programming/min_path_sum.go function minPathSumDFS (line 10) | func minPathSumDFS(grid [][]int, i, j int) int { function minPathSumDFSMem (line 27) | func minPathSumDFSMem(grid, mem [][]int, i, j int) int { function minPathSumDP (line 49) | func minPathSumDP(grid [][]int) int { function minPathSumDPComp (line 75) | func minPathSumDPComp(grid [][]int) int { FILE: ja/codes/go/chapter_dynamic_programming/min_path_sum_test.go function TestMinPathSum (line 12) | func TestMinPathSum(t *testing.T) { FILE: ja/codes/go/chapter_dynamic_programming/unbounded_knapsack.go function unboundedKnapsackDP (line 10) | func unboundedKnapsackDP(wgt, val []int, cap int) int { function unboundedKnapsackDPComp (line 33) | func unboundedKnapsackDPComp(wgt, val []int, cap int) int { FILE: ja/codes/go/chapter_graph/graph_adjacency_list.go type graphAdjList (line 16) | type graphAdjList struct method size (line 36) | func (g *graphAdjList) size() int { method addEdge (line 41) | func (g *graphAdjList) addEdge(vet1 Vertex, vet2 Vertex) { method removeEdge (line 53) | func (g *graphAdjList) removeEdge(vet1 Vertex, vet2 Vertex) { method addVertex (line 65) | func (g *graphAdjList) addVertex(vet Vertex) { method removeVertex (line 75) | func (g *graphAdjList) removeVertex(vet Vertex) { method print (line 89) | func (g *graphAdjList) print() { function newGraphAdjList (line 22) | func newGraphAdjList(edges [][]Vertex) *graphAdjList { FILE: ja/codes/go/chapter_graph/graph_adjacency_list_test.go function TestGraphAdjList (line 14) | func TestGraphAdjList(t *testing.T) { FILE: ja/codes/go/chapter_graph/graph_adjacency_matrix.go type graphAdjMat (line 10) | type graphAdjMat struct method size (line 39) | func (g *graphAdjMat) size() int { method addVertex (line 44) | func (g *graphAdjMat) addVertex(val int) { method removeVertex (line 58) | func (g *graphAdjMat) removeVertex(index int) { method addEdge (line 74) | func (g *graphAdjMat) addEdge(i, j int) { method removeEdge (line 86) | func (g *graphAdjMat) removeEdge(i, j int) { method print (line 96) | func (g *graphAdjMat) print() { function newGraphAdjMat (line 18) | func newGraphAdjMat(vertices []int, edges [][]int) *graphAdjMat { FILE: ja/codes/go/chapter_graph/graph_adjacency_matrix_test.go function TestGraphAdjMat (line 12) | func TestGraphAdjMat(t *testing.T) { FILE: ja/codes/go/chapter_graph/graph_bfs.go function graphBFS (line 13) | func graphBFS(g *graphAdjList, startVet Vertex) []Vertex { FILE: ja/codes/go/chapter_graph/graph_bfs_test.go function TestGraphBFS (line 14) | func TestGraphBFS(t *testing.T) { FILE: ja/codes/go/chapter_graph/graph_dfs.go function dfs (line 12) | func dfs(g *graphAdjList, visited map[Vertex]struct{}, res *[]Vertex, ve... function graphDFS (line 28) | func graphDFS(g *graphAdjList, startVet Vertex) []Vertex { FILE: ja/codes/go/chapter_graph/graph_dfs_test.go function TestGraphDFS (line 14) | func TestGraphDFS(t *testing.T) { FILE: ja/codes/go/chapter_greedy/coin_change_greedy.go function coinChangeGreedy (line 8) | func coinChangeGreedy(coins []int, amt int) int { FILE: ja/codes/go/chapter_greedy/coin_change_greedy_test.go function TestCoinChangeGreedy (line 12) | func TestCoinChangeGreedy(t *testing.T) { FILE: ja/codes/go/chapter_greedy/fractional_knapsack.go type Item (line 10) | type Item struct function fractionalKnapsack (line 16) | func fractionalKnapsack(wgt []int, val []int, cap int) float64 { FILE: ja/codes/go/chapter_greedy/fractional_knapsack_test.go function TestFractionalKnapsack (line 12) | func TestFractionalKnapsack(t *testing.T) { FILE: ja/codes/go/chapter_greedy/max_capacity.go function maxCapacity (line 10) | func maxCapacity(ht []int) int { FILE: ja/codes/go/chapter_greedy/max_capacity_test.go function TestMaxCapacity (line 12) | func TestMaxCapacity(t *testing.T) { FILE: ja/codes/go/chapter_greedy/max_product_cutting.go function maxProductCutting (line 10) | func maxProductCutting(n int) int { FILE: ja/codes/go/chapter_greedy/max_product_cutting_test.go function TestMaxProductCutting (line 12) | func TestMaxProductCutting(t *testing.T) { FILE: ja/codes/go/chapter_hashing/array_hash_map.go type pair (line 10) | type pair struct type arrayHashMap (line 16) | type arrayHashMap struct method hashFunc (line 28) | func (a *arrayHashMap) hashFunc(key int) int { method get (line 34) | func (a *arrayHashMap) get(key int) string { method put (line 44) | func (a *arrayHashMap) put(key int, val string) { method remove (line 51) | func (a *arrayHashMap) remove(key int) { method pairSet (line 58) | func (a *arrayHashMap) pairSet() []*pair { method keySet (line 69) | func (a *arrayHashMap) keySet() []int { method valueSet (line 80) | func (a *arrayHashMap) valueSet() []string { method print (line 91) | func (a *arrayHashMap) print() { function newArrayHashMap (line 21) | func newArrayHashMap() *arrayHashMap { FILE: ja/codes/go/chapter_hashing/array_hash_map_test.go function TestArrayHashMap (line 12) | func TestArrayHashMap(t *testing.T) { FILE: ja/codes/go/chapter_hashing/hash_collision_test.go function TestHashMapChaining (line 12) | func TestHashMapChaining(t *testing.T) { function TestHashMapOpenAddressing (line 38) | func TestHashMapOpenAddressing(t *testing.T) { FILE: ja/codes/go/chapter_hashing/hash_map_chaining.go type hashMapChaining (line 14) | type hashMapChaining struct method hashFunc (line 38) | func (m *hashMapChaining) hashFunc(key int) int { method loadFactor (line 43) | func (m *hashMapChaining) loadFactor() float64 { method get (line 48) | func (m *hashMapChaining) get(key int) string { method put (line 62) | func (m *hashMapChaining) put(key int, val string) { method remove (line 85) | func (m *hashMapChaining) remove(key int) { method extend (line 99) | func (m *hashMapChaining) extend() { method print (line 122) | func (m *hashMapChaining) print() { function newHashMapChaining (line 23) | func newHashMapChaining() *hashMapChaining { FILE: ja/codes/go/chapter_hashing/hash_map_open_addressing.go type hashMapOpenAddressing (line 12) | type hashMapOpenAddressing struct method hashFunc (line 34) | func (h *hashMapOpenAddressing) hashFunc(key int) int { method loadFactor (line 39) | func (h *hashMapOpenAddressing) loadFactor() float64 { method findBucket (line 44) | func (h *hashMapOpenAddressing) findBucket(key int) int { method get (line 70) | func (h *hashMapOpenAddressing) get(key int) string { method put (line 79) | func (h *hashMapOpenAddressing) put(key int, val string) { method remove (line 93) | func (h *hashMapOpenAddressing) remove(key int) { method extend (line 102) | func (h *hashMapOpenAddressing) extend() { method print (line 116) | func (h *hashMapOpenAddressing) print() { function newHashMapOpenAddressing (line 22) | func newHashMapOpenAddressing() *hashMapOpenAddressing { FILE: ja/codes/go/chapter_hashing/hash_map_test.go function TestHashMap (line 15) | func TestHashMap(t *testing.T) { function TestSimpleHash (line 58) | func TestSimpleHash(t *testing.T) { FILE: ja/codes/go/chapter_hashing/simple_hash.go function addHash (line 10) | func addHash(key string) int { function mulHash (line 22) | func mulHash(key string) int { function xorHash (line 34) | func xorHash(key string) int { function rotHash (line 46) | func rotHash(key string) int { FILE: ja/codes/go/chapter_heap/heap.go type intHeap (line 9) | type intHeap method Push (line 12) | func (h *intHeap) Push(x any) { method Pop (line 19) | func (h *intHeap) Pop() any { method Len (line 27) | func (h *intHeap) Len() int { method Less (line 32) | func (h *intHeap) Less(i, j int) bool { method Swap (line 38) | func (h *intHeap) Swap(i, j int) { method Top (line 43) | func (h *intHeap) Top() any { FILE: ja/codes/go/chapter_heap/heap_test.go function testPush (line 16) | func testPush(h *intHeap, val int) { function testPop (line 23) | func testPop(h *intHeap) { function TestHeap (line 30) | func TestHeap(t *testing.T) { function TestMyHeap (line 62) | func TestMyHeap(t *testing.T) { function TestTopKHeap (line 93) | func TestTopKHeap(t *testing.T) { FILE: ja/codes/go/chapter_heap/my_heap.go type maxHeap (line 13) | type maxHeap struct method left (line 37) | func (h *maxHeap) left(i int) int { method right (line 42) | func (h *maxHeap) right(i int) int { method parent (line 47) | func (h *maxHeap) parent(i int) int { method swap (line 53) | func (h *maxHeap) swap(i, j int) { method size (line 58) | func (h *maxHeap) size() int { method isEmpty (line 63) | func (h *maxHeap) isEmpty() bool { method peek (line 68) | func (h *maxHeap) peek() any { method push (line 73) | func (h *maxHeap) push(val any) { method siftUp (line 81) | func (h *maxHeap) siftUp(i int) { method pop (line 97) | func (h *maxHeap) pop() any { method siftDown (line 116) | func (h *maxHeap) siftDown(i int) { method print (line 138) | func (h *maxHeap) print() { function newHeap (line 19) | func newHeap() *maxHeap { function newMaxHeap (line 26) | func newMaxHeap(nums []any) *maxHeap { FILE: ja/codes/go/chapter_heap/top_k.go type minHeap (line 9) | type minHeap method Len (line 11) | func (h *minHeap) Len() int { return len(*h) } method Less (line 12) | func (h *minHeap) Less(i, j int) bool { return (*h)[i].(int) < (*h)[j]... method Swap (line 13) | func (h *minHeap) Swap(i, j int) { (*h)[i], (*h)[j] = (*h)[j], (*... method Push (line 16) | func (h *minHeap) Push(x any) { method Pop (line 21) | func (h *minHeap) Pop() any { method Top (line 29) | func (h *minHeap) Top() any { function topKHeap (line 34) | func topKHeap(nums []int, k int) *minHeap { FILE: ja/codes/go/chapter_searching/binary_search.go function binarySearch (line 8) | func binarySearch(nums []int, target int) int { function binarySearchLCRO (line 27) | func binarySearchLCRO(nums []int, target int) int { FILE: ja/codes/go/chapter_searching/binary_search_edge.go function binarySearchLeftEdge (line 8) | func binarySearchLeftEdge(nums []int, target int) int { function binarySearchRightEdge (line 20) | func binarySearchRightEdge(nums []int, target int) int { FILE: ja/codes/go/chapter_searching/binary_search_insertion.go function binarySearchInsertionSimple (line 8) | func binarySearchInsertionSimple(nums []int, target int) int { function binarySearchInsertion (line 30) | func binarySearchInsertion(nums []int, target int) int { FILE: ja/codes/go/chapter_searching/binary_search_test.go function TestBinarySearch (line 12) | func TestBinarySearch(t *testing.T) { function TestBinarySearchEdge (line 26) | func TestBinarySearchEdge(t *testing.T) { function TestBinarySearchInsertion (line 41) | func TestBinarySearchInsertion(t *testing.T) { FILE: ja/codes/go/chapter_searching/hashing_search.go function hashingSearchArray (line 10) | func hashingSearchArray(m map[int]int, target int) int { function hashingSearchLinkedList (line 21) | func hashingSearchLinkedList(m map[int]*ListNode, target int) *ListNode { FILE: ja/codes/go/chapter_searching/hashing_search_test.go function TestHashingSearch (line 14) | func TestHashingSearch(t *testing.T) { FILE: ja/codes/go/chapter_searching/linear_search.go function linearSearchArray (line 12) | func linearSearchArray(nums []int, target int) int { function linearSearchLinkedList (line 25) | func linearSearchLinkedList(node *ListNode, target int) *ListNode { FILE: ja/codes/go/chapter_searching/linear_search_test.go function TestLinearSearch (line 14) | func TestLinearSearch(t *testing.T) { FILE: ja/codes/go/chapter_searching/two_sum.go function twoSumBruteForce (line 8) | func twoSumBruteForce(nums []int, target int) []int { function twoSumHashTable (line 22) | func twoSumHashTable(nums []int, target int) []int { FILE: ja/codes/go/chapter_searching/two_sum_test.go function TestTwoSum (line 12) | func TestTwoSum(t *testing.T) { FILE: ja/codes/go/chapter_sorting/bubble_sort.go function bubbleSort (line 8) | func bubbleSort(nums []int) { function bubbleSortWithFlag (line 22) | func bubbleSortWithFlag(nums []int) { FILE: ja/codes/go/chapter_sorting/bubble_sort_test.go function TestBubbleSort (line 12) | func TestBubbleSort(t *testing.T) { FILE: ja/codes/go/chapter_sorting/bucket_sort.go function bucketSort (line 10) | func bucketSort(nums []float64) { FILE: ja/codes/go/chapter_sorting/bucket_sort_test.go function TestBucketSort (line 12) | func TestBucketSort(t *testing.T) { FILE: ja/codes/go/chapter_sorting/counting_sort.go type CountingSort (line 7) | type CountingSort struct function countingSortNaive (line 11) | func countingSortNaive(nums []int) { function countingSort (line 36) | func countingSort(nums []int) { FILE: ja/codes/go/chapter_sorting/counting_sort_test.go function TestCountingSort (line 12) | func TestCountingSort(t *testing.T) { FILE: ja/codes/go/chapter_sorting/heap_sort.go function siftDown (line 8) | func siftDown(nums *[]int, n, i int) { function heapSort (line 32) | func heapSort(nums *[]int) { FILE: ja/codes/go/chapter_sorting/heap_sort_test.go function TestHeapSort (line 12) | func TestHeapSort(t *testing.T) { FILE: ja/codes/go/chapter_sorting/insertion_sort.go function insertionSort (line 8) | func insertionSort(nums []int) { FILE: ja/codes/go/chapter_sorting/insertion_sort_test.go function TestInsertionSort (line 12) | func TestInsertionSort(t *testing.T) { FILE: ja/codes/go/chapter_sorting/merge_sort.go function merge (line 8) | func merge(nums []int, left, mid, right int) { function mergeSort (line 43) | func mergeSort(nums []int, left, right int) { FILE: ja/codes/go/chapter_sorting/merge_sort_test.go function TestMergeSort (line 12) | func TestMergeSort(t *testing.T) { FILE: ja/codes/go/chapter_sorting/quick_sort.go type quickSort (line 8) | type quickSort struct method partition (line 17) | func (q *quickSort) partition(nums []int, left, right int) int { method quickSort (line 36) | func (q *quickSort) quickSort(nums []int, left, right int) { type quickSortMedian (line 11) | type quickSortMedian struct method medianThree (line 49) | func (q *quickSortMedian) medianThree(nums []int, left, mid, right int... method partition (line 61) | func (q *quickSortMedian) partition(nums []int, left, right int) int { method quickSort (line 84) | func (q *quickSortMedian) quickSort(nums []int, left, right int) { type quickSortTailCall (line 14) | type quickSortTailCall struct method partition (line 97) | func (q *quickSortTailCall) partition(nums []int, left, right int) int { method quickSort (line 116) | func (q *quickSortTailCall) quickSort(nums []int, left, right int) { FILE: ja/codes/go/chapter_sorting/quick_sort_test.go function TestQuickSort (line 13) | func TestQuickSort(t *testing.T) { function TestQuickSortMedian (line 21) | func TestQuickSortMedian(t *testing.T) { function TestQuickSortTailCall (line 29) | func TestQuickSortTailCall(t *testing.T) { FILE: ja/codes/go/chapter_sorting/radix_sort.go function digit (line 10) | func digit(num, exp int) int { function countingSortDigit (line 16) | func countingSortDigit(nums []int, exp int) { function radixSort (line 44) | func radixSort(nums []int) { FILE: ja/codes/go/chapter_sorting/radix_sort_test.go function TestRadixSort (line 12) | func TestRadixSort(t *testing.T) { FILE: ja/codes/go/chapter_sorting/selection_sort.go function selectionSort (line 8) | func selectionSort(nums []int) { FILE: ja/codes/go/chapter_sorting/selection_sort_test.go function TestSelectionSort (line 12) | func TestSelectionSort(t *testing.T) { FILE: ja/codes/go/chapter_stack_and_queue/array_deque.go type arrayDeque (line 10) | type arrayDeque struct method size (line 28) | func (q *arrayDeque) size() int { method isEmpty (line 33) | func (q *arrayDeque) isEmpty() bool { method index (line 38) | func (q *arrayDeque) index(i int) int { method pushFirst (line 46) | func (q *arrayDeque) pushFirst(num int) { method pushLast (line 60) | func (q *arrayDeque) pushLast(num int) { method popFirst (line 73) | func (q *arrayDeque) popFirst() any { method popLast (line 85) | func (q *arrayDeque) popLast() any { method peekFirst (line 95) | func (q *arrayDeque) peekFirst() any { method peekLast (line 103) | func (q *arrayDeque) peekLast() any { method toSlice (line 113) | func (q *arrayDeque) toSlice() []int { function newArrayDeque (line 18) | func newArrayDeque(queCapacity int) *arrayDeque { FILE: ja/codes/go/chapter_stack_and_queue/array_queue.go type arrayQueue (line 8) | type arrayQueue struct method size (line 26) | func (q *arrayQueue) size() int { method isEmpty (line 31) | func (q *arrayQueue) isEmpty() bool { method push (line 36) | func (q *arrayQueue) push(num int) { method pop (line 50) | func (q *arrayQueue) pop() any { method peek (line 63) | func (q *arrayQueue) peek() any { method toSlice (line 71) | func (q *arrayQueue) toSlice() []int { function newArrayQueue (line 16) | func newArrayQueue(queCapacity int) *arrayQueue { FILE: ja/codes/go/chapter_stack_and_queue/array_stack.go type arrayStack (line 8) | type arrayStack struct method size (line 21) | func (s *arrayStack) size() int { method isEmpty (line 26) | func (s *arrayStack) isEmpty() bool { method push (line 31) | func (s *arrayStack) push(v int) { method pop (line 37) | func (s *arrayStack) pop() any { method peek (line 44) | func (s *arrayStack) peek() any { method toSlice (line 53) | func (s *arrayStack) toSlice() []int { function newArrayStack (line 13) | func newArrayStack() *arrayStack { FILE: ja/codes/go/chapter_stack_and_queue/deque_test.go function TestDeque (line 15) | func TestDeque(t *testing.T) { function TestArrayDeque (line 52) | func TestArrayDeque(t *testing.T) { function TestLinkedListDeque (line 95) | func TestLinkedListDeque(t *testing.T) { function BenchmarkLinkedListDeque (line 132) | func BenchmarkLinkedListDeque(b *testing.B) { FILE: ja/codes/go/chapter_stack_and_queue/linkedlist_deque.go type linkedListDeque (line 12) | type linkedListDeque struct method pushFirst (line 25) | func (s *linkedListDeque) pushFirst(value any) { method pushLast (line 30) | func (s *linkedListDeque) pushLast(value any) { method popFirst (line 35) | func (s *linkedListDeque) popFirst() any { method popLast (line 45) | func (s *linkedListDeque) popLast() any { method peekFirst (line 55) | func (s *linkedListDeque) peekFirst() any { method peekLast (line 64) | func (s *linkedListDeque) peekLast() any { method size (line 73) | func (s *linkedListDeque) size() int { method isEmpty (line 78) | func (s *linkedListDeque) isEmpty() bool { method toList (line 83) | func (s *linkedListDeque) toList() *list.List { function newLinkedListDeque (line 18) | func newLinkedListDeque() *linkedListDeque { FILE: ja/codes/go/chapter_stack_and_queue/linkedlist_queue.go type linkedListQueue (line 12) | type linkedListQueue struct method push (line 25) | func (s *linkedListQueue) push(value any) { method pop (line 30) | func (s *linkedListQueue) pop() any { method peek (line 40) | func (s *linkedListQueue) peek() any { method size (line 49) | func (s *linkedListQueue) size() int { method isEmpty (line 54) | func (s *linkedListQueue) isEmpty() bool { method toList (line 59) | func (s *linkedListQueue) toList() *list.List { function newLinkedListQueue (line 18) | func newLinkedListQueue() *linkedListQueue { FILE: ja/codes/go/chapter_stack_and_queue/linkedlist_stack.go type linkedListStack (line 12) | type linkedListStack struct method push (line 25) | func (s *linkedListStack) push(value int) { method pop (line 30) | func (s *linkedListStack) pop() any { method peek (line 40) | func (s *linkedListStack) peek() any { method size (line 49) | func (s *linkedListStack) size() int { method isEmpty (line 54) | func (s *linkedListStack) isEmpty() bool { method toList (line 59) | func (s *linkedListStack) toList() *list.List { function newLinkedListStack (line 18) | func newLinkedListStack() *linkedListStack { FILE: ja/codes/go/chapter_stack_and_queue/queue_test.go function TestQueue (line 15) | func TestQueue(t *testing.T) { function TestArrayQueue (line 48) | func TestArrayQueue(t *testing.T) { function TestLinkedListQueue (line 92) | func TestLinkedListQueue(t *testing.T) { function BenchmarkArrayQueue (line 124) | func BenchmarkArrayQueue(b *testing.B) { function BenchmarkLinkedQueue (line 137) | func BenchmarkLinkedQueue(b *testing.B) { FILE: ja/codes/go/chapter_stack_and_queue/stack_test.go function TestStack (line 14) | func TestStack(t *testing.T) { function TestArrayStack (line 47) | func TestArrayStack(t *testing.T) { function TestLinkedListStack (line 78) | func TestLinkedListStack(t *testing.T) { function BenchmarkArrayStack (line 109) | func BenchmarkArrayStack(b *testing.B) { function BenchmarkLinkedListStack (line 121) | func BenchmarkLinkedListStack(b *testing.B) { FILE: ja/codes/go/chapter_tree/array_binary_tree.go type arrayBinaryTree (line 8) | type arrayBinaryTree struct method size (line 20) | func (abt *arrayBinaryTree) size() int { method val (line 25) | func (abt *arrayBinaryTree) val(i int) any { method left (line 34) | func (abt *arrayBinaryTree) left(i int) int { method right (line 39) | func (abt *arrayBinaryTree) right(i int) int { method parent (line 44) | func (abt *arrayBinaryTree) parent(i int) int { method levelOrder (line 49) | func (abt *arrayBinaryTree) levelOrder() []any { method dfs (line 61) | func (abt *arrayBinaryTree) dfs(i int, order string, res *[]any) { method preOrder (line 83) | func (abt *arrayBinaryTree) preOrder() []any { method inOrder (line 90) | func (abt *arrayBinaryTree) inOrder() []any { method postOrder (line 97) | func (abt *arrayBinaryTree) postOrder() []any { function newArrayBinaryTree (line 13) | func newArrayBinaryTree(arr []any) *arrayBinaryTree { FILE: ja/codes/go/chapter_tree/array_binary_tree_test.go function TestArrayBinaryTree (line 14) | func TestArrayBinaryTree(t *testing.T) { FILE: ja/codes/go/chapter_tree/avl_tree.go type aVLTree (line 10) | type aVLTree struct method height (line 20) | func (t *aVLTree) height(node *TreeNode) int { method updateHeight (line 29) | func (t *aVLTree) updateHeight(node *TreeNode) { method balanceFactor (line 41) | func (t *aVLTree) balanceFactor(node *TreeNode) int { method rightRotate (line 51) | func (t *aVLTree) rightRotate(node *TreeNode) *TreeNode { method leftRotate (line 65) | func (t *aVLTree) leftRotate(node *TreeNode) *TreeNode { method rotate (line 79) | func (t *aVLTree) rotate(node *TreeNode) *TreeNode { method insert (line 110) | func (t *aVLTree) insert(val int) { method insertHelper (line 115) | func (t *aVLTree) insertHelper(node *TreeNode, val int) *TreeNode { method remove (line 137) | func (t *aVLTree) remove(val int) { method removeHelper (line 142) | func (t *aVLTree) removeHelper(node *TreeNode, val int) *TreeNode { method search (line 183) | func (t *aVLTree) search(val int) *TreeNode { function newAVLTree (line 15) | func newAVLTree() *aVLTree { FILE: ja/codes/go/chapter_tree/avl_tree_test.go function TestAVLTree (line 14) | func TestAVLTree(t *testing.T) { function testInsert (line 44) | func testInsert(tree *aVLTree, val int) { function testRemove (line 50) | func testRemove(tree *aVLTree, val int) { FILE: ja/codes/go/chapter_tree/binary_search_tree.go type binarySearchTree (line 11) | type binarySearchTree struct method getRoot (line 23) | func (bst *binarySearchTree) getRoot() *TreeNode { method search (line 28) | func (bst *binarySearchTree) search(num int) *TreeNode { method insert (line 48) | func (bst *binarySearchTree) insert(num int) { method remove (line 79) | func (bst *binarySearchTree) remove(num int) { method print (line 140) | func (bst *binarySearchTree) print() { function newBinarySearchTree (line 15) | func newBinarySearchTree() *binarySearchTree { FILE: ja/codes/go/chapter_tree/binary_search_tree_test.go function TestBinarySearchTree (line 12) | func TestBinarySearchTree(t *testing.T) { FILE: ja/codes/go/chapter_tree/binary_tree_bfs.go function levelOrder (line 14) | func levelOrder(root *TreeNode) []any { FILE: ja/codes/go/chapter_tree/binary_tree_bfs_test.go function TestLevelOrder (line 14) | func TestLevelOrder(t *testing.T) { FILE: ja/codes/go/chapter_tree/binary_tree_dfs.go function preOrder (line 14) | func preOrder(node *TreeNode) { function inOrder (line 25) | func inOrder(node *TreeNode) { function postOrder (line 36) | func postOrder(node *TreeNode) { FILE: ja/codes/go/chapter_tree/binary_tree_dfs_test.go function TestPreInPostOrderTraversal (line 14) | func TestPreInPostOrderTraversal(t *testing.T) { FILE: ja/codes/go/chapter_tree/binary_tree_test.go function TestBinaryTree (line 14) | func TestBinaryTree(t *testing.T) { FILE: ja/codes/go/pkg/list_node.go type ListNode (line 8) | type ListNode struct function NewListNode (line 14) | func NewListNode(v int) *ListNode { function ArrayToLinkedList (line 22) | func ArrayToLinkedList(arr []int) *ListNode { FILE: ja/codes/go/pkg/list_node_test.go function TestListNode (line 11) | func TestListNode(t *testing.T) { FILE: ja/codes/go/pkg/print_utils.go function PrintSlice (line 15) | func PrintSlice[T any](nums []T) { function PrintList (line 21) | func PrintList(list *list.List) { function PrintMap (line 37) | func PrintMap[K comparable, V any](m map[K]V) { function PrintHeap (line 44) | func PrintHeap(h []any) { function PrintLinkedList (line 53) | func PrintLinkedList(node *ListNode) { function PrintTree (line 67) | func PrintTree(root *TreeNode) { function printTreeHelper (line 74) | func printTreeHelper(root *TreeNode, prev *trunk, isRight bool) { type trunk (line 99) | type trunk struct function newTrunk (line 104) | func newTrunk(prev *trunk, str string) *trunk { function showTrunk (line 111) | func showTrunk(t *trunk) { FILE: ja/codes/go/pkg/tree_node.go type TreeNode (line 8) | type TreeNode struct function NewTreeNode (line 16) | func NewTreeNode(v any) *TreeNode { function SliceToTreeDFS (line 45) | func SliceToTreeDFS(arr []any, i int) *TreeNode { function SliceToTree (line 56) | func SliceToTree(arr []any) *TreeNode { function TreeToSliceDFS (line 61) | func TreeToSliceDFS(root *TreeNode, i int, res *[]any) { function TreeToSlice (line 74) | func TreeToSlice(root *TreeNode) []any { FILE: ja/codes/go/pkg/tree_node_test.go function TestTreeNode (line 12) | func TestTreeNode(t *testing.T) { FILE: ja/codes/go/pkg/vertex.go type Vertex (line 8) | type Vertex struct function NewVertex (line 13) | func NewVertex(val int) Vertex { function ValsToVets (line 20) | func ValsToVets(vals []int) []Vertex { function VetsToVals (line 29) | func VetsToVals(vets []Vertex) []int { function DeleteSliceElms (line 38) | func DeleteSliceElms[T any](a []T, elms ...T) []T { FILE: ja/codes/java/chapter_array_and_linkedlist/array.java class array (line 12) | public class array { method randomAccess (line 14) | static int randomAccess(int[] nums) { method extend (line 23) | static int[] extend(int[] nums, int enlarge) { method insert (line 35) | static void insert(int[] nums, int num, int index) { method remove (line 45) | static void remove(int[] nums, int index) { method traverse (line 53) | static void traverse(int[] nums) { method find (line 66) | static int find(int[] nums, int target) { method main (line 75) | public static void main(String[] args) { FILE: ja/codes/java/chapter_array_and_linkedlist/linked_list.java class linked_list (line 11) | public class linked_list { method insert (line 13) | static void insert(ListNode n0, ListNode P) { method remove (line 20) | static void remove(ListNode n0) { method access (line 30) | static ListNode access(ListNode head, int index) { method find (line 40) | static int find(ListNode head, int target) { method main (line 52) | public static void main(String[] args) { FILE: ja/codes/java/chapter_array_and_linkedlist/list.java class list (line 11) | public class list { method main (line 12) | public static void main(String[] args) { FILE: ja/codes/java/chapter_array_and_linkedlist/my_list.java class MyList (line 12) | class MyList { method MyList (line 19) | public MyList() { method size (line 24) | public int size() { method capacity (line 29) | public int capacity() { method get (line 34) | public int get(int index) { method set (line 42) | public void set(int index, int num) { method add (line 49) | public void add(int num) { method insert (line 59) | public void insert(int index, int num) { method remove (line 75) | public int remove(int index) { method extendCapacity (line 90) | public void extendCapacity() { method toArray (line 98) | public int[] toArray() { class my_list (line 109) | public class my_list { method main (line 111) | public static void main(String[] args) { FILE: ja/codes/java/chapter_backtracking/n_queens.java class n_queens (line 11) | public class n_queens { method backtrack (line 13) | public static void backtrack(int row, int n, List> state,... method nQueens (line 44) | public static List>> nQueens(int n) { method main (line 64) | public static void main(String[] args) { FILE: ja/codes/java/chapter_backtracking/permutations_i.java class permutations_i (line 11) | public class permutations_i { method backtrack (line 13) | public static void backtrack(List state, int[] choices, boole... method permutationsI (line 37) | static List> permutationsI(int[] nums) { method main (line 43) | public static void main(String[] args) { FILE: ja/codes/java/chapter_backtracking/permutations_ii.java class permutations_ii (line 11) | public class permutations_ii { method backtrack (line 13) | static void backtrack(List state, int[] choices, boolean[] se... method permutationsII (line 39) | static List> permutationsII(int[] nums) { method main (line 45) | public static void main(String[] args) { FILE: ja/codes/java/chapter_backtracking/preorder_traversal_i_compact.java class preorder_traversal_i_compact (line 12) | public class preorder_traversal_i_compact { method preOrder (line 16) | static void preOrder(TreeNode root) { method main (line 28) | public static void main(String[] args) { FILE: ja/codes/java/chapter_backtracking/preorder_traversal_ii_compact.java class preorder_traversal_ii_compact (line 12) | public class preorder_traversal_ii_compact { method preOrder (line 17) | static void preOrder(TreeNode root) { method main (line 33) | public static void main(String[] args) { FILE: ja/codes/java/chapter_backtracking/preorder_traversal_iii_compact.java class preorder_traversal_iii_compact (line 12) | public class preorder_traversal_iii_compact { method preOrder (line 17) | static void preOrder(TreeNode root) { method main (line 34) | public static void main(String[] args) { FILE: ja/codes/java/chapter_backtracking/preorder_traversal_iii_template.java class preorder_traversal_iii_template (line 12) | public class preorder_traversal_iii_template { method isSolution (line 14) | static boolean isSolution(List state) { method recordSolution (line 19) | static void recordSolution(List state, List> ... method isValid (line 24) | static boolean isValid(List state, TreeNode choice) { method makeChoice (line 29) | static void makeChoice(List state, TreeNode choice) { method undoChoice (line 34) | static void undoChoice(List state, TreeNode choice) { method backtrack (line 39) | static void backtrack(List state, List choices, Li... method main (line 59) | public static void main(String[] args) { FILE: ja/codes/java/chapter_backtracking/subset_sum_i.java class subset_sum_i (line 11) | public class subset_sum_i { method backtrack (line 13) | static void backtrack(List state, int target, int[] choices, ... method subsetSumI (line 37) | static List> subsetSumI(int[] nums, int target) { method main (line 46) | public static void main(String[] args) { FILE: ja/codes/java/chapter_backtracking/subset_sum_i_naive.java class subset_sum_i_naive (line 11) | public class subset_sum_i_naive { method backtrack (line 13) | static void backtrack(List state, int target, int total, int[... method subsetSumINaive (line 35) | static List> subsetSumINaive(int[] nums, int target) { method main (line 43) | public static void main(String[] args) { FILE: ja/codes/java/chapter_backtracking/subset_sum_ii.java class subset_sum_ii (line 11) | public class subset_sum_ii { method backtrack (line 13) | static void backtrack(List state, int target, int[] choices, ... method subsetSumII (line 42) | static List> subsetSumII(int[] nums, int target) { method main (line 51) | public static void main(String[] args) { FILE: ja/codes/java/chapter_computational_complexity/iteration.java class iteration (line 9) | public class iteration { method forLoop (line 11) | static int forLoop(int n) { method whileLoop (line 21) | static int whileLoop(int n) { method whileLoopII (line 33) | static int whileLoopII(int n) { method nestedForLoop (line 47) | static String nestedForLoop(int n) { method main (line 60) | public static void main(String[] args) { FILE: ja/codes/java/chapter_computational_complexity/recursion.java class recursion (line 11) | public class recursion { method recur (line 13) | static int recur(int n) { method forLoopRecur (line 24) | static int forLoopRecur(int n) { method tailRecur (line 43) | static int tailRecur(int n, int res) { method fib (line 52) | static int fib(int n) { method main (line 63) | public static void main(String[] args) { FILE: ja/codes/java/chapter_computational_complexity/space_complexity.java class space_complexity (line 12) | public class space_complexity { method function (line 14) | static int function() { method constant (line 20) | static void constant(int n) { method linear (line 37) | static void linear(int n) { method linearRecur (line 53) | static void linearRecur(int n) { method quadratic (line 61) | static void quadratic(int n) { method quadraticRecur (line 76) | static int quadraticRecur(int n) { method buildTree (line 86) | static TreeNode buildTree(int n) { method main (line 96) | public static void main(String[] args) { FILE: ja/codes/java/chapter_computational_complexity/time_complexity.java class time_complexity (line 9) | public class time_complexity { method constant (line 11) | static int constant(int n) { method linear (line 20) | static int linear(int n) { method arrayTraversal (line 28) | static int arrayTraversal(int[] nums) { method quadratic (line 38) | static int quadratic(int n) { method bubbleSort (line 50) | static int bubbleSort(int[] nums) { method exponential (line 69) | static int exponential(int n) { method expRecur (line 83) | static int expRecur(int n) { method logarithmic (line 90) | static int logarithmic(int n) { method logRecur (line 100) | static int logRecur(int n) { method linearLogRecur (line 107) | static int linearLogRecur(int n) { method factorialRecur (line 118) | static int factorialRecur(int n) { method main (line 130) | public static void main(String[] args) { FILE: ja/codes/java/chapter_computational_complexity/worst_best_time_complexity.java class worst_best_time_complexity (line 11) | public class worst_best_time_complexity { method randomNumbers (line 13) | static int[] randomNumbers(int n) { method findOne (line 30) | static int findOne(int[] nums) { method main (line 41) | public static void main(String[] args) { FILE: ja/codes/java/chapter_divide_and_conquer/binary_search_recur.java class binary_search_recur (line 9) | public class binary_search_recur { method dfs (line 11) | static int dfs(int[] nums, int target, int i, int j) { method binarySearch (line 31) | static int binarySearch(int[] nums, int target) { method main (line 37) | public static void main(String[] args) { FILE: ja/codes/java/chapter_divide_and_conquer/build_tree.java class build_tree (line 12) | public class build_tree { method dfs (line 14) | static TreeNode dfs(int[] preorder, Map inorderMap, ... method buildTree (line 31) | static TreeNode buildTree(int[] preorder, int[] inorder) { method main (line 41) | public static void main(String[] args) { FILE: ja/codes/java/chapter_divide_and_conquer/hanota.java class hanota (line 11) | public class hanota { method move (line 13) | static void move(List src, List tar) { method dfs (line 21) | static void dfs(int i, List src, List buf, List A, List B, List choices, int state, int n, ... method climbingStairsBacktrack (line 29) | public static int climbingStairsBacktrack(int n) { method main (line 38) | public static void main(String[] args) { FILE: ja/codes/java/chapter_dynamic_programming/climbing_stairs_constraint_dp.java class climbing_stairs_constraint_dp (line 9) | public class climbing_stairs_constraint_dp { method climbingStairsConstraintDP (line 11) | static int climbingStairsConstraintDP(int n) { method main (line 30) | public static void main(String[] args) { FILE: ja/codes/java/chapter_dynamic_programming/climbing_stairs_dfs.java class climbing_stairs_dfs (line 9) | public class climbing_stairs_dfs { method dfs (line 11) | public static int dfs(int i) { method climbingStairsDFS (line 21) | public static int climbingStairsDFS(int n) { method main (line 25) | public static void main(String[] args) { FILE: ja/codes/java/chapter_dynamic_programming/climbing_stairs_dfs_mem.java class climbing_stairs_dfs_mem (line 11) | public class climbing_stairs_dfs_mem { method dfs (line 13) | public static int dfs(int i, int[] mem) { method climbingStairsDFSMem (line 28) | public static int climbingStairsDFSMem(int n) { method main (line 35) | public static void main(String[] args) { FILE: ja/codes/java/chapter_dynamic_programming/climbing_stairs_dp.java class climbing_stairs_dp (line 9) | public class climbing_stairs_dp { method climbingStairsDP (line 11) | public static int climbingStairsDP(int n) { method climbingStairsDPComp (line 27) | public static int climbingStairsDPComp(int n) { method main (line 39) | public static void main(String[] args) { FILE: ja/codes/java/chapter_dynamic_programming/coin_change.java class coin_change (line 11) | public class coin_change { method coinChangeDP (line 13) | static int coinChangeDP(int[] coins, int amt) { method coinChangeDPComp (line 38) | static int coinChangeDPComp(int[] coins, int amt) { method main (line 60) | public static void main(String[] args) { FILE: ja/codes/java/chapter_dynamic_programming/coin_change_ii.java class coin_change_ii (line 9) | public class coin_change_ii { method coinChangeIIDP (line 11) | static int coinChangeIIDP(int[] coins, int amt) { method coinChangeIIDPComp (line 35) | static int coinChangeIIDPComp(int[] coins, int amt) { method main (line 55) | public static void main(String[] args) { FILE: ja/codes/java/chapter_dynamic_programming/edit_distance.java class edit_distance (line 11) | public class edit_distance { method editDistanceDFS (line 13) | static int editDistanceDFS(String s, String t, int i, int j) { method editDistanceDFSMem (line 35) | static int editDistanceDFSMem(String s, String t, int[][] mem, int i, ... method editDistanceDP (line 61) | static int editDistanceDP(String s, String t) { method editDistanceDPComp (line 87) | static int editDistanceDPComp(String s, String t) { method main (line 115) | public static void main(String[] args) { FILE: ja/codes/java/chapter_dynamic_programming/knapsack.java class knapsack (line 11) | public class knapsack { method knapsackDFS (line 14) | static int knapsackDFS(int[] wgt, int[] val, int i, int c) { method knapsackDFSMem (line 31) | static int knapsackDFSMem(int[] wgt, int[] val, int[][] mem, int i, in... method knapsackDP (line 53) | static int knapsackDP(int[] wgt, int[] val, int cap) { method knapsackDPComp (line 73) | static int knapsackDPComp(int[] wgt, int[] val, int cap) { method main (line 90) | public static void main(String[] args) { FILE: ja/codes/java/chapter_dynamic_programming/min_cost_climbing_stairs_dp.java class min_cost_climbing_stairs_dp (line 11) | public class min_cost_climbing_stairs_dp { method minCostClimbingStairsDP (line 13) | public static int minCostClimbingStairsDP(int[] cost) { method minCostClimbingStairsDPComp (line 30) | public static int minCostClimbingStairsDPComp(int[] cost) { method main (line 43) | public static void main(String[] args) { FILE: ja/codes/java/chapter_dynamic_programming/min_path_sum.java class min_path_sum (line 11) | public class min_path_sum { method minPathSumDFS (line 13) | static int minPathSumDFS(int[][] grid, int i, int j) { method minPathSumDFSMem (line 30) | static int minPathSumDFSMem(int[][] grid, int[][] mem, int i, int j) { method minPathSumDP (line 52) | static int minPathSumDP(int[][] grid) { method minPathSumDPComp (line 75) | static int minPathSumDPComp(int[][] grid) { method main (line 96) | public static void main(String[] args) { FILE: ja/codes/java/chapter_dynamic_programming/unbounded_knapsack.java class unbounded_knapsack (line 9) | public class unbounded_knapsack { method unboundedKnapsackDP (line 11) | static int unboundedKnapsackDP(int[] wgt, int[] val, int cap) { method unboundedKnapsackDPComp (line 31) | static int unboundedKnapsackDPComp(int[] wgt, int[] val, int cap) { method main (line 50) | public static void main(String[] args) { FILE: ja/codes/java/chapter_graph/graph_adjacency_list.java class GraphAdjList (line 13) | class GraphAdjList { method GraphAdjList (line 18) | public GraphAdjList(Vertex[][] edges) { method size (line 29) | public int size() { method addEdge (line 34) | public void addEdge(Vertex vet1, Vertex vet2) { method removeEdge (line 43) | public void removeEdge(Vertex vet1, Vertex vet2) { method addVertex (line 52) | public void addVertex(Vertex vet) { method removeVertex (line 60) | public void removeVertex(Vertex vet) { method print (line 72) | public void print() { class graph_adjacency_list (line 83) | public class graph_adjacency_list { method main (line 84) | public static void main(String[] args) { FILE: ja/codes/java/chapter_graph/graph_adjacency_matrix.java class GraphAdjMat (line 13) | class GraphAdjMat { method GraphAdjMat (line 18) | public GraphAdjMat(int[] vertices, int[][] edges) { method size (line 33) | public int size() { method addVertex (line 38) | public void addVertex(int val) { method removeVertex (line 55) | public void removeVertex(int index) { method addEdge (line 70) | public void addEdge(int i, int j) { method removeEdge (line 81) | public void removeEdge(int i, int j) { method print (line 90) | public void print() { class graph_adjacency_matrix (line 98) | public class graph_adjacency_matrix { method main (line 99) | public static void main(String[] args) { FILE: ja/codes/java/chapter_graph/graph_bfs.java class graph_bfs (line 12) | public class graph_bfs { method graphBFS (line 15) | static List graphBFS(GraphAdjList graph, Vertex startVet) { method main (line 40) | public static void main(String[] args) { FILE: ja/codes/java/chapter_graph/graph_dfs.java class graph_dfs (line 12) | public class graph_dfs { method dfs (line 14) | static void dfs(GraphAdjList graph, Set visited, List ... method graphDFS (line 28) | static List graphDFS(GraphAdjList graph, Vertex startVet) { method main (line 37) | public static void main(String[] args) { FILE: ja/codes/java/chapter_greedy/coin_change_greedy.java class coin_change_greedy (line 11) | public class coin_change_greedy { method coinChangeGreedy (line 13) | static int coinChangeGreedy(int[] coins, int amt) { method main (line 31) | public static void main(String[] args) { FILE: ja/codes/java/chapter_greedy/fractional_knapsack.java class Item (line 13) | class Item { method Item (line 17) | public Item(int w, int v) { class fractional_knapsack (line 23) | public class fractional_knapsack { method fractionalKnapsack (line 25) | static double fractionalKnapsack(int[] wgt, int[] val, int cap) { method main (line 50) | public static void main(String[] args) { FILE: ja/codes/java/chapter_greedy/max_capacity.java class max_capacity (line 9) | public class max_capacity { method maxCapacity (line 11) | static int maxCapacity(int[] ht) { method main (line 31) | public static void main(String[] args) { FILE: ja/codes/java/chapter_greedy/max_product_cutting.java class max_product_cutting (line 11) | public class max_product_cutting { method maxProductCutting (line 13) | public static int maxProductCutting(int n) { method main (line 33) | public static void main(String[] args) { FILE: ja/codes/java/chapter_hashing/array_hash_map.java class Pair (line 12) | class Pair { method Pair (line 16) | public Pair(int key, String val) { class ArrayHashMap (line 23) | class ArrayHashMap { method ArrayHashMap (line 26) | public ArrayHashMap() { method hashFunc (line 35) | private int hashFunc(int key) { method get (line 41) | public String get(int key) { method put (line 50) | public void put(int key, String val) { method remove (line 57) | public void remove(int key) { method pairSet (line 64) | public List pairSet() { method keySet (line 74) | public List keySet() { method valueSet (line 84) | public List valueSet() { method print (line 94) | public void print() { class array_hash_map (line 101) | public class array_hash_map { method main (line 102) | public static void main(String[] args) { FILE: ja/codes/java/chapter_hashing/built_in_hash.java class built_in_hash (line 12) | public class built_in_hash { method main (line 13) | public static void main(String[] args) { FILE: ja/codes/java/chapter_hashing/hash_map.java class hash_map (line 12) | public class hash_map { method main (line 13) | public static void main(String[] args) { FILE: ja/codes/java/chapter_hashing/hash_map_chaining.java class HashMapChaining (line 13) | class HashMapChaining { method HashMapChaining (line 21) | public HashMapChaining() { method hashFunc (line 33) | int hashFunc(int key) { method loadFactor (line 38) | double loadFactor() { method get (line 43) | String get(int key) { method put (line 57) | void put(int key, String val) { method remove (line 78) | void remove(int key) { method extend (line 92) | void extend() { method print (line 111) | void print() { class hash_map_chaining (line 122) | public class hash_map_chaining { method main (line 123) | public static void main(String[] args) { FILE: ja/codes/java/chapter_hashing/hash_map_open_addressing.java class HashMapOpenAddressing (line 10) | class HashMapOpenAddressing { method HashMapOpenAddressing (line 19) | public HashMapOpenAddressing() { method hashFunc (line 25) | private int hashFunc(int key) { method loadFactor (line 30) | private double loadFactor() { method findBucket (line 35) | private int findBucket(int key) { method get (line 62) | public String get(int key) { method put (line 74) | public void put(int key, String val) { method remove (line 92) | public void remove(int key) { method extend (line 103) | private void extend() { method print (line 119) | public void print() { class hash_map_open_addressing (line 132) | public class hash_map_open_addressing { method main (line 133) | public static void main(String[] args) { FILE: ja/codes/java/chapter_hashing/simple_hash.java class simple_hash (line 9) | public class simple_hash { method addHash (line 11) | static int addHash(String key) { method mulHash (line 21) | static int mulHash(String key) { method xorHash (line 31) | static int xorHash(String key) { method rotHash (line 41) | static int rotHash(String key) { method main (line 50) | public static void main(String[] args) { FILE: ja/codes/java/chapter_heap/heap.java class heap (line 12) | public class heap { method testPush (line 13) | public static void testPush(Queue heap, int val) { method testPop (line 19) | public static void testPop(Queue heap) { method main (line 25) | public static void main(String[] args) { FILE: ja/codes/java/chapter_heap/my_heap.java class MaxHeap (line 13) | class MaxHeap { method MaxHeap (line 18) | public MaxHeap(List nums) { method left (line 28) | private int left(int i) { method right (line 33) | private int right(int i) { method parent (line 38) | private int parent(int i) { method swap (line 43) | private void swap(int i, int j) { method size (line 50) | public int size() { method isEmpty (line 55) | public boolean isEmpty() { method peek (line 60) | public int peek() { method push (line 65) | public void push(int val) { method siftUp (line 73) | private void siftUp(int i) { method pop (line 88) | public int pop() { method siftDown (line 103) | private void siftDown(int i) { method print (line 122) | public void print() { class my_heap (line 129) | public class my_heap { method main (line 130) | public static void main(String[] args) { FILE: ja/codes/java/chapter_heap/top_k.java class top_k (line 12) | public class top_k { method topKHeap (line 14) | static Queue topKHeap(int[] nums, int k) { method main (line 32) | public static void main(String[] args) { FILE: ja/codes/java/chapter_searching/binary_search.java class binary_search (line 9) | public class binary_search { method binarySearch (line 11) | static int binarySearch(int[] nums, int target) { method binarySearchLCRO (line 29) | static int binarySearchLCRO(int[] nums, int target) { method main (line 46) | public static void main(String[] args) { FILE: ja/codes/java/chapter_searching/binary_search_edge.java class binary_search_edge (line 9) | public class binary_search_edge { method binarySearchLeftEdge (line 11) | static int binarySearchLeftEdge(int[] nums, int target) { method binarySearchRightEdge (line 23) | static int binarySearchRightEdge(int[] nums, int target) { method main (line 36) | public static void main(String[] args) { FILE: ja/codes/java/chapter_searching/binary_search_insertion.java class binary_search_insertion (line 9) | class binary_search_insertion { method binarySearchInsertionSimple (line 11) | static int binarySearchInsertionSimple(int[] nums, int target) { method binarySearchInsertion (line 28) | static int binarySearchInsertion(int[] nums, int target) { method main (line 44) | public static void main(String[] args) { FILE: ja/codes/java/chapter_searching/hashing_search.java class hashing_search (line 12) | public class hashing_search { method hashingSearchArray (line 14) | static int hashingSearchArray(Map map, int target) { method hashingSearchLinkedList (line 21) | static ListNode hashingSearchLinkedList(Map map, in... method main (line 27) | public static void main(String[] args) { FILE: ja/codes/java/chapter_searching/linear_search.java class linear_search (line 11) | public class linear_search { method linearSearchArray (line 13) | static int linearSearchArray(int[] nums, int target) { method linearSearchLinkedList (line 25) | static ListNode linearSearchLinkedList(ListNode head, int target) { method main (line 37) | public static void main(String[] args) { FILE: ja/codes/java/chapter_searching/two_sum.java class two_sum (line 11) | public class two_sum { method twoSumBruteForce (line 13) | static int[] twoSumBruteForce(int[] nums, int target) { method twoSumHashTable (line 26) | static int[] twoSumHashTable(int[] nums, int target) { method main (line 40) | public static void main(String[] args) { FILE: ja/codes/java/chapter_sorting/bubble_sort.java class bubble_sort (line 11) | public class bubble_sort { method bubbleSort (line 13) | static void bubbleSort(int[] nums) { method bubbleSortWithFlag (line 29) | static void bubbleSortWithFlag(int[] nums) { method main (line 48) | public static void main(String[] args) { FILE: ja/codes/java/chapter_sorting/bucket_sort.java class bucket_sort (line 11) | public class bucket_sort { method bucketSort (line 13) | static void bucketSort(float[] nums) { method main (line 41) | public static void main(String[] args) { FILE: ja/codes/java/chapter_sorting/counting_sort.java class counting_sort (line 11) | public class counting_sort { method countingSortNaive (line 14) | static void countingSortNaive(int[] nums) { method countingSort (line 37) | static void countingSort(int[] nums) { method main (line 69) | public static void main(String[] args) { FILE: ja/codes/java/chapter_sorting/heap_sort.java class heap_sort (line 11) | public class heap_sort { method siftDown (line 13) | public static void siftDown(int[] nums, int n, int i) { method heapSort (line 36) | public static void heapSort(int[] nums) { method main (line 52) | public static void main(String[] args) { FILE: ja/codes/java/chapter_sorting/insertion_sort.java class insertion_sort (line 11) | public class insertion_sort { method insertionSort (line 13) | static void insertionSort(int[] nums) { method main (line 26) | public static void main(String[] args) { FILE: ja/codes/java/chapter_sorting/merge_sort.java class merge_sort (line 11) | public class merge_sort { method merge (line 13) | static void merge(int[] nums, int left, int mid, int right) { method mergeSort (line 40) | static void mergeSort(int[] nums, int left, int right) { method main (line 52) | public static void main(String[] args) { FILE: ja/codes/java/chapter_sorting/quick_sort.java class QuickSort (line 12) | class QuickSort { method swap (line 14) | static void swap(int[] nums, int i, int j) { method partition (line 21) | static int partition(int[] nums, int left, int right) { method quickSort (line 36) | public static void quickSort(int[] nums, int left, int right) { class QuickSortMedian (line 49) | class QuickSortMedian { method swap (line 51) | static void swap(int[] nums, int i, int j) { method medianThree (line 58) | static int medianThree(int[] nums, int left, int mid, int right) { method partition (line 68) | static int partition(int[] nums, int left, int right) { method quickSort (line 87) | public static void quickSort(int[] nums, int left, int right) { class QuickSortTailCall (line 100) | class QuickSortTailCall { method swap (line 102) | static void swap(int[] nums, int i, int j) { method partition (line 109) | static int partition(int[] nums, int left, int right) { method quickSort (line 124) | public static void quickSort(int[] nums, int left, int right) { class quick_sort (line 141) | public class quick_sort { method main (line 142) | public static void main(String[] args) { FILE: ja/codes/java/chapter_sorting/radix_sort.java class radix_sort (line 11) | public class radix_sort { method digit (line 13) | static int digit(int num, int exp) { method countingSortDigit (line 19) | static void countingSortDigit(int[] nums, int exp) { method radixSort (line 46) | static void radixSort(int[] nums) { method main (line 62) | public static void main(String[] args) { FILE: ja/codes/java/chapter_sorting/selection_sort.java class selection_sort (line 11) | public class selection_sort { method selectionSort (line 13) | public static void selectionSort(int[] nums) { method main (line 30) | public static void main(String[] args) { FILE: ja/codes/java/chapter_stack_and_queue/array_deque.java class ArrayDeque (line 12) | class ArrayDeque { method ArrayDeque (line 18) | public ArrayDeque(int capacity) { method capacity (line 24) | public int capacity() { method size (line 29) | public int size() { method isEmpty (line 34) | public boolean isEmpty() { method index (line 39) | private int index(int i) { method pushFirst (line 47) | public void pushFirst(int num) { method pushLast (line 61) | public void pushLast(int num) { method popFirst (line 74) | public int popFirst() { method popLast (line 83) | public int popLast() { method peekFirst (line 90) | public int peekFirst() { method peekLast (line 97) | public int peekLast() { method toArray (line 106) | public int[] toArray() { class array_deque (line 116) | public class array_deque { method main (line 117) | public static void main(String[] args) { FILE: ja/codes/java/chapter_stack_and_queue/array_queue.java class ArrayQueue (line 12) | class ArrayQueue { method ArrayQueue (line 17) | public ArrayQueue(int capacity) { method capacity (line 23) | public int capacity() { method size (line 28) | public int size() { method isEmpty (line 33) | public boolean isEmpty() { method push (line 38) | public void push(int num) { method pop (line 52) | public int pop() { method peek (line 61) | public int peek() { method toArray (line 68) | public int[] toArray() { class array_queue (line 78) | public class array_queue { method main (line 79) | public static void main(String[] args) { FILE: ja/codes/java/chapter_stack_and_queue/array_stack.java class ArrayStack (line 12) | class ArrayStack { method ArrayStack (line 15) | public ArrayStack() { method size (line 21) | public int size() { method isEmpty (line 26) | public boolean isEmpty() { method push (line 31) | public void push(int num) { method pop (line 36) | public int pop() { method peek (line 43) | public int peek() { method toArray (line 50) | public Object[] toArray() { class array_stack (line 55) | public class array_stack { method main (line 56) | public static void main(String[] args) { FILE: ja/codes/java/chapter_stack_and_queue/deque.java class deque (line 11) | public class deque { method main (line 12) | public static void main(String[] args) { FILE: ja/codes/java/chapter_stack_and_queue/linkedlist_deque.java class ListNode (line 12) | class ListNode { method ListNode (line 17) | ListNode(int val) { class LinkedListDeque (line 24) | class LinkedListDeque { method LinkedListDeque (line 28) | public LinkedListDeque() { method size (line 33) | public int size() { method isEmpty (line 38) | public boolean isEmpty() { method push (line 43) | private void push(int num, boolean isFront) { method pushFirst (line 65) | public void pushFirst(int num) { method pushLast (line 70) | public void pushLast(int num) { method pop (line 75) | private int pop(boolean isFront) { method popFirst (line 105) | public int popFirst() { method popLast (line 110) | public int popLast() { method peekFirst (line 115) | public int peekFirst() { method peekLast (line 122) | public int peekLast() { method toArray (line 129) | public int[] toArray() { class linkedlist_deque (line 140) | public class linkedlist_deque { method main (line 141) | public static void main(String[] args) { FILE: ja/codes/java/chapter_stack_and_queue/linkedlist_queue.java class LinkedListQueue (line 12) | class LinkedListQueue { method LinkedListQueue (line 16) | public LinkedListQueue() { method size (line 22) | public int size() { method isEmpty (line 27) | public boolean isEmpty() { method push (line 32) | public void push(int num) { method pop (line 48) | public int pop() { method peek (line 57) | public int peek() { method toArray (line 64) | public int[] toArray() { class linkedlist_queue (line 75) | public class linkedlist_queue { method main (line 76) | public static void main(String[] args) { FILE: ja/codes/java/chapter_stack_and_queue/linkedlist_stack.java class LinkedListStack (line 13) | class LinkedListStack { method LinkedListStack (line 17) | public LinkedListStack() { method size (line 22) | public int size() { method isEmpty (line 27) | public boolean isEmpty() { method push (line 32) | public void push(int num) { method pop (line 40) | public int pop() { method peek (line 48) | public int peek() { method toArray (line 55) | public int[] toArray() { class linkedlist_stack (line 66) | public class linkedlist_stack { method main (line 67) | public static void main(String[] args) { FILE: ja/codes/java/chapter_stack_and_queue/queue.java class queue (line 11) | public class queue { method main (line 12) | public static void main(String[] args) { FILE: ja/codes/java/chapter_stack_and_queue/stack.java class stack (line 11) | public class stack { method main (line 12) | public static void main(String[] args) { FILE: ja/codes/java/chapter_tree/array_binary_tree.java class ArrayBinaryTree (line 13) | class ArrayBinaryTree { method ArrayBinaryTree (line 17) | public ArrayBinaryTree(List arr) { method size (line 22) | public int size() { method val (line 27) | public Integer val(int i) { method left (line 35) | public Integer left(int i) { method right (line 40) | public Integer right(int i) { method parent (line 45) | public Integer parent(int i) { method levelOrder (line 50) | public List levelOrder() { method dfs (line 61) | private void dfs(Integer i, String order, List res) { method preOrder (line 79) | public List preOrder() { method inOrder (line 86) | public List inOrder() { method postOrder (line 93) | public List postOrder() { class array_binary_tree (line 100) | public class array_binary_tree { method main (line 101) | public static void main(String[] args) { FILE: ja/codes/java/chapter_tree/avl_tree.java class AVLTree (line 12) | class AVLTree { method height (line 16) | public int height(TreeNode node) { method updateHeight (line 22) | private void updateHeight(TreeNode node) { method balanceFactor (line 28) | public int balanceFactor(TreeNode node) { method rightRotate (line 37) | private TreeNode rightRotate(TreeNode node) { method leftRotate (line 51) | private TreeNode leftRotate(TreeNode node) { method rotate (line 65) | private TreeNode rotate(TreeNode node) { method insert (line 95) | public void insert(int val) { method insertHelper (line 100) | private TreeNode insertHelper(TreeNode node, int val) { method remove (line 118) | public void remove(int val) { method removeHelper (line 123) | private TreeNode removeHelper(TreeNode node, int val) { method search (line 158) | public TreeNode search(int val) { class avl_tree (line 177) | public class avl_tree { method testInsert (line 178) | static void testInsert(AVLTree tree, int val) { method testRemove (line 184) | static void testRemove(AVLTree tree, int val) { method main (line 190) | public static void main(String[] args) { FILE: ja/codes/java/chapter_tree/binary_search_tree.java class BinarySearchTree (line 12) | class BinarySearchTree { method BinarySearchTree (line 16) | public BinarySearchTree() { method getRoot (line 22) | public TreeNode getRoot() { method search (line 27) | public TreeNode search(int num) { method insert (line 46) | public void insert(int num) { method remove (line 75) | public void remove(int num) { class binary_search_tree (line 126) | public class binary_search_tree { method main (line 127) | public static void main(String[] args) { FILE: ja/codes/java/chapter_tree/binary_tree.java class binary_tree (line 11) | public class binary_tree { method main (line 12) | public static void main(String[] args) { FILE: ja/codes/java/chapter_tree/binary_tree_bfs.java class binary_tree_bfs (line 12) | public class binary_tree_bfs { method levelOrder (line 14) | static List levelOrder(TreeNode root) { method main (line 31) | public static void main(String[] args) { FILE: ja/codes/java/chapter_tree/binary_tree_dfs.java class binary_tree_dfs (line 12) | public class binary_tree_dfs { method preOrder (line 17) | static void preOrder(TreeNode root) { method inOrder (line 27) | static void inOrder(TreeNode root) { method postOrder (line 37) | static void postOrder(TreeNode root) { method main (line 46) | public static void main(String[] args) { FILE: ja/codes/java/utils/ListNode.java class ListNode (line 10) | public class ListNode { method ListNode (line 14) | public ListNode(int x) { method arrToLinkedList (line 19) | public static ListNode arrToLinkedList(int[] arr) { FILE: ja/codes/java/utils/PrintUtil.java class Trunk (line 11) | class Trunk { method Trunk (line 15) | Trunk(Trunk prev, String str) { class PrintUtil (line 21) | public class PrintUtil { method printMatrix (line 23) | public static void printMatrix(T[][] matrix) { method printMatrix (line 32) | public static void printMatrix(List> matrix) { method printLinkedList (line 41) | public static void printLinkedList(ListNode head) { method printTree (line 51) | public static void printTree(TreeNode root) { method printTree (line 60) | public static void printTree(TreeNode root, Trunk prev, boolean isRigh... method showTrunks (line 91) | public static void showTrunks(Trunk p) { method printHashMap (line 101) | public static void printHashMap(Map map) { method printHeap (line 108) | public static void printHeap(Queue queue) { FILE: ja/codes/java/utils/TreeNode.java class TreeNode (line 12) | public class TreeNode { method TreeNode (line 19) | public TreeNode(int x) { method listToTreeDFS (line 40) | private static TreeNode listToTreeDFS(List arr, int i) { method listToTree (line 51) | public static TreeNode listToTree(List arr) { method treeToListDFS (line 56) | private static void treeToListDFS(TreeNode root, int i, List ... method treeToList (line 68) | public static List treeToList(TreeNode root) { FILE: ja/codes/java/utils/Vertex.java class Vertex (line 12) | public class Vertex { method Vertex (line 15) | public Vertex(int val) { method valsToVets (line 20) | public static Vertex[] valsToVets(int[] vals) { method vetsToVals (line 29) | public static List vetsToVals(List vets) { FILE: ja/codes/javascript/chapter_array_and_linkedlist/array.js function randomAccess (line 8) | function randomAccess(nums) { function extend (line 19) | function extend(nums, enlarge) { function insert (line 31) | function insert(nums, num, index) { function remove (line 41) | function remove(nums, index) { function traverse (line 49) | function traverse(nums) { function find (line 62) | function find(nums, target) { FILE: ja/codes/javascript/chapter_array_and_linkedlist/linked_list.js function insert (line 11) | function insert(n0, P) { function remove (line 18) | function remove(n0) { function access (line 27) | function access(head, index) { function find (line 38) | function find(head, target) { FILE: ja/codes/javascript/chapter_array_and_linkedlist/my_list.js class MyList (line 8) | class MyList { method constructor (line 15) | constructor() { method size (line 20) | size() { method capacity (line 25) | capacity() { method get (line 30) | get(index) { method set (line 37) | set(index, num) { method add (line 43) | add(num) { method insert (line 54) | insert(index, num) { method remove (line 70) | remove(index) { method extendCapacity (line 84) | extendCapacity() { method toArray (line 94) | toArray() { FILE: ja/codes/javascript/chapter_backtracking/n_queens.js function backtrack (line 8) | function backtrack(row, n, state, res, cols, diags1, diags2) { function nQueens (line 34) | function nQueens(n) { FILE: ja/codes/javascript/chapter_backtracking/permutations_i.js function backtrack (line 8) | function backtrack(state, choices, selected, res) { function permutationsI (line 31) | function permutationsI(nums) { FILE: ja/codes/javascript/chapter_backtracking/permutations_ii.js function backtrack (line 8) | function backtrack(state, choices, selected, res) { function permutationsII (line 33) | function permutationsII(nums) { FILE: ja/codes/javascript/chapter_backtracking/preorder_traversal_i_compact.js function preOrder (line 11) | function preOrder(root, res) { FILE: ja/codes/javascript/chapter_backtracking/preorder_traversal_ii_compact.js function preOrder (line 11) | function preOrder(root, path, res) { FILE: ja/codes/javascript/chapter_backtracking/preorder_traversal_iii_compact.js function preOrder (line 11) | function preOrder(root, path, res) { FILE: ja/codes/javascript/chapter_backtracking/preorder_traversal_iii_template.js function isSolution (line 11) | function isSolution(state) { function recordSolution (line 16) | function recordSolution(state, res) { function isValid (line 21) | function isValid(state, choice) { function makeChoice (line 26) | function makeChoice(state, choice) { function undoChoice (line 31) | function undoChoice(state) { function backtrack (line 36) | function backtrack(state, choices, res) { FILE: ja/codes/javascript/chapter_backtracking/subset_sum_i.js function backtrack (line 8) | function backtrack(state, target, choices, start, res) { function subsetSumI (line 32) | function subsetSumI(nums, target) { FILE: ja/codes/javascript/chapter_backtracking/subset_sum_i_naive.js function backtrack (line 8) | function backtrack(state, target, total, choices, res) { function subsetSumINaive (line 30) | function subsetSumINaive(nums, target) { FILE: ja/codes/javascript/chapter_backtracking/subset_sum_ii.js function backtrack (line 8) | function backtrack(state, target, choices, start, res) { function subsetSumII (line 37) | function subsetSumII(nums, target) { FILE: ja/codes/javascript/chapter_computational_complexity/iteration.js function forLoop (line 8) | function forLoop(n) { function whileLoop (line 18) | function whileLoop(n) { function whileLoopII (line 30) | function whileLoopII(n) { function nestedForLoop (line 44) | function nestedForLoop(n) { FILE: ja/codes/javascript/chapter_computational_complexity/recursion.js function recur (line 8) | function recur(n) { function forLoopRecur (line 18) | function forLoopRecur(n) { function tailRecur (line 37) | function tailRecur(n, res) { function fib (line 45) | function fib(n) { FILE: ja/codes/javascript/chapter_computational_complexity/space_complexity.js function constFunc (line 12) | function constFunc() { function constant (line 18) | function constant(n) { function linear (line 35) | function linear(n) { function linearRecur (line 51) | function linearRecur(n) { function quadratic (line 58) | function quadratic(n) { function quadraticRecur (line 75) | function quadraticRecur(n) { function buildTree (line 83) | function buildTree(n) { FILE: ja/codes/javascript/chapter_computational_complexity/time_complexity.js function constant (line 8) | function constant(n) { function linear (line 16) | function linear(n) { function arrayTraversal (line 23) | function arrayTraversal(nums) { function quadratic (line 33) | function quadratic(n) { function bubbleSort (line 45) | function bubbleSort(nums) { function exponential (line 64) | function exponential(n) { function expRecur (line 79) | function expRecur(n) { function logarithmic (line 85) | function logarithmic(n) { function logRecur (line 95) | function logRecur(n) { function linearLogRecur (line 101) | function linearLogRecur(n) { function factorialRecur (line 111) | function factorialRecur(n) { FILE: ja/codes/javascript/chapter_computational_complexity/worst_best_time_complexity.js function randomNumbers (line 8) | function randomNumbers(n) { function findOne (line 25) | function findOne(nums) { FILE: ja/codes/javascript/chapter_divide_and_conquer/binary_search_recur.js function dfs (line 8) | function dfs(nums, target, i, j) { function binarySearch (line 28) | function binarySearch(nums, target) { FILE: ja/codes/javascript/chapter_divide_and_conquer/build_tree.js function dfs (line 11) | function dfs(preorder, inorderMap, i, l, r) { function buildTree (line 27) | function buildTree(preorder, inorder) { FILE: ja/codes/javascript/chapter_divide_and_conquer/hanota.js function move (line 8) | function move(src, tar) { function dfs (line 16) | function dfs(i, src, buf, tar) { function solveHanota (line 31) | function solveHanota(A, B, C) { FILE: ja/codes/javascript/chapter_dynamic_programming/climbing_stairs_backtrack.js function backtrack (line 8) | function backtrack(choices, state, n, res) { function climbingStairsBacktrack (line 22) | function climbingStairsBacktrack(n) { FILE: ja/codes/javascript/chapter_dynamic_programming/climbing_stairs_constraint_dp.js function climbingStairsConstraintDP (line 8) | function climbingStairsConstraintDP(n) { FILE: ja/codes/javascript/chapter_dynamic_programming/climbing_stairs_dfs.js function dfs (line 8) | function dfs(i) { function climbingStairsDFS (line 17) | function climbingStairsDFS(n) { FILE: ja/codes/javascript/chapter_dynamic_programming/climbing_stairs_dfs_mem.js function dfs (line 8) | function dfs(i, mem) { function climbingStairsDFSMem (line 21) | function climbingStairsDFSMem(n) { FILE: ja/codes/javascript/chapter_dynamic_programming/climbing_stairs_dp.js function climbingStairsDP (line 8) | function climbingStairsDP(n) { function climbingStairsDPComp (line 23) | function climbingStairsDPComp(n) { FILE: ja/codes/javascript/chapter_dynamic_programming/coin_change.js function coinChangeDP (line 8) | function coinChangeDP(coins, amt) { function coinChangeDPComp (line 35) | function coinChangeDPComp(coins, amt) { FILE: ja/codes/javascript/chapter_dynamic_programming/coin_change_ii.js function coinChangeIIDP (line 8) | function coinChangeIIDP(coins, amt) { function coinChangeIIDPComp (line 34) | function coinChangeIIDPComp(coins, amt) { FILE: ja/codes/javascript/chapter_dynamic_programming/edit_distance.js function editDistanceDFS (line 8) | function editDistanceDFS(s, t, i, j) { function editDistanceDFSMem (line 31) | function editDistanceDFSMem(s, t, mem, i, j) { function editDistanceDP (line 58) | function editDistanceDP(s, t) { function editDistanceDPComp (line 86) | function editDistanceDPComp(s, t) { FILE: ja/codes/javascript/chapter_dynamic_programming/knapsack.js function knapsackDFS (line 8) | function knapsackDFS(wgt, val, i, c) { function knapsackDFSMem (line 25) | function knapsackDFSMem(wgt, val, mem, i, c) { function knapsackDP (line 48) | function knapsackDP(wgt, val, cap) { function knapsackDPComp (line 73) | function knapsackDPComp(wgt, val, cap) { FILE: ja/codes/javascript/chapter_dynamic_programming/min_cost_climbing_stairs_dp.js function minCostClimbingStairsDP (line 8) | function minCostClimbingStairsDP(cost) { function minCostClimbingStairsDPComp (line 26) | function minCostClimbingStairsDPComp(cost) { FILE: ja/codes/javascript/chapter_dynamic_programming/min_path_sum.js function minPathSumDFS (line 8) | function minPathSumDFS(grid, i, j) { function minPathSumDFSMem (line 25) | function minPathSumDFSMem(grid, mem, i, j) { function minPathSumDP (line 47) | function minPathSumDP(grid) { function minPathSumDPComp (line 73) | function minPathSumDPComp(grid) { FILE: ja/codes/javascript/chapter_dynamic_programming/unbounded_knapsack.js function unboundedKnapsackDP (line 8) | function unboundedKnapsackDP(wgt, val, cap) { function unboundedKnapsackDPComp (line 33) | function unboundedKnapsackDPComp(wgt, val, cap) { FILE: ja/codes/javascript/chapter_graph/graph_adjacency_list.js class GraphAdjList (line 10) | class GraphAdjList { method constructor (line 15) | constructor(edges) { method size (line 26) | size() { method addEdge (line 31) | addEdge(vet1, vet2) { method removeEdge (line 45) | removeEdge(vet1, vet2) { method addVertex (line 60) | addVertex(vet) { method removeVertex (line 67) | removeVertex(vet) { method print (line 83) | print() { FILE: ja/codes/javascript/chapter_graph/graph_adjacency_matrix.js class GraphAdjMat (line 8) | class GraphAdjMat { method constructor (line 13) | constructor(vertices, edges) { method size (line 28) | size() { method addVertex (line 33) | addVertex(val) { method removeVertex (line 50) | removeVertex(index) { method addEdge (line 67) | addEdge(i, j) { method removeEdge (line 79) | removeEdge(i, j) { method print (line 89) | print() { FILE: ja/codes/javascript/chapter_graph/graph_bfs.js function graphBFS (line 12) | function graphBFS(graph, startVet) { FILE: ja/codes/javascript/chapter_graph/graph_dfs.js function dfs (line 12) | function dfs(graph, visited, res, vet) { function graphDFS (line 27) | function graphDFS(graph, startVet) { FILE: ja/codes/javascript/chapter_greedy/coin_change_greedy.js function coinChangeGreedy (line 8) | function coinChangeGreedy(coins, amt) { FILE: ja/codes/javascript/chapter_greedy/fractional_knapsack.js class Item (line 8) | class Item { method constructor (line 9) | constructor(w, v) { function fractionalKnapsack (line 16) | function fractionalKnapsack(wgt, val, cap) { FILE: ja/codes/javascript/chapter_greedy/max_capacity.js function maxCapacity (line 8) | function maxCapacity(ht) { FILE: ja/codes/javascript/chapter_greedy/max_product_cutting.js function maxProductCutting (line 8) | function maxProductCutting(n) { FILE: ja/codes/javascript/chapter_hashing/array_hash_map.js class Pair (line 8) | class Pair { method constructor (line 9) | constructor(key, val) { class ArrayHashMap (line 16) | class ArrayHashMap { method constructor (line 18) | constructor() { method #hashFunc (line 24) | #hashFunc(key) { method get (line 29) | get(key) { method set (line 37) | set(key, val) { method delete (line 43) | delete(key) { method entries (line 50) | entries() { method keys (line 61) | keys() { method values (line 72) | values() { method print (line 83) | print() { FILE: ja/codes/javascript/chapter_hashing/hash_map_chaining.js class Pair (line 8) | class Pair { method constructor (line 9) | constructor(key, val) { class HashMapChaining (line 16) | class HashMapChaining { method constructor (line 24) | constructor() { method #hashFunc (line 33) | #hashFunc(key) { method #loadFactor (line 38) | #loadFactor() { method get (line 43) | get(key) { method put (line 57) | put(key, val) { method remove (line 78) | remove(key) { method #extend (line 92) | #extend() { method print (line 108) | print() { FILE: ja/codes/javascript/chapter_hashing/hash_map_open_addressing.js class Pair (line 8) | class Pair { method constructor (line 9) | constructor(key, val) { class HashMapOpenAddressing (line 16) | class HashMapOpenAddressing { method constructor (line 25) | constructor() { method #hashFunc (line 35) | #hashFunc(key) { method #loadFactor (line 40) | #loadFactor() { method #findBucket (line 45) | #findBucket(key) { method get (line 75) | get(key) { method put (line 90) | put(key, val) { method remove (line 111) | remove(key) { method #extend (line 125) | #extend() { method print (line 141) | print() { FILE: ja/codes/javascript/chapter_hashing/simple_hash.js function addHash (line 8) | function addHash(key) { function mulHash (line 18) | function mulHash(key) { function xorHash (line 28) | function xorHash(key) { function rotHash (line 38) | function rotHash(key) { FILE: ja/codes/javascript/chapter_heap/my_heap.js class MaxHeap (line 10) | class MaxHeap { method constructor (line 14) | constructor(nums) { method #left (line 24) | #left(i) { method #right (line 29) | #right(i) { method #parent (line 34) | #parent(i) { method #swap (line 39) | #swap(i, j) { method size (line 46) | size() { method isEmpty (line 51) | isEmpty() { method peek (line 56) | peek() { method push (line 61) | push(val) { method #siftUp (line 69) | #siftUp(i) { method pop (line 83) | pop() { method #siftDown (line 97) | #siftDown(i) { method print (line 115) | print() { method getMaxHeap (line 120) | getMaxHeap() { FILE: ja/codes/javascript/chapter_heap/top_k.js function pushMinHeap (line 10) | function pushMinHeap(maxHeap, val) { function popMinHeap (line 16) | function popMinHeap(maxHeap) { function peekMinHeap (line 22) | function peekMinHeap(maxHeap) { function getMinHeap (line 28) | function getMinHeap(maxHeap) { function topKHeap (line 34) | function topKHeap(nums, k) { FILE: ja/codes/javascript/chapter_searching/binary_search.js function binarySearch (line 8) | function binarySearch(nums, target) { function binarySearchLCRO (line 29) | function binarySearchLCRO(nums, target) { FILE: ja/codes/javascript/chapter_searching/binary_search_edge.js function binarySearchLeftEdge (line 10) | function binarySearchLeftEdge(nums, target) { function binarySearchRightEdge (line 22) | function binarySearchRightEdge(nums, target) { FILE: ja/codes/javascript/chapter_searching/binary_search_insertion.js function binarySearchInsertionSimple (line 8) | function binarySearchInsertionSimple(nums, target) { function binarySearchInsertion (line 26) | function binarySearchInsertion(nums, target) { FILE: ja/codes/javascript/chapter_searching/hashing_search.js function hashingSearchArray (line 10) | function hashingSearchArray(map, target) { function hashingSearchLinkedList (line 17) | function hashingSearchLinkedList(map, target) { FILE: ja/codes/javascript/chapter_searching/linear_search.js function linearSearchArray (line 10) | function linearSearchArray(nums, target) { function linearSearchLinkedList (line 23) | function linearSearchLinkedList(head, target) { FILE: ja/codes/javascript/chapter_searching/two_sum.js function twoSumBruteForce (line 8) | function twoSumBruteForce(nums, target) { function twoSumHashTable (line 22) | function twoSumHashTable(nums, target) { FILE: ja/codes/javascript/chapter_sorting/bubble_sort.js function bubbleSort (line 8) | function bubbleSort(nums) { function bubbleSortWithFlag (line 24) | function bubbleSortWithFlag(nums) { FILE: ja/codes/javascript/chapter_sorting/bucket_sort.js function bucketSort (line 8) | function bucketSort(nums) { FILE: ja/codes/javascript/chapter_sorting/counting_sort.js function countingSortNaive (line 9) | function countingSortNaive(nums) { function countingSort (line 29) | function countingSort(nums) { FILE: ja/codes/javascript/chapter_sorting/heap_sort.js function siftDown (line 8) | function siftDown(nums, n, i) { function heapSort (line 32) | function heapSort(nums) { FILE: ja/codes/javascript/chapter_sorting/insertion_sort.js function insertionSort (line 8) | function insertionSort(nums) { FILE: ja/codes/javascript/chapter_sorting/merge_sort.js function merge (line 8) | function merge(nums, left, mid, right) { function mergeSort (line 38) | function mergeSort(nums, left, right) { FILE: ja/codes/javascript/chapter_sorting/quick_sort.js class QuickSort (line 8) | class QuickSort { method swap (line 10) | swap(nums, i, j) { method partition (line 17) | partition(nums, left, right) { method quickSort (line 36) | quickSort(nums, left, right) { class QuickSortMedian (line 48) | class QuickSortMedian { method swap (line 50) | swap(nums, i, j) { method medianThree (line 57) | medianThree(nums, left, mid, right) { method partition (line 69) | partition(nums, left, right) { method quickSort (line 92) | quickSort(nums, left, right) { class QuickSortTailCall (line 104) | class QuickSortTailCall { method swap (line 106) | swap(nums, i, j) { method partition (line 113) | partition(nums, left, right) { method quickSort (line 127) | quickSort(nums, left, right) { FILE: ja/codes/javascript/chapter_sorting/radix_sort.js function digit (line 8) | function digit(num, exp) { function countingSortDigit (line 14) | function countingSortDigit(nums, exp) { function radixSort (line 42) | function radixSort(nums) { FILE: ja/codes/javascript/chapter_sorting/selection_sort.js function selectionSort (line 8) | function selectionSort(nums) { FILE: ja/codes/javascript/chapter_stack_and_queue/array_deque.js class ArrayDeque (line 8) | class ArrayDeque { method constructor (line 14) | constructor(capacity) { method capacity (line 21) | capacity() { method size (line 26) | size() { method isEmpty (line 31) | isEmpty() { method index (line 36) | index(i) { method pushFirst (line 44) | pushFirst(num) { method pushLast (line 58) | pushLast(num) { method popFirst (line 71) | popFirst() { method popLast (line 80) | popLast() { method peekFirst (line 87) | peekFirst() { method peekLast (line 93) | peekLast() { method toArray (line 101) | toArray() { FILE: ja/codes/javascript/chapter_stack_and_queue/array_queue.js class ArrayQueue (line 8) | class ArrayQueue { method constructor (line 13) | constructor(capacity) { method capacity (line 18) | get capacity() { method size (line 23) | get size() { method isEmpty (line 28) | isEmpty() { method push (line 33) | push(num) { method pop (line 47) | pop() { method peek (line 56) | peek() { method toArray (line 62) | toArray() { FILE: ja/codes/javascript/chapter_stack_and_queue/array_stack.js class ArrayStack (line 8) | class ArrayStack { method constructor (line 10) | constructor() { method size (line 15) | get size() { method isEmpty (line 20) | isEmpty() { method push (line 25) | push(num) { method pop (line 30) | pop() { method top (line 36) | top() { method toArray (line 42) | toArray() { FILE: ja/codes/javascript/chapter_stack_and_queue/linkedlist_deque.js class ListNode (line 8) | class ListNode { method constructor (line 13) | constructor(val) { class LinkedListDeque (line 21) | class LinkedListDeque { method constructor (line 26) | constructor() { method pushLast (line 33) | pushLast(val) { method pushFirst (line 49) | pushFirst(val) { method popLast (line 65) | popLast() { method popFirst (line 82) | popFirst() { method peekLast (line 99) | peekLast() { method peekFirst (line 104) | peekFirst() { method size (line 109) | size() { method isEmpty (line 114) | isEmpty() { method print (line 119) | print() { FILE: ja/codes/javascript/chapter_stack_and_queue/linkedlist_queue.js class LinkedListQueue (line 10) | class LinkedListQueue { method constructor (line 15) | constructor() { method size (line 21) | get size() { method isEmpty (line 26) | isEmpty() { method push (line 31) | push(num) { method pop (line 47) | pop() { method peek (line 56) | peek() { method toArray (line 62) | toArray() { FILE: ja/codes/javascript/chapter_stack_and_queue/linkedlist_stack.js class LinkedListStack (line 10) | class LinkedListStack { method constructor (line 14) | constructor() { method size (line 19) | get size() { method isEmpty (line 24) | isEmpty() { method push (line 29) | push(num) { method pop (line 37) | pop() { method peek (line 45) | peek() { method toArray (line 51) | toArray() { FILE: ja/codes/javascript/chapter_tree/array_binary_tree.js class ArrayBinaryTree (line 11) | class ArrayBinaryTree { method constructor (line 15) | constructor(arr) { method size (line 20) | size() { method val (line 25) | val(i) { method left (line 32) | left(i) { method right (line 37) | right(i) { method parent (line 42) | parent(i) { method levelOrder (line 47) | levelOrder() { method #dfs (line 57) | #dfs(i, order, res) { method preOrder (line 71) | preOrder() { method inOrder (line 78) | inOrder() { method postOrder (line 85) | postOrder() { FILE: ja/codes/javascript/chapter_tree/avl_tree.js class AVLTree (line 11) | class AVLTree { method constructor (line 13) | constructor() { method height (line 18) | height(node) { method #updateHeight (line 24) | #updateHeight(node) { method balanceFactor (line 31) | balanceFactor(node) { method #rightRotate (line 39) | #rightRotate(node) { method #leftRotate (line 53) | #leftRotate(node) { method #rotate (line 67) | #rotate(node) { method insert (line 97) | insert(val) { method #insertHelper (line 102) | #insertHelper(node, val) { method remove (line 117) | remove(val) { method #removeHelper (line 122) | #removeHelper(node, val) { method search (line 153) | search(val) { function testInsert (line 169) | function testInsert(tree, val) { function testRemove (line 175) | function testRemove(tree, val) { FILE: ja/codes/javascript/chapter_tree/binary_search_tree.js class BinarySearchTree (line 11) | class BinarySearchTree { method constructor (line 13) | constructor() { method getRoot (line 19) | getRoot() { method search (line 24) | search(num) { method insert (line 40) | insert(num) { method remove (line 65) | remove(num) { FILE: ja/codes/javascript/chapter_tree/binary_tree_bfs.js function levelOrder (line 11) | function levelOrder(root) { FILE: ja/codes/javascript/chapter_tree/binary_tree_dfs.js function preOrder (line 14) | function preOrder(root) { function inOrder (line 23) | function inOrder(root) { function postOrder (line 32) | function postOrder(root) { FILE: ja/codes/javascript/modules/ListNode.js class ListNode (line 8) | class ListNode { method constructor (line 11) | constructor(val, next) { function arrToLinkedList (line 18) | function arrToLinkedList(arr) { FILE: ja/codes/javascript/modules/PrintUtil.js function printLinkedList (line 10) | function printLinkedList(head) { function Trunk (line 19) | function Trunk(prev, str) { function printTree (line 29) | function printTree(root) { function printTree (line 34) | function printTree(root, prev, isRight) { function showTrunks (line 65) | function showTrunks(p) { function printHeap (line 75) | function printHeap(arr) { FILE: ja/codes/javascript/modules/TreeNode.js class TreeNode (line 8) | class TreeNode { method constructor (line 13) | constructor(val, left, right, height) { function arrToTree (line 22) | function arrToTree(arr, i = 0) { FILE: ja/codes/javascript/modules/Vertex.js class Vertex (line 8) | class Vertex { method constructor (line 10) | constructor(val) { method valsToVets (line 15) | static valsToVets(vals) { method vetsToVals (line 24) | static vetsToVals(vets) { FILE: ja/codes/python/chapter_array_and_linkedlist/array.py function random_access (line 10) | def random_access(nums: list[int]) -> int: function extend (line 21) | def extend(nums: list[int], enlarge: int) -> list[int]: function insert (line 32) | def insert(nums: list[int], num: int, index: int): function remove (line 41) | def remove(nums: list[int], index: int): function traverse (line 48) | def traverse(nums: list[int]): function find (line 63) | def find(nums: list[int], target: int) -> int: FILE: ja/codes/python/chapter_array_and_linkedlist/linked_list.py function insert (line 14) | def insert(n0: ListNode, P: ListNode): function remove (line 21) | def remove(n0: ListNode): function access (line 31) | def access(head: ListNode, index: int) -> ListNode | None: function find (line 40) | def find(head: ListNode, target: int) -> int: FILE: ja/codes/python/chapter_array_and_linkedlist/my_list.py class MyList (line 8) | class MyList: method __init__ (line 11) | def __init__(self): method size (line 18) | def size(self) -> int: method capacity (line 22) | def capacity(self) -> int: method get (line 26) | def get(self, index: int) -> int: method set (line 33) | def set(self, num: int, index: int): method add (line 39) | def add(self, num: int): method insert (line 47) | def insert(self, num: int, index: int): method remove (line 61) | def remove(self, index: int) -> int: method extend_capacity (line 74) | def extend_capacity(self): method to_array (line 81) | def to_array(self) -> list[int]: FILE: ja/codes/python/chapter_backtracking/n_queens.py function backtrack (line 8) | def backtrack( function n_queens (line 39) | def n_queens(n: int) -> list[list[list[str]]]: FILE: ja/codes/python/chapter_backtracking/permutations_i.py function backtrack (line 8) | def backtrack( function permutations_i (line 30) | def permutations_i(nums: list[int]) -> list[list[int]]: FILE: ja/codes/python/chapter_backtracking/permutations_ii.py function backtrack (line 8) | def backtrack( function permutations_ii (line 32) | def permutations_ii(nums: list[int]) -> list[list[int]]: FILE: ja/codes/python/chapter_backtracking/preorder_traversal_i_compact.py function pre_order (line 14) | def pre_order(root: TreeNode): FILE: ja/codes/python/chapter_backtracking/preorder_traversal_ii_compact.py function pre_order (line 14) | def pre_order(root: TreeNode): FILE: ja/codes/python/chapter_backtracking/preorder_traversal_iii_compact.py function pre_order (line 14) | def pre_order(root: TreeNode): FILE: ja/codes/python/chapter_backtracking/preorder_traversal_iii_template.py function is_solution (line 14) | def is_solution(state: list[TreeNode]) -> bool: function record_solution (line 19) | def record_solution(state: list[TreeNode], res: list[list[TreeNode]]): function is_valid (line 24) | def is_valid(state: list[TreeNode], choice: TreeNode) -> bool: function make_choice (line 29) | def make_choice(state: list[TreeNode], choice: TreeNode): function undo_choice (line 34) | def undo_choice(state: list[TreeNode], choice: TreeNode): function backtrack (line 39) | def backtrack( FILE: ja/codes/python/chapter_backtracking/subset_sum_i.py function backtrack (line 8) | def backtrack( function subset_sum_i (line 31) | def subset_sum_i(nums: list[int], target: int) -> list[list[int]]: FILE: ja/codes/python/chapter_backtracking/subset_sum_i_naive.py function backtrack (line 8) | def backtrack( function subset_sum_i_naive (line 33) | def subset_sum_i_naive(nums: list[int], target: int) -> list[list[int]]: FILE: ja/codes/python/chapter_backtracking/subset_sum_ii.py function backtrack (line 8) | def backtrack( function subset_sum_ii (line 35) | def subset_sum_ii(nums: list[int], target: int) -> list[list[int]]: FILE: ja/codes/python/chapter_computational_complexity/iteration.py function for_loop (line 8) | def for_loop(n: int) -> int: function while_loop (line 17) | def while_loop(n: int) -> int: function while_loop_ii (line 28) | def while_loop_ii(n: int) -> int: function nested_for_loop (line 41) | def nested_for_loop(n: int) -> str: FILE: ja/codes/python/chapter_computational_complexity/recursion.py function recur (line 8) | def recur(n: int) -> int: function for_loop_recur (line 19) | def for_loop_recur(n: int) -> int: function tail_recur (line 36) | def tail_recur(n, res): function fib (line 45) | def fib(n: int) -> int: FILE: ja/codes/python/chapter_computational_complexity/space_complexity.py function function (line 14) | def function() -> int: function constant (line 20) | def constant(n: int): function linear (line 34) | def linear(n: int): function linear_recur (line 44) | def linear_recur(n: int): function quadratic (line 52) | def quadratic(n: int): function quadratic_recur (line 58) | def quadratic_recur(n: int) -> int: function build_tree (line 67) | def build_tree(n: int) -> TreeNode | None: FILE: ja/codes/python/chapter_computational_complexity/time_complexity.py function constant (line 8) | def constant(n: int) -> int: function linear (line 17) | def linear(n: int) -> int: function array_traversal (line 25) | def array_traversal(nums: list[int]) -> int: function quadratic (line 34) | def quadratic(n: int) -> int: function bubble_sort (line 44) | def bubble_sort(nums: list[int]) -> int: function exponential (line 60) | def exponential(n: int) -> int: function exp_recur (line 73) | def exp_recur(n: int) -> int: function logarithmic (line 80) | def logarithmic(n: int) -> int: function log_recur (line 89) | def log_recur(n: int) -> int: function linear_log_recur (line 96) | def linear_log_recur(n: int) -> int: function factorial_recur (line 108) | def factorial_recur(n: int) -> int: FILE: ja/codes/python/chapter_computational_complexity/worst_best_time_complexity.py function random_numbers (line 10) | def random_numbers(n: int) -> list[int]: function find_one (line 19) | def find_one(nums: list[int]) -> int: FILE: ja/codes/python/chapter_divide_and_conquer/binary_search_recur.py function dfs (line 8) | def dfs(nums: list[int], target: int, i: int, j: int) -> int: function binary_search (line 26) | def binary_search(nums: list[int], target: int) -> int: FILE: ja/codes/python/chapter_divide_and_conquer/build_tree.py function dfs (line 14) | def dfs( function build_tree (line 37) | def build_tree(preorder: list[int], inorder: list[int]) -> TreeNode | None: FILE: ja/codes/python/chapter_divide_and_conquer/hanota.py function move (line 8) | def move(src: list[int], tar: list[int]): function dfs (line 16) | def dfs(i: int, src: list[int], buf: list[int], tar: list[int]): function solve_hanota (line 30) | def solve_hanota(A: list[int], B: list[int], C: list[int]): FILE: ja/codes/python/chapter_dynamic_programming/climbing_stairs_backtrack.py function backtrack (line 8) | def backtrack(choices: list[int], state: int, n: int, res: list[int]) ->... function climbing_stairs_backtrack (line 23) | def climbing_stairs_backtrack(n: int) -> int: FILE: ja/codes/python/chapter_dynamic_programming/climbing_stairs_constraint_dp.py function climbing_stairs_constraint_dp (line 8) | def climbing_stairs_constraint_dp(n: int) -> int: FILE: ja/codes/python/chapter_dynamic_programming/climbing_stairs_dfs.py function dfs (line 8) | def dfs(i: int) -> int: function climbing_stairs_dfs (line 18) | def climbing_stairs_dfs(n: int) -> int: FILE: ja/codes/python/chapter_dynamic_programming/climbing_stairs_dfs_mem.py function dfs (line 8) | def dfs(i: int, mem: list[int]) -> int: function climbing_stairs_dfs_mem (line 23) | def climbing_stairs_dfs_mem(n: int) -> int: FILE: ja/codes/python/chapter_dynamic_programming/climbing_stairs_dp.py function climbing_stairs_dp (line 8) | def climbing_stairs_dp(n: int) -> int: function climbing_stairs_dp_comp (line 22) | def climbing_stairs_dp_comp(n: int) -> int: FILE: ja/codes/python/chapter_dynamic_programming/coin_change.py function coin_change_dp (line 8) | def coin_change_dp(coins: list[int], amt: int) -> int: function coin_change_dp_comp (line 29) | def coin_change_dp_comp(coins: list[int], amt: int) -> int: FILE: ja/codes/python/chapter_dynamic_programming/coin_change_ii.py function coin_change_ii_dp (line 8) | def coin_change_ii_dp(coins: list[int], amt: int) -> int: function coin_change_ii_dp_comp (line 28) | def coin_change_ii_dp_comp(coins: list[int], amt: int) -> int: FILE: ja/codes/python/chapter_dynamic_programming/edit_distance.py function edit_distance_dfs (line 8) | def edit_distance_dfs(s: str, t: str, i: int, j: int) -> int: function edit_distance_dfs_mem (line 30) | def edit_distance_dfs_mem(s: str, t: str, mem: list[list[int]], i: int, ... function edit_distance_dp (line 56) | def edit_distance_dp(s: str, t: str) -> int: function edit_distance_dp_comp (line 77) | def edit_distance_dp_comp(s: str, t: str) -> int: FILE: ja/codes/python/chapter_dynamic_programming/knapsack.py function knapsack_dfs (line 8) | def knapsack_dfs(wgt: list[int], val: list[int], i: int, c: int) -> int: function knapsack_dfs_mem (line 23) | def knapsack_dfs_mem( function knapsack_dp (line 44) | def knapsack_dp(wgt: list[int], val: list[int], cap: int) -> int: function knapsack_dp_comp (line 61) | def knapsack_dp_comp(wgt: list[int], val: list[int], cap: int) -> int: FILE: ja/codes/python/chapter_dynamic_programming/min_cost_climbing_stairs_dp.py function min_cost_climbing_stairs_dp (line 8) | def min_cost_climbing_stairs_dp(cost: list[int]) -> int: function min_cost_climbing_stairs_dp_comp (line 23) | def min_cost_climbing_stairs_dp_comp(cost: list[int]) -> int: FILE: ja/codes/python/chapter_dynamic_programming/min_path_sum.py function min_path_sum_dfs (line 10) | def min_path_sum_dfs(grid: list[list[int]], i: int, j: int) -> int: function min_path_sum_dfs_mem (line 25) | def min_path_sum_dfs_mem( function min_path_sum_dp (line 46) | def min_path_sum_dp(grid: list[list[int]]) -> int: function min_path_sum_dp_comp (line 65) | def min_path_sum_dp_comp(grid: list[list[int]]) -> int: FILE: ja/codes/python/chapter_dynamic_programming/unbounded_knapsack.py function unbounded_knapsack_dp (line 8) | def unbounded_knapsack_dp(wgt: list[int], val: list[int], cap: int) -> int: function unbounded_knapsack_dp_comp (line 25) | def unbounded_knapsack_dp_comp(wgt: list[int], val: list[int], cap: int)... FILE: ja/codes/python/chapter_graph/graph_adjacency_list.py class GraphAdjList (line 14) | class GraphAdjList: method __init__ (line 17) | def __init__(self, edges: list[list[Vertex]]): method size (line 27) | def size(self) -> int: method add_edge (line 31) | def add_edge(self, vet1: Vertex, vet2: Vertex): method remove_edge (line 39) | def remove_edge(self, vet1: Vertex, vet2: Vertex): method add_vertex (line 47) | def add_vertex(self, vet: Vertex): method remove_vertex (line 54) | def remove_vertex(self, vet: Vertex): method print (line 65) | def print(self): FILE: ja/codes/python/chapter_graph/graph_adjacency_matrix.py class GraphAdjMat (line 14) | class GraphAdjMat: method __init__ (line 17) | def __init__(self, vertices: list[int], edges: list[list[int]]): method size (line 31) | def size(self) -> int: method add_vertex (line 35) | def add_vertex(self, val: int): method remove_vertex (line 47) | def remove_vertex(self, index: int): method add_edge (line 59) | def add_edge(self, i: int, j: int): method remove_edge (line 69) | def remove_edge(self, i: int, j: int): method print (line 78) | def print(self): FILE: ja/codes/python/chapter_graph/graph_bfs.py function graph_bfs (line 16) | def graph_bfs(graph: GraphAdjList, start_vet: Vertex) -> list[Vertex]: FILE: ja/codes/python/chapter_graph/graph_dfs.py function dfs (line 15) | def dfs(graph: GraphAdjList, visited: set[Vertex], res: list[Vertex], ve... function graph_dfs (line 27) | def graph_dfs(graph: GraphAdjList, start_vet: Vertex) -> list[Vertex]: FILE: ja/codes/python/chapter_greedy/coin_change_greedy.py function coin_change_greedy (line 8) | def coin_change_greedy(coins: list[int], amt: int) -> int: FILE: ja/codes/python/chapter_greedy/fractional_knapsack.py class Item (line 8) | class Item: method __init__ (line 11) | def __init__(self, w: int, v: int): function fractional_knapsack (line 16) | def fractional_knapsack(wgt: list[int], val: list[int], cap: int) -> int: FILE: ja/codes/python/chapter_greedy/max_capacity.py function max_capacity (line 8) | def max_capacity(ht: list[int]) -> int: FILE: ja/codes/python/chapter_greedy/max_product_cutting.py function max_product_cutting (line 10) | def max_product_cutting(n: int) -> int: FILE: ja/codes/python/chapter_hashing/array_hash_map.py class Pair (line 8) | class Pair: method __init__ (line 11) | def __init__(self, key: int, val: str): class ArrayHashMap (line 16) | class ArrayHashMap: method __init__ (line 19) | def __init__(self): method hash_func (line 24) | def hash_func(self, key: int) -> int: method get (line 29) | def get(self, key: int) -> str | None: method put (line 37) | def put(self, key: int, val: str): method remove (line 43) | def remove(self, key: int): method entry_set (line 49) | def entry_set(self) -> list[Pair]: method key_set (line 57) | def key_set(self) -> list[int]: method value_set (line 65) | def value_set(self) -> list[str]: method print (line 73) | def print(self): FILE: ja/codes/python/chapter_hashing/hash_map_chaining.py class HashMapChaining (line 14) | class HashMapChaining: method __init__ (line 17) | def __init__(self): method hash_func (line 25) | def hash_func(self, key: int) -> int: method load_factor (line 29) | def load_factor(self) -> float: method get (line 33) | def get(self, key: int) -> str | None: method put (line 44) | def put(self, key: int, val: str): method remove (line 61) | def remove(self, key: int): method extend (line 72) | def extend(self): method print (line 85) | def print(self): FILE: ja/codes/python/chapter_hashing/hash_map_open_addressing.py class HashMapOpenAddressing (line 14) | class HashMapOpenAddressing: method __init__ (line 17) | def __init__(self): method hash_func (line 26) | def hash_func(self, key: int) -> int: method load_factor (line 30) | def load_factor(self) -> float: method find_bucket (line 34) | def find_bucket(self, key: int) -> int: method get (line 56) | def get(self, key: int) -> str: method put (line 66) | def put(self, key: int, val: str): method remove (line 81) | def remove(self, key: int): method extend (line 90) | def extend(self): method print (line 103) | def print(self): FILE: ja/codes/python/chapter_hashing/simple_hash.py function add_hash (line 8) | def add_hash(key: str) -> int: function mul_hash (line 17) | def mul_hash(key: str) -> int: function xor_hash (line 26) | def xor_hash(key: str) -> int: function rot_hash (line 35) | def rot_hash(key: str) -> int: FILE: ja/codes/python/chapter_heap/heap.py function test_push (line 16) | def test_push(heap: list, val: int, flag: int = 1): function test_pop (line 22) | def test_pop(heap: list, flag: int = 1): FILE: ja/codes/python/chapter_heap/my_heap.py class MaxHeap (line 14) | class MaxHeap: method __init__ (line 17) | def __init__(self, nums: list[int]): method left (line 25) | def left(self, i: int) -> int: method right (line 29) | def right(self, i: int) -> int: method parent (line 33) | def parent(self, i: int) -> int: method swap (line 37) | def swap(self, i: int, j: int): method size (line 41) | def size(self) -> int: method is_empty (line 45) | def is_empty(self) -> bool: method peek (line 49) | def peek(self) -> int: method push (line 53) | def push(self, val: int): method sift_up (line 60) | def sift_up(self, i: int): method pop (line 73) | def pop(self) -> int: method sift_down (line 87) | def sift_down(self, i: int): method print (line 104) | def print(self): FILE: ja/codes/python/chapter_heap/top_k.py function top_k_heap (line 16) | def top_k_heap(nums: list[int], k: int) -> list[int]: FILE: ja/codes/python/chapter_searching/binary_search.py function binary_search (line 8) | def binary_search(nums: list[int], target: int) -> int: function binary_search_lcro (line 25) | def binary_search_lcro(nums: list[int], target: int) -> int: FILE: ja/codes/python/chapter_searching/binary_search_edge.py function binary_search_left_edge (line 14) | def binary_search_left_edge(nums: list[int], target: int) -> int: function binary_search_right_edge (line 25) | def binary_search_right_edge(nums: list[int], target: int) -> int: FILE: ja/codes/python/chapter_searching/binary_search_insertion.py function binary_search_insertion_simple (line 8) | def binary_search_insertion_simple(nums: list[int], target: int) -> int: function binary_search_insertion (line 23) | def binary_search_insertion(nums: list[int], target: int) -> int: FILE: ja/codes/python/chapter_searching/hashing_search.py function hashing_search_array (line 14) | def hashing_search_array(hmap: dict[int, int], target: int) -> int: function hashing_search_linkedlist (line 21) | def hashing_search_linkedlist( FILE: ja/codes/python/chapter_searching/linear_search.py function linear_search_array (line 14) | def linear_search_array(nums: list[int], target: int) -> int: function linear_search_linkedlist (line 23) | def linear_search_linkedlist(head: ListNode, target: int) -> ListNode | ... FILE: ja/codes/python/chapter_searching/two_sum.py function two_sum_brute_force (line 8) | def two_sum_brute_force(nums: list[int], target: int) -> list[int]: function two_sum_hash_table (line 18) | def two_sum_hash_table(nums: list[int], target: int) -> list[int]: FILE: ja/codes/python/chapter_sorting/bubble_sort.py function bubble_sort (line 8) | def bubble_sort(nums: list[int]): function bubble_sort_with_flag (line 20) | def bubble_sort_with_flag(nums: list[int]): FILE: ja/codes/python/chapter_sorting/bucket_sort.py function bucket_sort (line 8) | def bucket_sort(nums: list[float]): FILE: ja/codes/python/chapter_sorting/counting_sort.py function counting_sort_naive (line 8) | def counting_sort_naive(nums: list[int]): function counting_sort (line 26) | def counting_sort(nums: list[int]): FILE: ja/codes/python/chapter_sorting/heap_sort.py function sift_down (line 8) | def sift_down(nums: list[int], n: int, i: int): function heap_sort (line 28) | def heap_sort(nums: list[int]): FILE: ja/codes/python/chapter_sorting/insertion_sort.py function insertion_sort (line 8) | def insertion_sort(nums: list[int]): FILE: ja/codes/python/chapter_sorting/merge_sort.py function merge (line 8) | def merge(nums: list[int], left: int, mid: int, right: int): function merge_sort (line 38) | def merge_sort(nums: list[int], left: int, right: int): FILE: ja/codes/python/chapter_sorting/quick_sort.py class QuickSort (line 8) | class QuickSort: method partition (line 11) | def partition(self, nums: list[int], left: int, right: int) -> int: method quick_sort (line 26) | def quick_sort(self, nums: list[int], left: int, right: int): class QuickSortMedian (line 38) | class QuickSortMedian: method median_three (line 41) | def median_three(self, nums: list[int], left: int, mid: int, right: in... method partition (line 50) | def partition(self, nums: list[int], left: int, right: int) -> int: method quick_sort (line 69) | def quick_sort(self, nums: list[int], left: int, right: int): class QuickSortTailCall (line 81) | class QuickSortTailCall: method partition (line 84) | def partition(self, nums: list[int], left: int, right: int) -> int: method quick_sort (line 99) | def quick_sort(self, nums: list[int], left: int, right: int): FILE: ja/codes/python/chapter_sorting/radix_sort.py function digit (line 8) | def digit(num: int, exp: int) -> int: function counting_sort_digit (line 14) | def counting_sort_digit(nums: list[int], exp: int): function radix_sort (line 38) | def radix_sort(nums: list[int]): FILE: ja/codes/python/chapter_sorting/selection_sort.py function selection_sort (line 8) | def selection_sort(nums: list[int]): FILE: ja/codes/python/chapter_stack_and_queue/array_deque.py class ArrayDeque (line 8) | class ArrayDeque: method __init__ (line 11) | def __init__(self, capacity: int): method capacity (line 17) | def capacity(self) -> int: method size (line 21) | def size(self) -> int: method is_empty (line 25) | def is_empty(self) -> bool: method index (line 29) | def index(self, i: int) -> int: method push_first (line 36) | def push_first(self, num: int): method push_last (line 48) | def push_last(self, num: int): method pop_first (line 59) | def pop_first(self) -> int: method pop_last (line 67) | def pop_last(self) -> int: method peek_first (line 73) | def peek_first(self) -> int: method peek_last (line 79) | def peek_last(self) -> int: method to_array (line 87) | def to_array(self) -> list[int]: FILE: ja/codes/python/chapter_stack_and_queue/array_queue.py class ArrayQueue (line 8) | class ArrayQueue: method __init__ (line 11) | def __init__(self, size: int): method capacity (line 17) | def capacity(self) -> int: method size (line 21) | def size(self) -> int: method is_empty (line 25) | def is_empty(self) -> bool: method push (line 29) | def push(self, num: int): method pop (line 40) | def pop(self) -> int: method peek (line 48) | def peek(self) -> int: method to_list (line 54) | def to_list(self) -> list[int]: FILE: ja/codes/python/chapter_stack_and_queue/array_stack.py class ArrayStack (line 8) | class ArrayStack: method __init__ (line 11) | def __init__(self): method size (line 15) | def size(self) -> int: method is_empty (line 19) | def is_empty(self) -> bool: method push (line 23) | def push(self, item: int): method pop (line 27) | def pop(self) -> int: method peek (line 33) | def peek(self) -> int: method to_list (line 39) | def to_list(self) -> list[int]: FILE: ja/codes/python/chapter_stack_and_queue/linkedlist_deque.py class ListNode (line 8) | class ListNode: method __init__ (line 11) | def __init__(self, val: int): class LinkedListDeque (line 18) | class LinkedListDeque: method __init__ (line 21) | def __init__(self): method size (line 27) | def size(self) -> int: method is_empty (line 31) | def is_empty(self) -> bool: method push (line 35) | def push(self, num: int, is_front: bool): method push_first (line 55) | def push_first(self, num: int): method push_last (line 59) | def push_last(self, num: int): method pop (line 63) | def pop(self, is_front: bool) -> int: method pop_first (line 88) | def pop_first(self) -> int: method pop_last (line 92) | def pop_last(self) -> int: method peek_first (line 96) | def peek_first(self) -> int: method peek_last (line 102) | def peek_last(self) -> int: method to_array (line 108) | def to_array(self) -> list[int]: FILE: ja/codes/python/chapter_stack_and_queue/linkedlist_queue.py class LinkedListQueue (line 14) | class LinkedListQueue: method __init__ (line 17) | def __init__(self): method size (line 23) | def size(self) -> int: method is_empty (line 27) | def is_empty(self) -> bool: method push (line 31) | def push(self, num: int): method pop (line 45) | def pop(self) -> int: method peek (line 53) | def peek(self) -> int: method to_list (line 59) | def to_list(self) -> list[int]: FILE: ja/codes/python/chapter_stack_and_queue/linkedlist_stack.py class LinkedListStack (line 14) | class LinkedListStack: method __init__ (line 17) | def __init__(self): method size (line 22) | def size(self) -> int: method is_empty (line 26) | def is_empty(self) -> bool: method push (line 30) | def push(self, val: int): method pop (line 37) | def pop(self) -> int: method peek (line 44) | def peek(self) -> int: method to_list (line 50) | def to_list(self) -> list[int]: FILE: ja/codes/python/chapter_tree/array_binary_tree.py class ArrayBinaryTree (line 14) | class ArrayBinaryTree: method __init__ (line 17) | def __init__(self, arr: list[int | None]): method size (line 21) | def size(self): method val (line 25) | def val(self, i: int) -> int | None: method left (line 32) | def left(self, i: int) -> int | None: method right (line 36) | def right(self, i: int) -> int | None: method parent (line 40) | def parent(self, i: int) -> int | None: method level_order (line 44) | def level_order(self) -> list[int]: method dfs (line 53) | def dfs(self, i: int, order: str): method pre_order (line 69) | def pre_order(self) -> list[int]: method in_order (line 75) | def in_order(self) -> list[int]: method post_order (line 81) | def post_order(self) -> list[int]: FILE: ja/codes/python/chapter_tree/avl_tree.py class AVLTree (line 14) | class AVLTree: method __init__ (line 17) | def __init__(self): method get_root (line 21) | def get_root(self) -> TreeNode | None: method height (line 25) | def height(self, node: TreeNode | None) -> int: method update_height (line 32) | def update_height(self, node: TreeNode | None): method balance_factor (line 37) | def balance_factor(self, node: TreeNode | None) -> int: method right_rotate (line 45) | def right_rotate(self, node: TreeNode | None) -> TreeNode | None: method left_rotate (line 58) | def left_rotate(self, node: TreeNode | None) -> TreeNode | None: method rotate (line 71) | def rotate(self, node: TreeNode | None) -> TreeNode | None: method insert (line 96) | def insert(self, val): method insert_helper (line 100) | def insert_helper(self, node: TreeNode | None, val: int) -> TreeNode: method remove (line 117) | def remove(self, val: int): method remove_helper (line 121) | def remove_helper(self, node: TreeNode | None, val: int) -> TreeNode |... method search (line 151) | def search(self, val: int) -> TreeNode | None: function test_insert (line 172) | def test_insert(tree: AVLTree, val: int): function test_remove (line 177) | def test_remove(tree: AVLTree, val: int): FILE: ja/codes/python/chapter_tree/binary_search_tree.py class BinarySearchTree (line 14) | class BinarySearchTree: method __init__ (line 17) | def __init__(self): method get_root (line 22) | def get_root(self) -> TreeNode | None: method search (line 26) | def search(self, num: int) -> TreeNode | None: method insert (line 42) | def insert(self, num: int): method remove (line 68) | def remove(self, num: int): FILE: ja/codes/python/chapter_tree/binary_tree_bfs.py function level_order (line 15) | def level_order(root: TreeNode | None) -> list[int]: FILE: ja/codes/python/chapter_tree/binary_tree_dfs.py function pre_order (line 14) | def pre_order(root: TreeNode | None): function in_order (line 24) | def in_order(root: TreeNode | None): function post_order (line 34) | def post_order(root: TreeNode | None): FILE: ja/codes/python/modules/list_node.py class ListNode (line 8) | class ListNode: method __init__ (line 11) | def __init__(self, val: int): function list_to_linked_list (line 16) | def list_to_linked_list(arr: list[int]) -> ListNode | None: function linked_list_to_list (line 26) | def linked_list_to_list(head: ListNode | None) -> list[int]: FILE: ja/codes/python/modules/print_util.py function print_matrix (line 11) | def print_matrix(mat: list[list[int]]): function print_linked_list (line 19) | def print_linked_list(head: ListNode | None): class Trunk (line 25) | class Trunk: method __init__ (line 26) | def __init__(self, prev, string: str | None = None): function show_trunks (line 31) | def show_trunks(p: Trunk | None): function print_tree (line 38) | def print_tree( function print_dict (line 70) | def print_dict(hmap: dict): function print_heap (line 76) | def print_heap(heap: list[int]): FILE: ja/codes/python/modules/tree_node.py class TreeNode (line 10) | class TreeNode: method __init__ (line 13) | def __init__(self, val: int = 0): function list_to_tree_dfs (line 36) | def list_to_tree_dfs(arr: list[int], i: int) -> TreeNode | None: function list_to_tree (line 49) | def list_to_tree(arr: list[int]) -> TreeNode | None: function tree_to_list_dfs (line 54) | def tree_to_list_dfs(root: TreeNode, i: int, res: list[int]) -> list[int]: function tree_to_list (line 65) | def tree_to_list(root: TreeNode | None) -> list[int]: FILE: ja/codes/python/modules/vertex.py class Vertex (line 6) | class Vertex: method __init__ (line 9) | def __init__(self, val: int): function vals_to_vets (line 13) | def vals_to_vets(vals: list[int]) -> list["Vertex"]: function vets_to_vals (line 18) | def vets_to_vals(vets: list["Vertex"]) -> list[int]: FILE: ja/codes/ruby/chapter_array_and_linkedlist/array.rb function random_access (line 8) | def random_access(nums) function extend (line 20) | def extend(nums, enlarge) function insert (line 34) | def insert(nums, num, index) function remove (line 46) | def remove(nums, index) function traverse (line 54) | def traverse(nums) function find (line 69) | def find(nums, target) FILE: ja/codes/ruby/chapter_array_and_linkedlist/linked_list.rb function insert (line 12) | def insert(n0, _p) function remove (line 19) | def remove(n0) function access (line 29) | def access(head, index) function find (line 39) | def find(head, target) FILE: ja/codes/ruby/chapter_array_and_linkedlist/my_list.rb class MyList (line 8) | class MyList method initialize (line 13) | def initialize method get (line 21) | def get(index) method set (line 28) | def set(index, num) method add (line 34) | def add(num) method insert (line 44) | def insert(index, num) method remove (line 61) | def remove(index) method extend_capacity (line 78) | def extend_capacity method to_array (line 86) | def to_array FILE: ja/codes/ruby/chapter_backtracking/n_queens.rb function backtrack (line 8) | def backtrack(row, n, state, res, cols, diags1, diags2) function n_queens (line 35) | def n_queens(n) FILE: ja/codes/ruby/chapter_backtracking/permutations_i.rb function backtrack (line 8) | def backtrack(state, choices, selected, res) function permutations_i (line 32) | def permutations_i(nums) FILE: ja/codes/ruby/chapter_backtracking/permutations_ii.rb function backtrack (line 8) | def backtrack(state, choices, selected, res) function permutations_ii (line 34) | def permutations_ii(nums) FILE: ja/codes/ruby/chapter_backtracking/preorder_traversal_i_compact.rb function pre_order (line 11) | def pre_order(root) FILE: ja/codes/ruby/chapter_backtracking/preorder_traversal_ii_compact.rb function pre_order (line 11) | def pre_order(root) FILE: ja/codes/ruby/chapter_backtracking/preorder_traversal_iii_compact.rb function pre_order (line 11) | def pre_order(root) FILE: ja/codes/ruby/chapter_backtracking/preorder_traversal_iii_template.rb function is_solution? (line 11) | def is_solution?(state) function record_solution (line 16) | def record_solution(state, res) function is_valid? (line 21) | def is_valid?(state, choice) function make_choice (line 26) | def make_choice(state, choice) function undo_choice (line 31) | def undo_choice(state, choice) function backtrack (line 36) | def backtrack(state, choices, res) FILE: ja/codes/ruby/chapter_backtracking/subset_sum_i.rb function backtrack (line 8) | def backtrack(state, target, choices, start, res) function subset_sum_i (line 30) | def subset_sum_i(nums, target) FILE: ja/codes/ruby/chapter_backtracking/subset_sum_i_naive.rb function backtrack (line 8) | def backtrack(state, target, total, choices, res) function subset_sum_i_naive (line 29) | def subset_sum_i_naive(nums, target) FILE: ja/codes/ruby/chapter_backtracking/subset_sum_ii.rb function backtrack (line 8) | def backtrack(state, target, choices, start, res) function subset_sum_ii (line 34) | def subset_sum_ii(nums, target) FILE: ja/codes/ruby/chapter_computational_complexity/iteration.rb function for_loop (line 8) | def for_loop(n) function while_loop (line 20) | def while_loop(n) function while_loop_ii (line 34) | def while_loop_ii(n) function nested_for_loop (line 50) | def nested_for_loop(n) FILE: ja/codes/ruby/chapter_computational_complexity/recursion.rb function recur (line 8) | def recur(n) function for_loop_recur (line 18) | def for_loop_recur(n) function tail_recur (line 38) | def tail_recur(n, res) function fib (line 46) | def fib(n) FILE: ja/codes/ruby/chapter_computational_complexity/space_complexity.rb function function (line 12) | def function function constant (line 18) | def constant(n) function linear (line 31) | def linear(n) function linear_recur (line 43) | def linear_recur(n) function quadratic (line 50) | def quadratic(n) function quadratic_recur (line 56) | def quadratic_recur(n) function build_tree (line 65) | def build_tree(n) FILE: ja/codes/ruby/chapter_computational_complexity/time_complexity.rb function constant (line 8) | def constant(n) function linear (line 18) | def linear(n) function array_traversal (line 25) | def array_traversal(nums) function quadratic (line 37) | def quadratic(n) function bubble_sort (line 51) | def bubble_sort(nums) function exponential (line 72) | def exponential(n) function exp_recur (line 86) | def exp_recur(n) function logarithmic (line 92) | def logarithmic(n) function log_recur (line 104) | def log_recur(n) function linear_log_recur (line 110) | def linear_log_recur(n) function factorial_recur (line 120) | def factorial_recur(n) FILE: ja/codes/ruby/chapter_computational_complexity/worst_best_time_complexity.rb function random_numbers (line 8) | def random_numbers(n) function find_one (line 16) | def find_one(nums) FILE: ja/codes/ruby/chapter_divide_and_conquer/binary_search_recur.rb function dfs (line 8) | def dfs(nums, target, i, j) function binary_search (line 28) | def binary_search(nums, target) FILE: ja/codes/ruby/chapter_divide_and_conquer/build_tree.rb function dfs (line 11) | def dfs(preorder, inorder_map, i, l, r) function build_tree (line 29) | def build_tree(preorder, inorder) FILE: ja/codes/ruby/chapter_divide_and_conquer/hanota.rb function move (line 8) | def move(src, tar) function dfs (line 16) | def dfs(i, src, buf, tar) function solve_hanota (line 32) | def solve_hanota(_A, _B, _C) FILE: ja/codes/ruby/chapter_dynamic_programming/climbing_stairs_backtrack.rb function backtrack (line 8) | def backtrack(choices, state, n, res) function climbing_stairs_backtrack (line 23) | def climbing_stairs_backtrack(n) FILE: ja/codes/ruby/chapter_dynamic_programming/climbing_stairs_constraint_dp.rb function climbing_stairs_constraint_dp (line 8) | def climbing_stairs_constraint_dp(n) FILE: ja/codes/ruby/chapter_dynamic_programming/climbing_stairs_dfs.rb function dfs (line 8) | def dfs(i) function climbing_stairs_dfs (line 16) | def climbing_stairs_dfs(n) FILE: ja/codes/ruby/chapter_dynamic_programming/climbing_stairs_dfs_mem.rb function dfs (line 8) | def dfs(i, mem) function climbing_stairs_dfs_mem (line 21) | def climbing_stairs_dfs_mem(n) FILE: ja/codes/ruby/chapter_dynamic_programming/climbing_stairs_dp.rb function climbing_stairs_dp (line 8) | def climbing_stairs_dp(n) function climbing_stairs_dp_comp (line 22) | def climbing_stairs_dp_comp(n) FILE: ja/codes/ruby/chapter_dynamic_programming/coin_change.rb function coin_change_dp (line 8) | def coin_change_dp(coins, amt) function coin_change_dp_comp (line 31) | def coin_change_dp_comp(coins, amt) FILE: ja/codes/ruby/chapter_dynamic_programming/coin_change_ii.rb function coin_change_ii_dp (line 8) | def coin_change_ii_dp(coins, amt) function coin_change_ii_dp_comp (line 30) | def coin_change_ii_dp_comp(coins, amt) FILE: ja/codes/ruby/chapter_dynamic_programming/edit_distance.rb function edit_distance_dfs (line 8) | def edit_distance_dfs(s, t, i, j) function edit_distance_dfs_mem (line 25) | def edit_distance_dfs_mem(s, t, mem, i, j) function edit_distance_dp (line 45) | def edit_distance_dp(s, t) function edit_distance_dp_comp (line 67) | def edit_distance_dp_comp(s, t) FILE: ja/codes/ruby/chapter_dynamic_programming/knapsack.rb function knapsack_dfs (line 8) | def knapsack_dfs(wgt, val, i, c) function knapsack_dfs_mem (line 21) | def knapsack_dfs_mem(wgt, val, mem, i, c) function knapsack_dp (line 36) | def knapsack_dp(wgt, val, cap) function knapsack_dp_comp (line 56) | def knapsack_dp_comp(wgt, val, cap) FILE: ja/codes/ruby/chapter_dynamic_programming/min_cost_climbing_stairs_dp.rb function min_cost_climbing_stairs_dp (line 8) | def min_cost_climbing_stairs_dp(cost) function min_cost_climbing_stairs_dp_comp (line 21) | def min_cost_climbing_stairs_dp_comp(cost) FILE: ja/codes/ruby/chapter_dynamic_programming/min_path_sum.rb function min_path_sum_dfs (line 8) | def min_path_sum_dfs(grid, i, j) function min_path_sum_dfs_mem (line 21) | def min_path_sum_dfs_mem(grid, mem, i, j) function min_path_sum_dp (line 36) | def min_path_sum_dp(grid) function min_path_sum_dp_comp (line 55) | def min_path_sum_dp_comp(grid) FILE: ja/codes/ruby/chapter_dynamic_programming/unbounded_knapsack.rb function unbounded_knapsack_dp (line 8) | def unbounded_knapsack_dp(wgt, val, cap) function unbounded_knapsack_dp_comp (line 28) | def unbounded_knapsack_dp_comp(wgt, val, cap) FILE: ja/codes/ruby/chapter_graph/graph_adjacency_list.rb class GraphAdjList (line 10) | class GraphAdjList method initialize (line 14) | def initialize(edges) method size (line 26) | def size method add_edge (line 31) | def add_edge(vet1, vet2) method remove_edge (line 39) | def remove_edge(vet1, vet2) method add_vertex (line 48) | def add_vertex(vet) method remove_vertex (line 56) | def remove_vertex(vet) method __print__ (line 68) | def __print__ FILE: ja/codes/ruby/chapter_graph/graph_adjacency_matrix.rb class GraphAdjMat (line 10) | class GraphAdjMat method initialize (line 11) | def initialize(vertices, edges) method size (line 25) | def size method add_vertex (line 30) | def add_vertex(val) method remove_vertex (line 42) | def remove_vertex(index) method add_edge (line 54) | def add_edge(i, j) method remove_edge (line 66) | def remove_edge(i, j) method __print__ (line 77) | def __print__ FILE: ja/codes/ruby/chapter_graph/graph_bfs.rb function graph_bfs (line 12) | def graph_bfs(graph, start_vet) FILE: ja/codes/ruby/chapter_graph/graph_dfs.rb function dfs (line 12) | def dfs(graph, visited, res, vet) function graph_dfs (line 24) | def graph_dfs(graph, start_vet) FILE: ja/codes/ruby/chapter_greedy/coin_change_greedy.rb function coin_change_greedy (line 8) | def coin_change_greedy(coins, amt) FILE: ja/codes/ruby/chapter_greedy/fractional_knapsack.rb class Item (line 8) | class Item method initialize (line 12) | def initialize(w, v) function fractional_knapsack (line 19) | def fractional_knapsack(wgt, val, cap) FILE: ja/codes/ruby/chapter_greedy/max_capacity.rb function max_capacity (line 8) | def max_capacity(ht) FILE: ja/codes/ruby/chapter_greedy/max_product_cutting.rb function max_product_cutting (line 8) | def max_product_cutting(n) FILE: ja/codes/ruby/chapter_hashing/array_hash_map.rb class Pair (line 8) | class Pair method initialize (line 11) | def initialize(key, val) class ArrayHashMap (line 18) | class ArrayHashMap method initialize (line 20) | def initialize method hash_func (line 26) | def hash_func(key) method get (line 31) | def get(key) method put (line 40) | def put(key, val) method remove (line 47) | def remove(key) method entry_set (line 54) | def entry_set method key_set (line 61) | def key_set method value_set (line 68) | def value_set method print (line 75) | def print FILE: ja/codes/ruby/chapter_hashing/hash_map_chaining.rb class HashMapChaining (line 10) | class HashMapChaining method initialize (line 12) | def initialize method hash_func (line 21) | def hash_func(key) method load_factor (line 26) | def load_factor method get (line 31) | def get(key) method put (line 43) | def put(key, val) method remove (line 62) | def remove(key) method extend (line 76) | def extend method print (line 92) | def print FILE: ja/codes/ruby/chapter_hashing/hash_map_open_addressing.rb class HashMapOpenAddressing (line 10) | class HashMapOpenAddressing method initialize (line 14) | def initialize method hash_func (line 23) | def hash_func(key) method load_factor (line 28) | def load_factor method find_bucket (line 33) | def find_bucket(key) method get (line 58) | def get(key) method put (line 68) | def put(key, val) method remove (line 84) | def remove(key) method extend (line 95) | def extend method print (line 109) | def print FILE: ja/codes/ruby/chapter_hashing/simple_hash.rb function add_hash (line 8) | def add_hash(key) function mul_hash (line 18) | def mul_hash(key) function xor_hash (line 28) | def xor_hash(key) function rot_hash (line 38) | def rot_hash(key) FILE: ja/codes/ruby/chapter_heap/my_heap.rb class MaxHeap (line 10) | class MaxHeap method initialize (line 14) | def initialize(nums) method left (line 24) | def left(i) method right (line 29) | def right(i) method parent (line 34) | def parent(i) method swap (line 39) | def swap(i, j) method size (line 44) | def size method is_empty? (line 49) | def is_empty? method peek (line 54) | def peek method push (line 59) | def push(val) method sift_up (line 67) | def sift_up(i) method pop (line 81) | def pop method sift_down (line 95) | def sift_down(i) method __print__ (line 113) | def __print__ FILE: ja/codes/ruby/chapter_heap/top_k.rb function push_min_heap (line 10) | def push_min_heap(heap, val) function pop_min_heap (line 16) | def pop_min_heap(heap) function peek_min_heap (line 22) | def peek_min_heap(heap) function get_min_heap (line 28) | def get_min_heap(heap) function top_k_heap (line 34) | def top_k_heap(nums, k) FILE: ja/codes/ruby/chapter_searching/binary_search.rb function binary_search (line 8) | def binary_search(nums, target) function binary_search_lcro (line 30) | def binary_search_lcro(nums, target) FILE: ja/codes/ruby/chapter_searching/binary_search_edge.rb function binary_search_left_edge (line 10) | def binary_search_left_edge(nums, target) function binary_search_right_edge (line 21) | def binary_search_right_edge(nums, target) FILE: ja/codes/ruby/chapter_searching/binary_search_insertion.rb function binary_search_insertion_simple (line 8) | def binary_search_insertion_simple(nums, target) function binary_search_insertion (line 29) | def binary_search_insertion(nums, target) FILE: ja/codes/ruby/chapter_searching/hashing_search.rb function hashing_search_array (line 10) | def hashing_search_array(hmap, target) function hashing_search_linkedlist (line 17) | def hashing_search_linkedlist(hmap, target) FILE: ja/codes/ruby/chapter_searching/linear_search.rb function linear_search_array (line 10) | def linear_search_array(nums, target) function linear_search_linkedlist (line 20) | def linear_search_linkedlist(head, target) FILE: ja/codes/ruby/chapter_searching/two_sum.rb function two_sum_brute_force (line 8) | def two_sum_brute_force(nums, target) function two_sum_hash_table (line 20) | def two_sum_hash_table(nums, target) FILE: ja/codes/ruby/chapter_sorting/bubble_sort.rb function bubble_sort (line 8) | def bubble_sort(nums) function bubble_sort_with_flag (line 23) | def bubble_sort_with_flag(nums) FILE: ja/codes/ruby/chapter_sorting/bucket_sort.rb function bucket_sort (line 8) | def bucket_sort(nums) FILE: ja/codes/ruby/chapter_sorting/counting_sort.rb function counting_sort_naive (line 8) | def counting_sort_naive(nums) function counting_sort (line 28) | def counting_sort(nums) FILE: ja/codes/ruby/chapter_sorting/heap_sort.rb function sift_down (line 8) | def sift_down(nums, n, i) function heap_sort (line 26) | def heap_sort(nums) FILE: ja/codes/ruby/chapter_sorting/insertion_sort.rb function insertion_sort (line 8) | def insertion_sort(nums) FILE: ja/codes/ruby/chapter_sorting/merge_sort.rb function merge (line 8) | def merge(nums, left, mid, right) function merge_sort (line 43) | def merge_sort(nums, left, right) FILE: ja/codes/ruby/chapter_sorting/quick_sort.rb class QuickSort (line 8) | class QuickSort method partition (line 11) | def partition(nums, left, right) method quick_sort (line 30) | def quick_sort(nums, left, right) class QuickSortMedian (line 45) | class QuickSortMedian method median_three (line 48) | def median_three(nums, left, mid, right) method partition (line 59) | def partition(nums, left, right) method quick_sort (line 81) | def quick_sort(nums, left, right) class QuickSortTailCall (line 96) | class QuickSortTailCall method partition (line 99) | def partition(nums, left, right) method quick_sort (line 119) | def quick_sort(nums, left, right) FILE: ja/codes/ruby/chapter_sorting/radix_sort.rb function digit (line 8) | def digit(num, exp) function counting_sort_digit (line 14) | def counting_sort_digit(nums, exp) function radix_sort (line 38) | def radix_sort(nums) FILE: ja/codes/ruby/chapter_sorting/selection_sort.rb function selection_sort (line 8) | def selection_sort(nums) FILE: ja/codes/ruby/chapter_stack_and_queue/array_deque.rb class ArrayDeque (line 8) | class ArrayDeque method initialize (line 13) | def initialize(capacity) method capacity (line 20) | def capacity method is_empty? (line 25) | def is_empty? method push_first (line 30) | def push_first(num) method push_last (line 45) | def push_last(num) method pop_first (line 59) | def pop_first method pop_last (line 68) | def pop_last method peek_first (line 75) | def peek_first method peek_last (line 82) | def peek_last method to_array (line 91) | def to_array method index (line 103) | def index(i) FILE: ja/codes/ruby/chapter_stack_and_queue/array_queue.rb class ArrayQueue (line 8) | class ArrayQueue method initialize (line 13) | def initialize(size) method capacity (line 20) | def capacity method is_empty? (line 25) | def is_empty? method push (line 30) | def push(num) method pop (line 42) | def pop method peek (line 51) | def peek method to_array (line 58) | def to_array FILE: ja/codes/ruby/chapter_stack_and_queue/array_stack.rb class ArrayStack (line 8) | class ArrayStack method initialize (line 10) | def initialize method size (line 15) | def size method is_empty? (line 20) | def is_empty? method push (line 25) | def push(item) method pop (line 30) | def pop method peek (line 37) | def peek method to_array (line 44) | def to_array FILE: ja/codes/ruby/chapter_stack_and_queue/linkedlist_deque.rb class ListNode (line 8) | class ListNode method initialize (line 14) | def initialize(val) class LinkedListDeque (line 20) | class LinkedListDeque method initialize (line 25) | def initialize method is_empty? (line 32) | def is_empty? method push (line 37) | def push(num, is_front) method push_first (line 59) | def push_first(num) method push_last (line 64) | def push_last(num) method pop (line 69) | def pop(is_front) method pop_first (line 99) | def pop_first method pop_last (line 104) | def pop_last method peek_first (line 109) | def peek_first method peek_last (line 116) | def peek_last method to_array (line 123) | def to_array FILE: ja/codes/ruby/chapter_stack_and_queue/linkedlist_queue.rb class LinkedListQueue (line 10) | class LinkedListQueue method initialize (line 15) | def initialize method is_empty? (line 22) | def is_empty? method push (line 27) | def push(num) method pop (line 45) | def pop method peek (line 54) | def peek method to_array (line 61) | def to_array FILE: ja/codes/ruby/chapter_stack_and_queue/linkedlist_stack.rb class LinkedListStack (line 10) | class LinkedListStack method initialize (line 14) | def initialize method is_empty? (line 19) | def is_empty? method push (line 24) | def push(val) method pop (line 32) | def pop method peek (line 40) | def peek method to_array (line 47) | def to_array FILE: ja/codes/ruby/chapter_tree/array_binary_tree.rb class ArrayBinaryTree (line 11) | class ArrayBinaryTree method initialize (line 13) | def initialize(arr) method size (line 18) | def size method val (line 23) | def val(i) method left (line 31) | def left(i) method right (line 36) | def right(i) method parent (line 41) | def parent(i) method level_order (line 46) | def level_order method dfs (line 58) | def dfs(i, order) method pre_order (line 71) | def pre_order method in_order (line 78) | def in_order method post_order (line 85) | def post_order FILE: ja/codes/ruby/chapter_tree/avl_tree.rb class AVLTree (line 11) | class AVLTree method initialize (line 13) | def initialize method get_root (line 18) | def get_root method height (line 23) | def height(node) method update_height (line 31) | def update_height(node) method balance_factor (line 37) | def balance_factor(node) method right_rotate (line 46) | def right_rotate(node) method left_rotate (line 60) | def left_rotate(node) method rotate (line 74) | def rotate(node) method insert (line 103) | def insert(val) method insert_helper (line 108) | def insert_helper(node, val) method remove (line 126) | def remove(val) method remove_helper (line 131) | def remove_helper(node, val) method search (line 162) | def search(val) function test_insert (line 184) | def test_insert(tree, val) function test_remove (line 190) | def test_remove(tree, val) FILE: ja/codes/ruby/chapter_tree/binary_search_tree.rb class BinarySearchTree (line 11) | class BinarySearchTree method initialize (line 13) | def initialize method get_root (line 19) | def get_root method search (line 24) | def search(num) method insert (line 45) | def insert(num) method remove (line 78) | def remove(num) FILE: ja/codes/ruby/chapter_tree/binary_tree_bfs.rb function level_order (line 11) | def level_order(root) FILE: ja/codes/ruby/chapter_tree/binary_tree_dfs.rb function pre_order (line 11) | def pre_order(root) function in_order (line 21) | def in_order(root) function post_order (line 31) | def post_order(root) FILE: ja/codes/ruby/utils/list_node.rb class ListNode (line 8) | class ListNode method initialize (line 12) | def initialize(val=0, next_node=nil) function arr_to_linked_list (line 19) | def arr_to_linked_list(arr) function linked_list_to_arr (line 31) | def linked_list_to_arr(head) FILE: ja/codes/ruby/utils/print_util.rb function print_matrix (line 10) | def print_matrix(mat) function print_linked_list (line 17) | def print_linked_list(head) class Trunk (line 26) | class Trunk method initialize (line 29) | def initialize(prev, str) function show_trunk (line 35) | def show_trunk(p) function print_tree (line 45) | def print_tree(root, prev=nil, is_right=false) function print_hash_map (line 70) | def print_hash_map(hmap) function print_heap (line 75) | def print_heap(heap) FILE: ja/codes/ruby/utils/tree_node.rb class TreeNode (line 8) | class TreeNode method initialize (line 14) | def initialize(val=0) function arr_to_tree_dfs (line 21) | def arr_to_tree_dfs(arr, i) function arr_to_tree (line 33) | def arr_to_tree(arr) function tree_to_arr_dfs (line 38) | def tree_to_arr_dfs(root, i, res) function tree_to_arr (line 49) | def tree_to_arr(root) FILE: ja/codes/ruby/utils/vertex.rb class Vertex (line 8) | class Vertex method initialize (line 11) | def initialize(val) function vals_to_vets (line 17) | def vals_to_vets(vals) function vets_to_vals (line 22) | def vets_to_vals(vets) FILE: ja/codes/rust/chapter_array_and_linkedlist/array.rs function random_access (line 11) | fn random_access(nums: &[i32]) -> i32 { function extend (line 20) | fn extend(nums: &[i32], enlarge: usize) -> Vec { function insert (line 31) | fn insert(nums: &mut [i32], num: i32, index: usize) { function remove (line 41) | fn remove(nums: &mut [i32], index: usize) { function traverse (line 49) | fn traverse(nums: &[i32]) { function find (line 63) | fn find(nums: &[i32], target: i32) -> Option { function main (line 73) | fn main() { FILE: ja/codes/rust/chapter_array_and_linkedlist/linked_list.rs function insert (line 13) | pub fn insert(n0: &Rc>>, P: Rc(n0: &Rc>>) { function access (line 31) | pub fn access(head: Rc>>, index: i32) -> Option(head: Rc>>, target: T) -> ... function main (line 67) | fn main() { FILE: ja/codes/rust/chapter_array_and_linkedlist/list.rs function main (line 9) | fn main() { FILE: ja/codes/rust/chapter_array_and_linkedlist/my_list.rs type MyList (line 11) | struct MyList { method new (line 21) | pub fn new(capacity: usize) -> Self { method size (line 32) | pub fn size(&self) -> usize { method capacity (line 37) | pub fn capacity(&self) -> usize { method get (line 42) | pub fn get(&self, index: usize) -> i32 { method set (line 51) | pub fn set(&mut self, index: usize, num: i32) { method add (line 59) | pub fn add(&mut self, num: i32) { method insert (line 70) | pub fn insert(&mut self, index: usize, num: i32) { method remove (line 88) | pub fn remove(&mut self, index: usize) -> i32 { method extend_capacity (line 104) | pub fn extend_capacity(&mut self) { method to_array (line 113) | pub fn to_array(&self) -> Vec { function main (line 124) | fn main() { FILE: ja/codes/rust/chapter_backtracking/n_queens.rs function backtrack (line 8) | fn backtrack( function n_queens (line 42) | fn n_queens(n: usize) -> Vec>> { function main (line 64) | pub fn main() { FILE: ja/codes/rust/chapter_backtracking/permutations_i.rs function backtrack (line 8) | fn backtrack(mut state: Vec, choices: &[i32], selected: &mut [bool]... function permutations_i (line 32) | fn permutations_i(nums: &mut [i32]) -> Vec> { function main (line 39) | pub fn main() { FILE: ja/codes/rust/chapter_backtracking/permutations_ii.rs function backtrack (line 10) | fn backtrack(mut state: Vec, choices: &[i32], selected: &mut [bool]... function permutations_ii (line 36) | fn permutations_ii(nums: &mut [i32]) -> Vec> { function main (line 43) | pub fn main() { FILE: ja/codes/rust/chapter_backtracking/preorder_traversal_i_compact.rs function pre_order (line 11) | fn pre_order(res: &mut Vec>>, root: Option<&Rc>>) -> bool { function record_solution (line 16) | fn record_solution( function is_valid (line 24) | fn is_valid(_: &mut Vec>>, choice: Option<&Rc>>, choice: Rc>>, _: Rc Vec> { function main (line 48) | pub fn main() { FILE: ja/codes/rust/chapter_backtracking/subset_sum_i_naive.rs function backtrack (line 8) | fn backtrack( function subset_sum_i_naive (line 36) | fn subset_sum_i_naive(nums: &[i32], target: i32) -> Vec> { function main (line 45) | pub fn main() { FILE: ja/codes/rust/chapter_backtracking/subset_sum_ii.rs function backtrack (line 8) | fn backtrack( function subset_sum_ii (line 43) | fn subset_sum_ii(nums: &mut [i32], target: i32) -> Vec> { function main (line 53) | pub fn main() { FILE: ja/codes/rust/chapter_computational_complexity/iteration.rs function for_loop (line 8) | fn for_loop(n: i32) -> i32 { function while_loop (line 18) | fn while_loop(n: i32) -> i32 { function while_loop_ii (line 31) | fn while_loop_ii(n: i32) -> i32 { function nested_for_loop (line 46) | fn nested_for_loop(n: i32) -> String { function main (line 59) | fn main() { FILE: ja/codes/rust/chapter_computational_complexity/recursion.rs function recur (line 8) | fn recur(n: i32) -> i32 { function for_loop_recur (line 20) | fn for_loop_recur(n: i32) -> i32 { function tail_recur (line 39) | fn tail_recur(n: i32, res: i32) -> i32 { function fib (line 49) | fn fib(n: i32) -> i32 { function main (line 61) | fn main() { FILE: ja/codes/rust/chapter_computational_complexity/space_complexity.rs function function (line 13) | fn function() -> i32 { function constant (line 20) | fn constant(n: i32) { function linear (line 38) | fn linear(n: i32) { function linear_recur (line 54) | fn linear_recur(n: i32) { function quadratic (line 64) | fn quadratic(n: i32) { function quadratic_recur (line 79) | fn quadratic_recur(n: i32) -> i32 { function build_tree (line 90) | fn build_tree(n: i32) -> Option>> { function main (line 101) | fn main() { FILE: ja/codes/rust/chapter_computational_complexity/time_complexity.rs function constant (line 8) | fn constant(n: i32) -> i32 { function linear (line 19) | fn linear(n: i32) -> i32 { function array_traversal (line 28) | fn array_traversal(nums: &[i32]) -> i32 { function quadratic (line 38) | fn quadratic(n: i32) -> i32 { function bubble_sort (line 50) | fn bubble_sort(nums: &mut [i32]) -> i32 { function exponential (line 70) | fn exponential(n: i32) -> i32 { function exp_recur (line 85) | fn exp_recur(n: i32) -> i32 { function logarithmic (line 93) | fn logarithmic(mut n: i32) -> i32 { function log_recur (line 103) | fn log_recur(n: i32) -> i32 { function linear_log_recur (line 111) | fn linear_log_recur(n: i32) -> i32 { function factorial_recur (line 123) | fn factorial_recur(n: i32) -> i32 { function main (line 136) | fn main() { FILE: ja/codes/rust/chapter_computational_complexity/worst_best_time_complexity.rs function random_numbers (line 12) | fn random_numbers(n: i32) -> Vec { function find_one (line 21) | fn find_one(nums: &[i32]) -> Option { function main (line 33) | fn main() { FILE: ja/codes/rust/chapter_divide_and_conquer/binary_search_recur.rs function dfs (line 8) | fn dfs(nums: &[i32], target: i32, i: i32, j: i32) -> i32 { function binary_search (line 27) | fn binary_search(nums: &[i32], target: i32) -> i32 { function main (line 34) | pub fn main() { FILE: ja/codes/rust/chapter_divide_and_conquer/build_tree.rs function dfs (line 12) | fn dfs( function build_tree (line 36) | fn build_tree(preorder: &[i32], inorder: &[i32]) -> Option, tar: &mut Vec) { function dfs (line 18) | fn dfs(i: i32, src: &mut Vec, buf: &mut Vec, tar: &mut Vec, B: &mut Vec, C: &mut Vec) { function main (line 40) | pub fn main() { FILE: ja/codes/rust/chapter_dynamic_programming/climbing_stairs_backtrack.rs function backtrack (line 8) | fn backtrack(choices: &[i32], state: i32, n: i32, res: &mut [i32]) { function climbing_stairs_backtrack (line 26) | fn climbing_stairs_backtrack(n: usize) -> i32 { function main (line 36) | pub fn main() { FILE: ja/codes/rust/chapter_dynamic_programming/climbing_stairs_constraint_dp.rs function climbing_stairs_constraint_dp (line 8) | fn climbing_stairs_constraint_dp(n: usize) -> i32 { function main (line 28) | pub fn main() { FILE: ja/codes/rust/chapter_dynamic_programming/climbing_stairs_dfs.rs function dfs (line 8) | fn dfs(i: usize) -> i32 { function climbing_stairs_dfs (line 19) | fn climbing_stairs_dfs(n: usize) -> i32 { function main (line 24) | pub fn main() { FILE: ja/codes/rust/chapter_dynamic_programming/climbing_stairs_dfs_mem.rs function dfs (line 8) | fn dfs(i: usize, mem: &mut [i32]) -> i32 { function climbing_stairs_dfs_mem (line 25) | fn climbing_stairs_dfs_mem(n: usize) -> i32 { function main (line 32) | pub fn main() { FILE: ja/codes/rust/chapter_dynamic_programming/climbing_stairs_dp.rs function climbing_stairs_dp (line 8) | fn climbing_stairs_dp(n: usize) -> i32 { function climbing_stairs_dp_comp (line 26) | fn climbing_stairs_dp_comp(n: usize) -> i32 { function main (line 40) | pub fn main() { FILE: ja/codes/rust/chapter_dynamic_programming/coin_change.rs function coin_change_dp (line 8) | fn coin_change_dp(coins: &[i32], amt: usize) -> i32 { function coin_change_dp_comp (line 37) | fn coin_change_dp_comp(coins: &[i32], amt: usize) -> i32 { function main (line 64) | pub fn main() { FILE: ja/codes/rust/chapter_dynamic_programming/coin_change_ii.rs function coin_change_ii_dp (line 8) | fn coin_change_ii_dp(coins: &[i32], amt: usize) -> i32 { function coin_change_ii_dp_comp (line 32) | fn coin_change_ii_dp_comp(coins: &[i32], amt: usize) -> i32 { function main (line 53) | pub fn main() { FILE: ja/codes/rust/chapter_dynamic_programming/edit_distance.rs function edit_distance_dfs (line 8) | fn edit_distance_dfs(s: &str, t: &str, i: usize, j: usize) -> i32 { function edit_distance_dfs_mem (line 34) | fn edit_distance_dfs_mem(s: &str, t: &str, mem: &mut Vec>, i: u... function edit_distance_dp (line 65) | fn edit_distance_dp(s: &str, t: &str) -> i32 { function edit_distance_dp_comp (line 92) | fn edit_distance_dp_comp(s: &str, t: &str) -> i32 { function main (line 121) | pub fn main() { FILE: ja/codes/rust/chapter_dynamic_programming/knapsack.rs function knapsack_dfs (line 8) | fn knapsack_dfs(wgt: &[i32], val: &[i32], i: usize, c: usize) -> i32 { function knapsack_dfs_mem (line 25) | fn knapsack_dfs_mem(wgt: &[i32], val: &[i32], mem: &mut Vec>, i... function knapsack_dp (line 47) | fn knapsack_dp(wgt: &[i32], val: &[i32], cap: usize) -> i32 { function knapsack_dp_comp (line 70) | fn knapsack_dp_comp(wgt: &[i32], val: &[i32], cap: usize) -> i32 { function main (line 88) | pub fn main() { FILE: ja/codes/rust/chapter_dynamic_programming/min_cost_climbing_stairs_dp.rs function min_cost_climbing_stairs_dp (line 10) | fn min_cost_climbing_stairs_dp(cost: &[i32]) -> i32 { function min_cost_climbing_stairs_dp_comp (line 28) | fn min_cost_climbing_stairs_dp_comp(cost: &[i32]) -> i32 { function main (line 43) | pub fn main() { FILE: ja/codes/rust/chapter_dynamic_programming/min_path_sum.rs function min_path_sum_dfs (line 8) | fn min_path_sum_dfs(grid: &Vec>, i: i32, j: i32) -> i32 { function min_path_sum_dfs_mem (line 25) | fn min_path_sum_dfs_mem(grid: &Vec>, mem: &mut Vec>, i... function min_path_sum_dp (line 47) | fn min_path_sum_dp(grid: &Vec>) -> i32 { function min_path_sum_dp_comp (line 70) | fn min_path_sum_dp_comp(grid: &Vec>) -> i32 { function main (line 92) | pub fn main() { FILE: ja/codes/rust/chapter_dynamic_programming/unbounded_knapsack.rs function unbounded_knapsack_dp (line 8) | fn unbounded_knapsack_dp(wgt: &[i32], val: &[i32], cap: usize) -> i32 { function unbounded_knapsack_dp_comp (line 28) | fn unbounded_knapsack_dp_comp(wgt: &[i32], val: &[i32], cap: usize) -> i... function main (line 48) | pub fn main() { FILE: ja/codes/rust/chapter_graph/graph_adjacency_list.rs type GraphAdjList (line 12) | pub struct GraphAdjList { method new (line 19) | pub fn new(edges: Vec<[Vertex; 2]>) -> Self { method size (line 35) | pub fn size(&self) -> usize { method add_edge (line 40) | pub fn add_edge(&mut self, vet1: Vertex, vet2: Vertex) { method remove_edge (line 51) | pub fn remove_edge(&mut self, vet1: Vertex, vet2: Vertex) { method add_vertex (line 65) | pub fn add_vertex(&mut self, vet: Vertex) { method remove_vertex (line 75) | pub fn remove_vertex(&mut self, vet: Vertex) { method print (line 85) | pub fn print(&self) { function main (line 96) | fn main() { FILE: ja/codes/rust/chapter_graph/graph_adjacency_matrix.rs type GraphAdjMat (line 8) | pub struct GraphAdjMat { method new (line 17) | pub fn new(vertices: Vec, edges: Vec<[usize; 2]>) -> Self { method size (line 36) | pub fn size(&self) -> usize { method add_vertex (line 41) | pub fn add_vertex(&mut self, val: i32) { method remove_vertex (line 54) | pub fn remove_vertex(&mut self, index: usize) { method add_edge (line 69) | pub fn add_edge(&mut self, i: usize, j: usize) { method remove_edge (line 82) | pub fn remove_edge(&mut self, i: usize, j: usize) { method print (line 93) | pub fn print(&self) { function main (line 105) | fn main() { FILE: ja/codes/rust/chapter_graph/graph_bfs.rs function graph_bfs (line 15) | fn graph_bfs(graph: GraphAdjList, start_vet: Vertex) -> Vec { function main (line 44) | fn main() { FILE: ja/codes/rust/chapter_graph/graph_dfs.rs function dfs (line 14) | fn dfs(graph: &GraphAdjList, visited: &mut HashSet, res: &mut Ve... function graph_dfs (line 31) | fn graph_dfs(graph: GraphAdjList, start_vet: Vertex) -> Vec { function main (line 42) | fn main() { FILE: ja/codes/rust/chapter_greedy/coin_change_greedy.rs function coin_change_greedy (line 8) | fn coin_change_greedy(coins: &[i32], mut amt: i32) -> i32 { function main (line 31) | fn main() { FILE: ja/codes/rust/chapter_greedy/fractional_knapsack.rs type Item (line 8) | struct Item { method new (line 14) | fn new(w: i32, v: i32) -> Self { function fractional_knapsack (line 20) | fn fractional_knapsack(wgt: &[i32], val: &[i32], mut cap: i32) -> f64 { function main (line 51) | fn main() { FILE: ja/codes/rust/chapter_greedy/max_capacity.rs function max_capacity (line 8) | fn max_capacity(ht: &[i32]) -> i32 { function main (line 30) | fn main() { FILE: ja/codes/rust/chapter_greedy/max_product_cutting.rs function max_product_cutting (line 8) | fn max_product_cutting(n: i32) -> i32 { function main (line 29) | fn main() { FILE: ja/codes/rust/chapter_hashing/array_hash_map.rs type Pair (line 9) | pub struct Pair { type ArrayHashMap (line 14) | pub struct ArrayHashMap { method new (line 19) | pub fn new() -> ArrayHashMap { method hash_func (line 27) | fn hash_func(&self, key: i32) -> usize { method get (line 32) | pub fn get(&self, key: i32) -> Option<&String> { method put (line 38) | pub fn put(&mut self, key: i32, val: &str) { method remove (line 47) | pub fn remove(&mut self, key: i32) { method entry_set (line 54) | pub fn entry_set(&self) -> Vec<&Pair> { method key_set (line 62) | pub fn key_set(&self) -> Vec<&i32> { method value_set (line 70) | pub fn value_set(&self) -> Vec<&String> { method print (line 78) | pub fn print(&self) { function main (line 85) | fn main() { FILE: ja/codes/rust/chapter_hashing/build_in_hash.rs function main (line 13) | fn main() { FILE: ja/codes/rust/chapter_hashing/hash_map.rs function main (line 12) | pub fn main() { FILE: ja/codes/rust/chapter_hashing/hash_map_chaining.rs type Pair (line 9) | struct Pair { type HashMapChaining (line 15) | struct HashMapChaining { method new (line 25) | fn new() -> Self { method hash_func (line 36) | fn hash_func(&self, key: i32) -> usize { method load_factor (line 41) | fn load_factor(&self) -> f32 { method remove (line 46) | fn remove(&mut self, key: i32) -> Option { method extend (line 63) | fn extend(&mut self) { method print (line 81) | fn print(&self) { method put (line 92) | fn put(&mut self, key: i32, val: String) { method get (line 115) | fn get(&self, key: i32) -> Option<&str> { function main (line 131) | pub fn main() { FILE: ja/codes/rust/chapter_hashing/hash_map_open_addressing.rs type HashMapOpenAddressing (line 14) | struct HashMapOpenAddressing { method new (line 25) | fn new() -> Self { method hash_func (line 40) | fn hash_func(&self, key: i32) -> usize { method load_factor (line 45) | fn load_factor(&self) -> f64 { method find_bucket (line 50) | fn find_bucket(&mut self, key: i32) -> usize { method get (line 81) | fn get(&mut self, key: i32) -> Option<&str> { method put (line 93) | fn put(&mut self, key: i32, val: String) { method remove (line 111) | fn remove(&mut self, key: i32) { method extend (line 122) | fn extend(&mut self) { method print (line 141) | fn print(&self) { function main (line 156) | fn main() { FILE: ja/codes/rust/chapter_hashing/simple_hash.rs function add_hash (line 8) | fn add_hash(key: &str) -> i32 { function mul_hash (line 20) | fn mul_hash(key: &str) -> i32 { function xor_hash (line 32) | fn xor_hash(key: &str) -> i32 { function rot_hash (line 44) | fn rot_hash(key: &str) -> i32 { function main (line 56) | fn main() { FILE: ja/codes/rust/chapter_heap/heap.rs function test_push_max (line 11) | fn test_push_max(heap: &mut BinaryHeap, val: i32) { function test_pop_max (line 17) | fn test_pop_max(heap: &mut BinaryHeap) { function main (line 24) | fn main() { FILE: ja/codes/rust/chapter_heap/my_heap.rs type MaxHeap (line 10) | struct MaxHeap { method new (line 17) | fn new(nums: Vec) -> Self { method left (line 28) | fn left(i: usize) -> usize { method right (line 33) | fn right(i: usize) -> usize { method parent (line 38) | fn parent(i: usize) -> usize { method swap (line 43) | fn swap(&mut self, i: usize, j: usize) { method size (line 48) | fn size(&self) -> usize { method is_empty (line 53) | fn is_empty(&self) -> bool { method peek (line 58) | fn peek(&self) -> Option { method push (line 63) | fn push(&mut self, val: i32) { method sift_up (line 71) | fn sift_up(&mut self, mut i: usize) { method pop (line 91) | fn pop(&mut self) -> i32 { method sift_down (line 107) | fn sift_down(&mut self, mut i: usize) { method print (line 129) | fn print(&self) { function main (line 135) | fn main() { FILE: ja/codes/rust/chapter_heap/top_k.rs function top_k_heap (line 13) | fn top_k_heap(nums: Vec, k: usize) -> BinaryHeap> { function main (line 32) | fn main() { FILE: ja/codes/rust/chapter_searching/binary_search.rs function binary_search (line 8) | fn binary_search(nums: &[i32], target: i32) -> i32 { function binary_search_lcro (line 31) | fn binary_search_lcro(nums: &[i32], target: i32) -> i32 { function main (line 54) | pub fn main() { FILE: ja/codes/rust/chapter_searching/binary_search_edge.rs function binary_search_left_edge (line 12) | fn binary_search_left_edge(nums: &[i32], target: i32) -> i32 { function binary_search_right_edge (line 24) | fn binary_search_right_edge(nums: &[i32], target: i32) -> i32 { function main (line 38) | fn main() { FILE: ja/codes/rust/chapter_searching/binary_search_insertion.rs function binary_search_insertion_simple (line 9) | fn binary_search_insertion_simple(nums: &[i32], target: i32) -> i32 { function binary_search_insertion (line 26) | pub fn binary_search_insertion(nums: &[i32], target: i32) -> i32 { function main (line 43) | fn main() { FILE: ja/codes/rust/chapter_searching/hashing_search.rs function hashing_search_array (line 13) | fn hashing_search_array<'a>(map: &'a HashMap, target: i32) -... function hashing_search_linked_list (line 20) | fn hashing_search_linked_list( function main (line 30) | pub fn main() { FILE: ja/codes/rust/chapter_searching/linear_search.rs function linear_search_array (line 12) | fn linear_search_array(nums: &[i32], target: i32) -> i32 { function linear_search_linked_list (line 25) | fn linear_search_linked_list( function main (line 42) | pub fn main() { FILE: ja/codes/rust/chapter_searching/two_sum.rs function two_sum_brute_force (line 11) | pub fn two_sum_brute_force(nums: &Vec, target: i32) -> Option, target: i32) -> Option usize { method quick_sort (line 29) | pub fn quick_sort(left: i32, right: i32, nums: &mut [i32]) { type QuickSortMedian (line 43) | struct QuickSortMedian; method median_three (line 47) | fn median_three(nums: &mut [i32], left: usize, mid: usize, right: usiz... method partition (line 59) | fn partition(nums: &mut [i32], left: usize, right: usize) -> usize { method quick_sort (line 80) | pub fn quick_sort(left: i32, right: i32, nums: &mut [i32]) { type QuickSortTailCall (line 94) | struct QuickSortTailCall; method partition (line 98) | fn partition(nums: &mut [i32], left: usize, right: usize) -> usize { method quick_sort (line 115) | pub fn quick_sort(mut left: i32, mut right: i32, nums: &mut [i32]) { function main (line 133) | fn main() { FILE: ja/codes/rust/chapter_sorting/radix_sort.rs function digit (line 10) | fn digit(num: i32, exp: i32) -> usize { function counting_sort_digit (line 16) | fn counting_sort_digit(nums: &mut [i32], exp: i32) { function radix_sort (line 42) | fn radix_sort(nums: &mut [i32]) { function main (line 54) | fn main() { FILE: ja/codes/rust/chapter_sorting/selection_sort.rs function selection_sort (line 10) | fn selection_sort(nums: &mut [i32]) { function main (line 30) | pub fn main() { FILE: ja/codes/rust/chapter_stack_and_queue/array_deque.rs type ArrayDeque (line 8) | struct ArrayDeque { function new (line 16) | pub fn new(capacity: usize) -> Self { function capacity (line 25) | pub fn capacity(&self) -> usize { function size (line 30) | pub fn size(&self) -> usize { function is_empty (line 35) | pub fn is_empty(&self) -> bool { function index (line 40) | fn index(&self, i: i32) -> usize { function push_first (line 48) | pub fn push_first(&mut self, num: T) { function push_last (line 62) | pub fn push_last(&mut self, num: T) { function pop_first (line 75) | fn pop_first(&mut self) -> T { function pop_last (line 84) | fn pop_last(&mut self) -> T { function peek_first (line 91) | fn peek_first(&self) -> T { function peek_last (line 99) | fn peek_last(&self) -> T { function to_array (line 109) | fn to_array(&self) -> Vec { function main (line 122) | fn main() { FILE: ja/codes/rust/chapter_stack_and_queue/array_queue.rs type ArrayQueue (line 8) | struct ArrayQueue { function new (line 17) | fn new(capacity: i32) -> ArrayQueue { function capacity (line 27) | fn capacity(&self) -> i32 { function size (line 32) | fn size(&self) -> i32 { function is_empty (line 37) | fn is_empty(&self) -> bool { function push (line 42) | fn push(&mut self, num: T) { function pop (line 56) | fn pop(&mut self) -> T { function peek (line 65) | fn peek(&self) -> T { function to_vector (line 73) | fn to_vector(&self) -> Vec { function main (line 86) | fn main() { FILE: ja/codes/rust/chapter_stack_and_queue/array_stack.rs type ArrayStack (line 10) | struct ArrayStack { function new (line 16) | fn new() -> ArrayStack { function size (line 23) | fn size(&self) -> usize { function is_empty (line 28) | fn is_empty(&self) -> bool { function push (line 33) | fn push(&mut self, num: T) { function pop (line 38) | fn pop(&mut self) -> Option { function peek (line 43) | fn peek(&self) -> Option<&T> { function to_array (line 51) | fn to_array(&self) -> &Vec { function main (line 57) | fn main() { FILE: ja/codes/rust/chapter_stack_and_queue/deque.rs function main (line 11) | pub fn main() { FILE: ja/codes/rust/chapter_stack_and_queue/linkedlist_deque.rs type ListNode (line 13) | pub struct ListNode { function new (line 20) | pub fn new(val: T) -> Rc>> { type LinkedListDeque (line 31) | pub struct LinkedListDeque { function new (line 38) | pub fn new() -> Self { function size (line 47) | pub fn size(&self) -> usize { function is_empty (line 52) | pub fn is_empty(&self) -> bool { function push (line 57) | fn push(&mut self, num: T, is_front: bool) { function push_first (line 95) | pub fn push_first(&mut self, num: T) { function push_last (line 100) | pub fn push_last(&mut self, num: T) { function pop (line 105) | fn pop(&mut self, is_front: bool) -> Option { function pop_first (line 145) | pub fn pop_first(&mut self) -> Option { function pop_last (line 150) | pub fn pop_last(&mut self) -> Option { function peek_first (line 155) | pub fn peek_first(&self) -> Option<&Rc>>> { function peek_last (line 160) | pub fn peek_last(&self) -> Option<&Rc>>> { function to_array (line 165) | pub fn to_array(&self, head: Option<&Rc>>>) -> Vec { function main (line 180) | fn main() { FILE: ja/codes/rust/chapter_stack_and_queue/linkedlist_queue.rs type LinkedListQueue (line 14) | pub struct LinkedListQueue { function new (line 21) | pub fn new() -> Self { function size (line 30) | pub fn size(&self) -> usize { function is_empty (line 35) | pub fn is_empty(&self) -> bool { function push (line 40) | pub fn push(&mut self, num: T) { function pop (line 59) | pub fn pop(&mut self) -> Option { function peek (line 75) | pub fn peek(&self) -> Option<&Rc>>> { function to_array (line 80) | pub fn to_array(&self, head: Option<&Rc>>>) -> Vec { function main (line 97) | fn main() { FILE: ja/codes/rust/chapter_stack_and_queue/linkedlist_stack.rs type LinkedListStack (line 14) | pub struct LinkedListStack { function new (line 20) | pub fn new() -> Self { function size (line 28) | pub fn size(&self) -> usize { function is_empty (line 33) | pub fn is_empty(&self) -> bool { function push (line 38) | pub fn push(&mut self, num: T) { function pop (line 46) | pub fn pop(&mut self) -> Option { function peek (line 56) | pub fn peek(&self) -> Option<&Rc>>> { function to_array (line 61) | pub fn to_array(&self) -> Vec { function main (line 76) | fn main() { FILE: ja/codes/rust/chapter_stack_and_queue/queue.rs function main (line 12) | pub fn main() { FILE: ja/codes/rust/chapter_stack_and_queue/stack.rs function main (line 10) | pub fn main() { FILE: ja/codes/rust/chapter_tree/array_binary_tree.rs type ArrayBinaryTree (line 10) | struct ArrayBinaryTree { method new (line 16) | fn new(arr: Vec>) -> Self { method size (line 21) | fn size(&self) -> i32 { method val (line 26) | fn val(&self, i: i32) -> Option { method left (line 36) | fn left(&self, i: i32) -> i32 { method right (line 41) | fn right(&self, i: i32) -> i32 { method parent (line 46) | fn parent(&self, i: i32) -> i32 { method level_order (line 51) | fn level_order(&self) -> Vec { method dfs (line 56) | fn dfs(&self, i: i32, order: &'static str, res: &mut Vec) { method pre_order (line 78) | fn pre_order(&self) -> Vec { method in_order (line 85) | fn in_order(&self) -> Vec { method post_order (line 92) | fn post_order(&self) -> Vec { function main (line 100) | fn main() { FILE: ja/codes/rust/chapter_tree/avl_tree.rs type OptionTreeNodeRc (line 13) | type OptionTreeNodeRc = Option>>; type AVLTree (line 16) | struct AVLTree { method new (line 22) | fn new() -> Self { method height (line 27) | fn height(node: OptionTreeNodeRc) -> i32 { method update_height (line 36) | fn update_height(node: OptionTreeNodeRc) { method balance_factor (line 46) | fn balance_factor(node: OptionTreeNodeRc) -> i32 { method right_rotate (line 58) | fn right_rotate(node: OptionTreeNodeRc) -> OptionTreeNodeRc { method left_rotate (line 77) | fn left_rotate(node: OptionTreeNodeRc) -> OptionTreeNodeRc { method rotate (line 96) | fn rotate(node: OptionTreeNodeRc) -> OptionTreeNodeRc { method insert (line 131) | fn insert(&mut self, val: i32) { method insert_helper (line 136) | fn insert_helper(node: OptionTreeNodeRc, val: i32) -> OptionTreeNodeRc { method remove (line 170) | fn remove(&self, val: i32) { method remove_helper (line 175) | fn remove_helper(node: OptionTreeNodeRc, val: i32) -> OptionTreeNodeRc { method search (line 225) | fn search(&self, val: i32) -> OptionTreeNodeRc { function main (line 250) | fn main() { FILE: ja/codes/rust/chapter_tree/binary_search_tree.rs type OptionTreeNodeRc (line 15) | type OptionTreeNodeRc = Option>>; type BinarySearchTree (line 18) | pub struct BinarySearchTree { method new (line 24) | pub fn new() -> Self { method get_root (line 30) | pub fn get_root(&self) -> OptionTreeNodeRc { method search (line 35) | pub fn search(&self, num: i32) -> OptionTreeNodeRc { method insert (line 54) | pub fn insert(&mut self, num: i32) { method remove (line 90) | pub fn remove(&mut self, num: i32) { function main (line 161) | fn main() { FILE: ja/codes/rust/chapter_tree/binary_tree.rs function main (line 10) | fn main() { FILE: ja/codes/rust/chapter_tree/binary_tree_bfs.rs function level_order (line 14) | fn level_order(root: &Rc>) -> Vec { function main (line 35) | fn main() { FILE: ja/codes/rust/chapter_tree/binary_tree_dfs.rs function pre_order (line 14) | fn pre_order(root: Option<&Rc>>) -> Vec { function in_order (line 32) | fn in_order(root: Option<&Rc>>) -> Vec { function post_order (line 50) | fn post_order(root: Option<&Rc>>) -> Vec { function main (line 69) | fn main() { FILE: ja/codes/rust/src/include/list_node.rs type ListNode (line 12) | pub struct ListNode { function new (line 18) | pub fn new(val: T) -> Rc>> { function arr_to_linked_list (line 23) | pub fn arr_to_linked_list(array: &[T]) -> Option>>> function linked_list_to_hashmap (line 40) | pub fn linked_list_to_hashmap( FILE: ja/codes/rust/src/include/print_util.rs type Trunk (line 15) | struct Trunk<'a, 'b> { function print_array (line 21) | pub fn print_array(nums: &[T]) { function print_hash_map (line 33) | pub fn print_hash_map(map: &HashMap(queue: &VecDeque) { function print_linked_list (line 49) | pub fn print_linked_list(head: &Rc>>) { function print_tree (line 57) | pub fn print_tree(root: &Rc>) { function _print_tree (line 62) | fn _print_tree(root: Option<&Rc>>, prev: Option<&Trunk... function show_trunks (line 89) | fn show_trunks(trunk: Option<&Trunk>) { function print_heap (line 97) | pub fn print_heap(heap: Vec) { FILE: ja/codes/rust/src/include/tree_node.rs type TreeNode (line 12) | pub struct TreeNode { method new (line 22) | pub fn new(val: i32) -> Rc> { function vec_to_tree_dfs (line 59) | fn vec_to_tree_dfs(arr: &[Option], i: usize) -> Option>) -> Option... function tree_to_vec_dfs (line 75) | fn tree_to_vec_dfs(root: Option<&Rc>>, i: usize, res: ... function tree_to_vec (line 88) | pub fn tree_to_vec(root: Option>>) -> Vec Self { function vals_to_vets (line 20) | pub fn vals_to_vets(vals: Vec) -> Vec { function vets_to_vals (line 25) | pub fn vets_to_vals(vets: Vec) -> Vec { FILE: ja/codes/typescript/chapter_array_and_linkedlist/array.ts function randomAccess (line 8) | function randomAccess(nums: number[]): number { function extend (line 19) | function extend(nums: number[], enlarge: number): number[] { function insert (line 31) | function insert(nums: number[], num: number, index: number): void { function remove (line 41) | function remove(nums: number[], index: number): void { function traverse (line 49) | function traverse(nums: number[]): void { function find (line 62) | function find(nums: number[], target: number): number { FILE: ja/codes/typescript/chapter_array_and_linkedlist/linked_list.ts function insert (line 11) | function insert(n0: ListNode, P: ListNode): void { function remove (line 18) | function remove(n0: ListNode): void { function access (line 29) | function access(head: ListNode | null, index: number): ListNode | null { function find (line 40) | function find(head: ListNode | null, target: number): number { FILE: ja/codes/typescript/chapter_array_and_linkedlist/my_list.ts class MyList (line 8) | class MyList { method constructor (line 15) | constructor() { method size (line 20) | public size(): number { method capacity (line 25) | public capacity(): number { method get (line 30) | public get(index: number): number { method set (line 37) | public set(index: number, num: number): void { method add (line 43) | public add(num: number): void { method insert (line 52) | public insert(index: number, num: number): void { method remove (line 68) | public remove(index: number): number { method extendCapacity (line 82) | public extendCapacity(): void { method toArray (line 92) | public toArray(): number[] { FILE: ja/codes/typescript/chapter_backtracking/n_queens.ts function backtrack (line 8) | function backtrack( function nQueens (line 42) | function nQueens(n: number): string[][][] { FILE: ja/codes/typescript/chapter_backtracking/permutations_i.ts function backtrack (line 8) | function backtrack( function permutationsI (line 36) | function permutationsI(nums: number[]): number[][] { FILE: ja/codes/typescript/chapter_backtracking/permutations_ii.ts function backtrack (line 8) | function backtrack( function permutationsII (line 38) | function permutationsII(nums: number[]): number[][] { FILE: ja/codes/typescript/chapter_backtracking/preorder_traversal_i_compact.ts function preOrder (line 12) | function preOrder(root: TreeNode | null, res: TreeNode[]): void { FILE: ja/codes/typescript/chapter_backtracking/preorder_traversal_ii_compact.ts function preOrder (line 12) | function preOrder( FILE: ja/codes/typescript/chapter_backtracking/preorder_traversal_iii_compact.ts function preOrder (line 12) | function preOrder( FILE: ja/codes/typescript/chapter_backtracking/preorder_traversal_iii_template.ts function isSolution (line 12) | function isSolution(state: TreeNode[]): boolean { function recordSolution (line 17) | function recordSolution(state: TreeNode[], res: TreeNode[][]): void { function isValid (line 22) | function isValid(state: TreeNode[], choice: TreeNode): boolean { function makeChoice (line 27) | function makeChoice(state: TreeNode[], choice: TreeNode): void { function undoChoice (line 32) | function undoChoice(state: TreeNode[]): void { function backtrack (line 37) | function backtrack( FILE: ja/codes/typescript/chapter_backtracking/subset_sum_i.ts function backtrack (line 8) | function backtrack( function subsetSumI (line 38) | function subsetSumI(nums: number[], target: number): number[][] { FILE: ja/codes/typescript/chapter_backtracking/subset_sum_i_naive.ts function backtrack (line 8) | function backtrack( function subsetSumINaive (line 36) | function subsetSumINaive(nums: number[], target: number): number[][] { FILE: ja/codes/typescript/chapter_backtracking/subset_sum_ii.ts function backtrack (line 8) | function backtrack( function subsetSumII (line 43) | function subsetSumII(nums: number[], target: number): number[][] { FILE: ja/codes/typescript/chapter_computational_complexity/iteration.ts function forLoop (line 8) | function forLoop(n: number): number { function whileLoop (line 18) | function whileLoop(n: number): number { function whileLoopII (line 30) | function whileLoopII(n: number): number { function nestedForLoop (line 44) | function nestedForLoop(n: number): string { FILE: ja/codes/typescript/chapter_computational_complexity/recursion.ts function recur (line 8) | function recur(n: number): number { function forLoopRecur (line 18) | function forLoopRecur(n: number): number { function tailRecur (line 37) | function tailRecur(n: number, res: number): number { function fib (line 45) | function fib(n: number): number { FILE: ja/codes/typescript/chapter_computational_complexity/space_complexity.ts function constFunc (line 12) | function constFunc(): number { function constant (line 18) | function constant(n: number): void { function linear (line 35) | function linear(n: number): void { function linearRecur (line 51) | function linearRecur(n: number): void { function quadratic (line 58) | function quadratic(n: number): void { function quadraticRecur (line 75) | function quadraticRecur(n: number): number { function buildTree (line 83) | function buildTree(n: number): TreeNode | null { FILE: ja/codes/typescript/chapter_computational_complexity/time_complexity.ts function constant (line 8) | function constant(n: number): number { function linear (line 16) | function linear(n: number): number { function arrayTraversal (line 23) | function arrayTraversal(nums: number[]): number { function quadratic (line 33) | function quadratic(n: number): number { function bubbleSort (line 45) | function bubbleSort(nums: number[]): number { function exponential (line 64) | function exponential(n: number): number { function expRecur (line 79) | function expRecur(n: number): number { function logarithmic (line 85) | function logarithmic(n: number): number { function logRecur (line 95) | function logRecur(n: number): number { function linearLogRecur (line 101) | function linearLogRecur(n: number): number { function factorialRecur (line 111) | function factorialRecur(n: number): number { FILE: ja/codes/typescript/chapter_computational_complexity/worst_best_time_complexity.ts function randomNumbers (line 8) | function randomNumbers(n: number): number[] { function findOne (line 25) | function findOne(nums: number[]): number { FILE: ja/codes/typescript/chapter_divide_and_conquer/binary_search_recur.ts function dfs (line 8) | function dfs(nums: number[], target: number, i: number, j: number): numb... function binarySearch (line 28) | function binarySearch(nums: number[], target: number): number { FILE: ja/codes/typescript/chapter_divide_and_conquer/build_tree.ts function dfs (line 11) | function dfs( function buildTree (line 33) | function buildTree(preorder: number[], inorder: number[]): TreeNode | nu... FILE: ja/codes/typescript/chapter_divide_and_conquer/hanota.ts function move (line 8) | function move(src: number[], tar: number[]): void { function dfs (line 16) | function dfs(i: number, src: number[], buf: number[], tar: number[]): vo... function solveHanota (line 31) | function solveHanota(A: number[], B: number[], C: number[]): void { FILE: ja/codes/typescript/chapter_dynamic_programming/climbing_stairs_backtrack.ts function backtrack (line 8) | function backtrack( function climbingStairsBacktrack (line 27) | function climbingStairsBacktrack(n: number): number { FILE: ja/codes/typescript/chapter_dynamic_programming/climbing_stairs_constraint_dp.ts function climbingStairsConstraintDP (line 8) | function climbingStairsConstraintDP(n: number): number { FILE: ja/codes/typescript/chapter_dynamic_programming/climbing_stairs_dfs.ts function dfs (line 8) | function dfs(i: number): number { function climbingStairsDFS (line 17) | function climbingStairsDFS(n: number): number { FILE: ja/codes/typescript/chapter_dynamic_programming/climbing_stairs_dfs_mem.ts function dfs (line 8) | function dfs(i: number, mem: number[]): number { function climbingStairsDFSMem (line 21) | function climbingStairsDFSMem(n: number): number { FILE: ja/codes/typescript/chapter_dynamic_programming/climbing_stairs_dp.ts function climbingStairsDP (line 8) | function climbingStairsDP(n: number): number { function climbingStairsDPComp (line 23) | function climbingStairsDPComp(n: number): number { FILE: ja/codes/typescript/chapter_dynamic_programming/coin_change.ts function coinChangeDP (line 8) | function coinChangeDP(coins: Array, amt: number): number { function coinChangeDPComp (line 35) | function coinChangeDPComp(coins: Array, amt: number): number { FILE: ja/codes/typescript/chapter_dynamic_programming/coin_change_ii.ts function coinChangeIIDP (line 8) | function coinChangeIIDP(coins: Array, amt: number): number { function coinChangeIIDPComp (line 34) | function coinChangeIIDPComp(coins: Array, amt: number): number { FILE: ja/codes/typescript/chapter_dynamic_programming/edit_distance.ts function editDistanceDFS (line 8) | function editDistanceDFS(s: string, t: string, i: number, j: number): nu... function editDistanceDFSMem (line 31) | function editDistanceDFSMem( function editDistanceDP (line 64) | function editDistanceDP(s: string, t: string): number { function editDistanceDPComp (line 94) | function editDistanceDPComp(s: string, t: string): number { FILE: ja/codes/typescript/chapter_dynamic_programming/knapsack.ts function knapsackDFS (line 8) | function knapsackDFS( function knapsackDFSMem (line 30) | function knapsackDFSMem( function knapsackDP (line 59) | function knapsackDP( function knapsackDPComp (line 88) | function knapsackDPComp( FILE: ja/codes/typescript/chapter_dynamic_programming/min_cost_climbing_stairs_dp.ts function minCostClimbingStairsDP (line 8) | function minCostClimbingStairsDP(cost: Array): number { function minCostClimbingStairsDPComp (line 26) | function minCostClimbingStairsDPComp(cost: Array): number { FILE: ja/codes/typescript/chapter_dynamic_programming/min_path_sum.ts function minPathSumDFS (line 8) | function minPathSumDFS( function minPathSumDFSMem (line 29) | function minPathSumDFSMem( function minPathSumDP (line 56) | function minPathSumDP(grid: Array>): number { function minPathSumDPComp (line 82) | function minPathSumDPComp(grid: Array>): number { FILE: ja/codes/typescript/chapter_dynamic_programming/unbounded_knapsack.ts function unboundedKnapsackDP (line 8) | function unboundedKnapsackDP( function unboundedKnapsackDPComp (line 37) | function unboundedKnapsackDPComp( FILE: ja/codes/typescript/chapter_graph/graph_adjacency_list.ts class GraphAdjList (line 10) | class GraphAdjList { method constructor (line 15) | constructor(edges: Vertex[][]) { method size (line 26) | size(): number { method addEdge (line 31) | addEdge(vet1: Vertex, vet2: Vertex): void { method removeEdge (line 45) | removeEdge(vet1: Vertex, vet2: Vertex): void { method addVertex (line 60) | addVertex(vet: Vertex): void { method removeVertex (line 67) | removeVertex(vet: Vertex): void { method print (line 83) | print(): void { FILE: ja/codes/typescript/chapter_graph/graph_adjacency_matrix.ts class GraphAdjMat (line 8) | class GraphAdjMat { method constructor (line 13) | constructor(vertices: number[], edges: number[][]) { method size (line 28) | size(): number { method addVertex (line 33) | addVertex(val: number): void { method removeVertex (line 50) | removeVertex(index: number): void { method addEdge (line 67) | addEdge(i: number, j: number): void { method removeEdge (line 79) | removeEdge(i: number, j: number): void { method print (line 89) | print(): void { FILE: ja/codes/typescript/chapter_graph/graph_bfs.ts function graphBFS (line 12) | function graphBFS(graph: GraphAdjList, startVet: Vertex): Vertex[] { FILE: ja/codes/typescript/chapter_graph/graph_dfs.ts function dfs (line 11) | function dfs( function graphDFS (line 31) | function graphDFS(graph: GraphAdjList, startVet: Vertex): Vertex[] { FILE: ja/codes/typescript/chapter_greedy/coin_change_greedy.ts function coinChangeGreedy (line 8) | function coinChangeGreedy(coins: number[], amt: number): number { FILE: ja/codes/typescript/chapter_greedy/fractional_knapsack.ts class Item (line 8) | class Item { method constructor (line 12) | constructor(w: number, v: number) { function fractionalKnapsack (line 19) | function fractionalKnapsack(wgt: number[], val: number[], cap: number): ... FILE: ja/codes/typescript/chapter_greedy/max_capacity.ts function maxCapacity (line 8) | function maxCapacity(ht: number[]): number { FILE: ja/codes/typescript/chapter_greedy/max_product_cutting.ts function maxProductCutting (line 8) | function maxProductCutting(n: number): number { FILE: ja/codes/typescript/chapter_hashing/array_hash_map.ts class Pair (line 8) | class Pair { method constructor (line 12) | constructor(key: number, val: string) { class ArrayHashMap (line 19) | class ArrayHashMap { method constructor (line 22) | constructor() { method hashFunc (line 28) | private hashFunc(key: number): number { method get (line 33) | public get(key: number): string | null { method set (line 41) | public set(key: number, val: string) { method delete (line 47) | public delete(key: number) { method entries (line 54) | public entries(): (Pair | null)[] { method keys (line 65) | public keys(): (number | undefined)[] { method values (line 76) | public values(): (string | undefined)[] { method print (line 87) | public print() { FILE: ja/codes/typescript/chapter_hashing/hash_map_chaining.ts class Pair (line 8) | class Pair { method constructor (line 11) | constructor(key: number, val: string) { class HashMapChaining (line 18) | class HashMapChaining { method constructor (line 26) | constructor() { method #hashFunc (line 35) | #hashFunc(key: number): number { method #loadFactor (line 40) | #loadFactor(): number { method get (line 45) | get(key: number): string | null { method put (line 59) | put(key: number, val: string): void { method remove (line 80) | remove(key: number): void { method #extend (line 94) | #extend(): void { method print (line 110) | print(): void { FILE: ja/codes/typescript/chapter_hashing/hash_map_open_addressing.ts class Pair (line 8) | class Pair { method constructor (line 12) | constructor(key: number, val: string) { class HashMapOpenAddressing (line 19) | class HashMapOpenAddressing { method constructor (line 28) | constructor() { method hashFunc (line 38) | private hashFunc(key: number): number { method loadFactor (line 43) | private loadFactor(): number { method findBucket (line 48) | private findBucket(key: number): number { method get (line 78) | get(key: number): string | null { method put (line 93) | put(key: number, val: string): void { method remove (line 114) | remove(key: number): void { method extend (line 128) | private extend(): void { method print (line 144) | print(): void { FILE: ja/codes/typescript/chapter_hashing/simple_hash.ts function addHash (line 8) | function addHash(key: string): number { function mulHash (line 18) | function mulHash(key: string): number { function xorHash (line 28) | function xorHash(key: string): number { function rotHash (line 38) | function rotHash(key: string): number { FILE: ja/codes/typescript/chapter_heap/my_heap.ts class MaxHeap (line 10) | class MaxHeap { method constructor (line 13) | constructor(nums?: number[]) { method left (line 23) | private left(i: number): number { method right (line 28) | private right(i: number): number { method parent (line 33) | private parent(i: number): number { method swap (line 38) | private swap(i: number, j: number): void { method size (line 45) | public size(): number { method isEmpty (line 50) | public isEmpty(): boolean { method peek (line 55) | public peek(): number { method push (line 60) | public push(val: number): void { method siftUp (line 68) | private siftUp(i: number): void { method pop (line 82) | public pop(): number { method siftDown (line 96) | private siftDown(i: number): void { method print (line 114) | public print(): void { method getMaxHeap (line 119) | public getMaxHeap(): number[] { FILE: ja/codes/typescript/chapter_heap/top_k.ts function pushMinHeap (line 10) | function pushMinHeap(maxHeap: MaxHeap, val: number): void { function popMinHeap (line 16) | function popMinHeap(maxHeap: MaxHeap): number { function peekMinHeap (line 22) | function peekMinHeap(maxHeap: MaxHeap): number { function getMinHeap (line 28) | function getMinHeap(maxHeap: MaxHeap): number[] { function topKHeap (line 34) | function topKHeap(nums: number[], k: number): number[] { FILE: ja/codes/typescript/chapter_searching/binary_search.ts function binarySearch (line 8) | function binarySearch(nums: number[], target: number): number { function binarySearchLCRO (line 31) | function binarySearchLCRO(nums: number[], target: number): number { FILE: ja/codes/typescript/chapter_searching/binary_search_edge.ts function binarySearchLeftEdge (line 9) | function binarySearchLeftEdge(nums: Array, target: number): numb... function binarySearchRightEdge (line 21) | function binarySearchRightEdge(nums: Array, target: number): num... FILE: ja/codes/typescript/chapter_searching/binary_search_insertion.ts function binarySearchInsertionSimple (line 8) | function binarySearchInsertionSimple( function binarySearchInsertion (line 29) | function binarySearchInsertion(nums: Array, target: number): num... FILE: ja/codes/typescript/chapter_searching/hashing_search.ts function hashingSearchArray (line 10) | function hashingSearchArray(map: Map, target: number): n... function hashingSearchLinkedList (line 17) | function hashingSearchLinkedList( FILE: ja/codes/typescript/chapter_searching/linear_search.ts function linearSearchArray (line 10) | function linearSearchArray(nums: number[], target: number): number { function linearSearchLinkedList (line 23) | function linearSearchLinkedList( FILE: ja/codes/typescript/chapter_searching/two_sum.ts function twoSumBruteForce (line 8) | function twoSumBruteForce(nums: number[], target: number): number[] { function twoSumHashTable (line 22) | function twoSumHashTable(nums: number[], target: number): number[] { FILE: ja/codes/typescript/chapter_sorting/bubble_sort.ts function bubbleSort (line 8) | function bubbleSort(nums: number[]): void { function bubbleSortWithFlag (line 24) | function bubbleSortWithFlag(nums: number[]): void { FILE: ja/codes/typescript/chapter_sorting/bucket_sort.ts function bucketSort (line 8) | function bucketSort(nums: number[]): void { FILE: ja/codes/typescript/chapter_sorting/counting_sort.ts function countingSortNaive (line 9) | function countingSortNaive(nums: number[]): void { function countingSort (line 29) | function countingSort(nums: number[]): void { FILE: ja/codes/typescript/chapter_sorting/heap_sort.ts function siftDown (line 8) | function siftDown(nums: number[], n: number, i: number): void { function heapSort (line 32) | function heapSort(nums: number[]): void { FILE: ja/codes/typescript/chapter_sorting/insertion_sort.ts function insertionSort (line 8) | function insertionSort(nums: number[]): void { FILE: ja/codes/typescript/chapter_sorting/merge_sort.ts function merge (line 8) | function merge(nums: number[], left: number, mid: number, right: number)... function mergeSort (line 38) | function mergeSort(nums: number[], left: number, right: number): void { FILE: ja/codes/typescript/chapter_sorting/quick_sort.ts class QuickSort (line 8) | class QuickSort { method swap (line 10) | swap(nums: number[], i: number, j: number): void { method partition (line 17) | partition(nums: number[], left: number, right: number): number { method quickSort (line 36) | quickSort(nums: number[], left: number, right: number): void { class QuickSortMedian (line 50) | class QuickSortMedian { method swap (line 52) | swap(nums: number[], i: number, j: number): void { method medianThree (line 59) | medianThree( method partition (line 76) | partition(nums: number[], left: number, right: number): number { method quickSort (line 103) | quickSort(nums: number[], left: number, right: number): void { class QuickSortTailCall (line 117) | class QuickSortTailCall { method swap (line 119) | swap(nums: number[], i: number, j: number): void { method partition (line 126) | partition(nums: number[], left: number, right: number): number { method quickSort (line 144) | quickSort(nums: number[], left: number, right: number): void { FILE: ja/codes/typescript/chapter_sorting/radix_sort.ts function digit (line 8) | function digit(num: number, exp: number): number { function countingSortDigit (line 14) | function countingSortDigit(nums: number[], exp: number): void { function radixSort (line 42) | function radixSort(nums: number[]): void { FILE: ja/codes/typescript/chapter_sorting/selection_sort.ts function selectionSort (line 8) | function selectionSort(nums: number[]): void { FILE: ja/codes/typescript/chapter_stack_and_queue/array_deque.ts class ArrayDeque (line 8) | class ArrayDeque { method constructor (line 14) | constructor(capacity: number) { method capacity (line 21) | capacity(): number { method size (line 26) | size(): number { method isEmpty (line 31) | isEmpty(): boolean { method index (line 36) | index(i: number): number { method pushFirst (line 44) | pushFirst(num: number): void { method pushLast (line 58) | pushLast(num: number): void { method popFirst (line 71) | popFirst(): number { method popLast (line 80) | popLast(): number { method peekFirst (line 87) | peekFirst(): number { method peekLast (line 93) | peekLast(): number { method toArray (line 101) | toArray(): number[] { FILE: ja/codes/typescript/chapter_stack_and_queue/array_queue.ts class ArrayQueue (line 8) | class ArrayQueue { method constructor (line 13) | constructor(capacity: number) { method capacity (line 19) | get capacity(): number { method size (line 24) | get size(): number { method isEmpty (line 29) | isEmpty(): boolean { method push (line 34) | push(num: number): void { method pop (line 48) | pop(): number { method peek (line 57) | peek(): number { method toArray (line 63) | toArray(): number[] { FILE: ja/codes/typescript/chapter_stack_and_queue/array_stack.ts class ArrayStack (line 8) | class ArrayStack { method constructor (line 10) | constructor() { method size (line 15) | get size(): number { method isEmpty (line 20) | isEmpty(): boolean { method push (line 25) | push(num: number): void { method pop (line 30) | pop(): number | undefined { method top (line 36) | top(): number | undefined { method toArray (line 42) | toArray() { FILE: ja/codes/typescript/chapter_stack_and_queue/linkedlist_deque.ts class ListNode (line 8) | class ListNode { method constructor (line 13) | constructor(val: number) { class LinkedListDeque (line 21) | class LinkedListDeque { method constructor (line 26) | constructor() { method pushLast (line 33) | pushLast(val: number): void { method pushFirst (line 49) | pushFirst(val: number): void { method popLast (line 65) | popLast(): number { method popFirst (line 82) | popFirst(): number { method peekLast (line 99) | peekLast(): number { method peekFirst (line 104) | peekFirst(): number { method size (line 109) | size(): number { method isEmpty (line 114) | isEmpty(): boolean { method print (line 119) | print(): void { FILE: ja/codes/typescript/chapter_stack_and_queue/linkedlist_queue.ts class LinkedListQueue (line 10) | class LinkedListQueue { method constructor (line 15) | constructor() { method size (line 21) | get size(): number { method isEmpty (line 26) | isEmpty(): boolean { method push (line 31) | push(num: number): void { method pop (line 47) | pop(): number { method peek (line 57) | peek(): number { method toArray (line 63) | toArray(): number[] { FILE: ja/codes/typescript/chapter_stack_and_queue/linkedlist_stack.ts class LinkedListStack (line 10) | class LinkedListStack { method constructor (line 14) | constructor() { method size (line 19) | get size(): number { method isEmpty (line 24) | isEmpty(): boolean { method push (line 29) | push(num: number): void { method pop (line 37) | pop(): number { method peek (line 46) | peek(): number { method toArray (line 52) | toArray(): number[] { FILE: ja/codes/typescript/chapter_tree/array_binary_tree.ts type Order (line 10) | type Order = 'pre' | 'in' | 'post'; class ArrayBinaryTree (line 13) | class ArrayBinaryTree { method constructor (line 17) | constructor(arr: (number | null)[]) { method size (line 22) | size(): number { method val (line 27) | val(i: number): number | null { method left (line 34) | left(i: number): number { method right (line 39) | right(i: number): number { method parent (line 44) | parent(i: number): number { method levelOrder (line 49) | levelOrder(): number[] { method #dfs (line 59) | #dfs(i: number, order: Order, res: (number | null)[]): void { method preOrder (line 73) | preOrder(): (number | null)[] { method inOrder (line 80) | inOrder(): (number | null)[] { method postOrder (line 87) | postOrder(): (number | null)[] { FILE: ja/codes/typescript/chapter_tree/avl_tree.ts class AVLTree (line 11) | class AVLTree { method constructor (line 14) | constructor() { method height (line 19) | height(node: TreeNode): number { method updateHeight (line 25) | private updateHeight(node: TreeNode): void { method balanceFactor (line 32) | balanceFactor(node: TreeNode): number { method rightRotate (line 40) | private rightRotate(node: TreeNode): TreeNode { method leftRotate (line 54) | private leftRotate(node: TreeNode): TreeNode { method rotate (line 68) | private rotate(node: TreeNode): TreeNode { method insert (line 98) | insert(val: number): void { method insertHelper (line 103) | private insertHelper(node: TreeNode, val: number): TreeNode { method remove (line 121) | remove(val: number): void { method removeHelper (line 126) | private removeHelper(node: TreeNode, val: number): TreeNode { method search (line 161) | search(val: number): TreeNode { function testInsert (line 181) | function testInsert(tree: AVLTree, val: number): void { function testRemove (line 187) | function testRemove(tree: AVLTree, val: number): void { FILE: ja/codes/typescript/chapter_tree/binary_search_tree.ts class BinarySearchTree (line 11) | class BinarySearchTree { method constructor (line 15) | constructor() { method getRoot (line 21) | getRoot(): TreeNode | null { method search (line 26) | search(num: number): TreeNode | null { method insert (line 42) | insert(num: number): void { method remove (line 67) | remove(num: number): void { FILE: ja/codes/typescript/chapter_tree/binary_tree_bfs.ts function levelOrder (line 12) | function levelOrder(root: TreeNode | null): number[] { FILE: ja/codes/typescript/chapter_tree/binary_tree_dfs.ts function preOrder (line 15) | function preOrder(root: TreeNode | null): void { function inOrder (line 26) | function inOrder(root: TreeNode | null): void { function postOrder (line 37) | function postOrder(root: TreeNode | null): void { FILE: ja/codes/typescript/modules/ListNode.ts class ListNode (line 8) | class ListNode { method constructor (line 11) | constructor(val?: number, next?: ListNode | null) { function arrToLinkedList (line 18) | function arrToLinkedList(arr: number[]): ListNode | null { FILE: ja/codes/typescript/modules/PrintUtil.ts function printLinkedList (line 11) | function printLinkedList(head: ListNode | null): void { class Trunk (line 20) | class Trunk { method constructor (line 24) | constructor(prev: Trunk | null, str: string) { function printTree (line 35) | function printTree(root: TreeNode | null) { function printTreeHelper (line 40) | function printTreeHelper( function showTrunks (line 75) | function showTrunks(p: Trunk | null) { function printHeap (line 85) | function printHeap(arr: number[]): void { FILE: ja/codes/typescript/modules/TreeNode.ts class TreeNode (line 8) | class TreeNode { method constructor (line 13) | constructor( function arrToTree (line 27) | function arrToTree(arr: (number | null)[], i: number = 0): TreeNode | nu... FILE: ja/codes/typescript/modules/Vertex.ts class Vertex (line 8) | class Vertex { method constructor (line 10) | constructor(val: number) { method valsToVets (line 15) | public static valsToVets(vals: number[]): Vertex[] { method vetsToVals (line 24) | public static vetsToVals(vets: Vertex[]): number[] { FILE: overrides/javascripts/starfield.js function visibilityHandler (line 63) | function visibilityHandler() { function getOriginY (line 69) | function getOriginY(origin, container) { function getOriginX (line 75) | function getOriginX(origin, container) { function setup (line 85) | function setup(userConfig = {}) { function windowResized (line 141) | function windowResized(container, origin) { function createRandomStar (line 153) | function createRandomStar() { class Star (line 163) | class Star { method constructor (line 164) | constructor(x, y) { method reset (line 182) | reset() { method update (line 195) | update(acc, deltaTime) { method draw (line 207) | draw() { method isActive (line 231) | isActive() { method updateAngle (line 235) | updateAngle() { function draw (line 240) | function draw(timestamp) { function onScreen (line 291) | function onScreen(x, y) { function random (line 295) | function random(min, max) { function rgbToHsl (line 300) | function rgbToHsl(r, g, b) { function hslToRgb (line 333) | function hslToRgb(h, s, l) { function parseRGBA (line 359) | function parseRGBA(color) { function map (line 372) | function map(value, start1, stop1, start2, stop2) { function setAccelerate (line 380) | function setAccelerate(state) { function setOriginX (line 388) | function setOriginX(x) { function setOriginY (line 399) | function setOriginY(y) { function setOrigin (line 411) | function setOrigin(x, y) { function resize (line 424) | function resize(newWidth, newHeight) { function cleanup (line 439) | function cleanup() { FILE: ru/codes/c/chapter_array_and_linkedlist/array.c function randomAccess (line 10) | int randomAccess(int *nums, int size) { function insert (line 35) | void insert(int *nums, int size, int num, int index) { function removeItem (line 46) | void removeItem(int *nums, int size, int index) { function traverse (line 54) | void traverse(int *nums, int size) { function find (line 63) | int find(int *nums, int size, int target) { function main (line 72) | int main() { FILE: ru/codes/c/chapter_array_and_linkedlist/linked_list.c function insert (line 10) | void insert(ListNode *n0, ListNode *P) { function removeItem (line 18) | void removeItem(ListNode *n0) { function ListNode (line 30) | ListNode *access(ListNode *head, int index) { function find (line 40) | int find(ListNode *head, int target) { function main (line 52) | int main() { FILE: ru/codes/c/chapter_array_and_linkedlist/my_list.c type MyList (line 10) | typedef struct { function MyList (line 20) | MyList *newMyList() { function delMyList (line 30) | void delMyList(MyList *nums) { function size (line 36) | int size(MyList *nums) { function capacity (line 41) | int capacity(MyList *nums) { function get (line 46) | int get(MyList *nums, int index) { function set (line 52) | void set(MyList *nums, int index, int num) { function add (line 58) | void add(MyList *nums, int num) { function insert (line 67) | void insert(MyList *nums, int index, int num) { function removeItem (line 82) | int removeItem(MyList *nums, int index) { function extendCapacity (line 93) | void extendCapacity(MyList *nums) { function main (line 117) | int main() { FILE: ru/codes/c/chapter_backtracking/n_queens.c function backtrack (line 12) | void backtrack(int row, int n, char state[MAX_SIZE][MAX_SIZE], char ***r... function main (line 64) | int main() { FILE: ru/codes/c/chapter_backtracking/permutations_i.c function backtrack (line 13) | void backtrack(int *state, int stateSize, int *choices, int choicesSize,... function main (line 58) | int main() { FILE: ru/codes/c/chapter_backtracking/permutations_ii.c function backtrack (line 13) | void backtrack(int *state, int stateSize, int *choices, int choicesSize,... function main (line 60) | int main() { FILE: ru/codes/c/chapter_backtracking/preorder_traversal_i_compact.c function preOrder (line 16) | void preOrder(TreeNode *root) { function main (line 29) | int main() { FILE: ru/codes/c/chapter_backtracking/preorder_traversal_ii_compact.c function preOrder (line 18) | void preOrder(TreeNode *root) { function main (line 38) | int main() { FILE: ru/codes/c/chapter_backtracking/preorder_traversal_iii_compact.c function preOrder (line 18) | void preOrder(TreeNode *root) { function main (line 39) | int main() { FILE: ru/codes/c/chapter_backtracking/preorder_traversal_iii_template.c function isSolution (line 18) | bool isSolution(void) { function recordSolution (line 23) | void recordSolution(void) { function isValid (line 31) | bool isValid(TreeNode *choice) { function makeChoice (line 36) | void makeChoice(TreeNode *choice) { function undoChoice (line 41) | void undoChoice(void) { function backtrack (line 46) | void backtrack(TreeNode *choices[2]) { function main (line 69) | int main() { FILE: ru/codes/c/chapter_backtracking/subset_sum_i.c function backtrack (line 22) | void backtrack(int target, int *choices, int choicesSize, int start) { function cmp (line 50) | int cmp(const void *a, const void *b) { function subsetSumI (line 55) | void subsetSumI(int *nums, int numsSize, int target) { function main (line 62) | int main() { FILE: ru/codes/c/chapter_backtracking/subset_sum_i_naive.c function backtrack (line 22) | void backtrack(int target, int total, int *choices, int choicesSize) { function subsetSumINaive (line 47) | void subsetSumINaive(int *nums, int numsSize, int target) { function main (line 53) | int main() { FILE: ru/codes/c/chapter_backtracking/subset_sum_ii.c function backtrack (line 22) | void backtrack(int target, int *choices, int choicesSize, int start) { function cmp (line 54) | int cmp(const void *a, const void *b) { function subsetSumII (line 59) | void subsetSumII(int *nums, int numsSize, int target) { function main (line 67) | int main() { FILE: ru/codes/c/chapter_computational_complexity/iteration.c function forLoop (line 10) | int forLoop(int n) { function whileLoop (line 20) | int whileLoop(int n) { function whileLoopII (line 32) | int whileLoopII(int n) { function main (line 63) | int main() { FILE: ru/codes/c/chapter_computational_complexity/recursion.c function recur (line 10) | int recur(int n) { function forLoopRecur (line 21) | int forLoopRecur(int n) { function tailRecur (line 40) | int tailRecur(int n, int res) { function fib (line 49) | int fib(int n) { function main (line 60) | int main() { FILE: ru/codes/c/chapter_computational_complexity/space_complexity.c function func (line 10) | int func() { function constant (line 16) | void constant(int n) { type HashTable (line 34) | typedef struct { function linear (line 41) | void linear(int n) { function linearRecur (line 75) | void linearRecur(int n) { function quadratic (line 83) | void quadratic(int n) { function quadraticRecur (line 102) | int quadraticRecur(int n) { function TreeNode (line 113) | TreeNode *buildTree(int n) { function main (line 123) | int main() { FILE: ru/codes/c/chapter_computational_complexity/time_complexity.c function constant (line 10) | int constant(int n) { function linear (line 21) | int linear(int n) { function arrayTraversal (line 30) | int arrayTraversal(int *nums, int n) { function quadratic (line 40) | int quadratic(int n) { function bubbleSort (line 52) | int bubbleSort(int *nums, int n) { function exponential (line 71) | int exponential(int n) { function expRecur (line 86) | int expRecur(int n) { function logarithmic (line 93) | int logarithmic(int n) { function logRecur (line 103) | int logRecur(int n) { function linearLogRecur (line 110) | int linearLogRecur(int n) { function factorialRecur (line 121) | int factorialRecur(int n) { function main (line 132) | int main(int argc, char *argv[]) { FILE: ru/codes/c/chapter_computational_complexity/worst_best_time_complexity.c function findOne (line 28) | int findOne(int *nums, int n) { function main (line 39) | int main(int argc, char *argv[]) { FILE: ru/codes/c/chapter_divide_and_conquer/binary_search_recur.c function dfs (line 10) | int dfs(int nums[], int target, int i, int j) { function binarySearch (line 30) | int binarySearch(int nums[], int target, int numsSize) { function main (line 37) | int main() { FILE: ru/codes/c/chapter_divide_and_conquer/build_tree.c function TreeNode (line 13) | TreeNode *dfs(int *preorder, int *inorderMap, int i, int l, int r, int s... function TreeNode (line 33) | TreeNode *buildTree(int *preorder, int preorderSize, int *inorder, int i... function main (line 45) | int main() { FILE: ru/codes/c/chapter_divide_and_conquer/hanota.c function move (line 13) | void move(int *src, int *srcSize, int *tar, int *tarSize) { function dfs (line 24) | void dfs(int i, int *src, int *srcSize, int *buf, int *bufSize, int *tar... function solveHanota (line 39) | void solveHanota(int *A, int *ASize, int *B, int *BSize, int *C, int *CS... function main (line 45) | int main() { FILE: ru/codes/c/chapter_dynamic_programming/climbing_stairs_backtrack.c function backtrack (line 10) | void backtrack(int *choices, int state, int n, int *res, int len) { function climbingStairsBacktrack (line 27) | int climbingStairsBacktrack(int n) { function main (line 40) | int main() { FILE: ru/codes/c/chapter_dynamic_programming/climbing_stairs_constraint_dp.c function climbingStairsConstraintDP (line 10) | int climbingStairsConstraintDP(int n) { function main (line 39) | int main() { FILE: ru/codes/c/chapter_dynamic_programming/climbing_stairs_dfs.c function dfs (line 10) | int dfs(int i) { function climbingStairsDFS (line 20) | int climbingStairsDFS(int n) { function main (line 25) | int main() { FILE: ru/codes/c/chapter_dynamic_programming/climbing_stairs_dfs_mem.c function dfs (line 10) | int dfs(int i, int *mem) { function climbingStairsDFSMem (line 25) | int climbingStairsDFSMem(int n) { function main (line 37) | int main() { FILE: ru/codes/c/chapter_dynamic_programming/climbing_stairs_dp.c function climbingStairsDP (line 10) | int climbingStairsDP(int n) { function climbingStairsDPComp (line 28) | int climbingStairsDPComp(int n) { function main (line 41) | int main() { FILE: ru/codes/c/chapter_dynamic_programming/coin_change.c function myMin (line 10) | int myMin(int a, int b) { function coinChangeDP (line 15) | int coinChangeDP(int coins[], int amt, int coinsSize) { function coinChangeDPComp (line 49) | int coinChangeDPComp(int coins[], int amt, int coinsSize) { function main (line 78) | int main() { FILE: ru/codes/c/chapter_dynamic_programming/coin_change_ii.c function coinChangeIIDP (line 10) | int coinChangeIIDP(int coins[], int amt, int coinsSize) { function coinChangeIIDPComp (line 43) | int coinChangeIIDPComp(int coins[], int amt, int coinsSize) { function main (line 67) | int main() { FILE: ru/codes/c/chapter_dynamic_programming/edit_distance.c function myMin (line 10) | int myMin(int a, int b) { function editDistanceDFS (line 15) | int editDistanceDFS(char *s, char *t, int i, int j) { function editDistanceDFSMem (line 37) | int editDistanceDFSMem(char *s, char *t, int memCols, int **mem, int i, ... function editDistanceDP (line 63) | int editDistanceDP(char *s, char *t, int n, int m) { function editDistanceDPComp (line 96) | int editDistanceDPComp(char *s, char *t, int n, int m) { function main (line 127) | int main() { FILE: ru/codes/c/chapter_dynamic_programming/knapsack.c function myMax (line 10) | int myMax(int a, int b) { function knapsackDFS (line 15) | int knapsackDFS(int wgt[], int val[], int i, int c) { function knapsackDFSMem (line 32) | int knapsackDFSMem(int wgt[], int val[], int memCols, int **mem, int i, ... function knapsackDP (line 54) | int knapsackDP(int wgt[], int val[], int cap, int wgtSize) { function knapsackDPComp (line 82) | int knapsackDPComp(int wgt[], int val[], int cap, int wgtSize) { function main (line 103) | int main() { FILE: ru/codes/c/chapter_dynamic_programming/min_cost_climbing_stairs_dp.c function myMin (line 10) | int myMin(int a, int b) { function minCostClimbingStairsDP (line 15) | int minCostClimbingStairsDP(int cost[], int costSize) { function minCostClimbingStairsDPComp (line 35) | int minCostClimbingStairsDPComp(int cost[], int costSize) { function main (line 49) | int main() { FILE: ru/codes/c/chapter_dynamic_programming/min_path_sum.c function myMin (line 13) | int myMin(int a, int b) { function minPathSumDFS (line 18) | int minPathSumDFS(int grid[MAX_SIZE][MAX_SIZE], int i, int j) { function minPathSumDFSMem (line 35) | int minPathSumDFSMem(int grid[MAX_SIZE][MAX_SIZE], int mem[MAX_SIZE][MAX... function minPathSumDP (line 57) | int minPathSumDP(int grid[MAX_SIZE][MAX_SIZE], int n, int m) { function minPathSumDPComp (line 87) | int minPathSumDPComp(int grid[MAX_SIZE][MAX_SIZE], int n, int m) { function main (line 111) | int main() { FILE: ru/codes/c/chapter_dynamic_programming/unbounded_knapsack.c function myMax (line 10) | int myMax(int a, int b) { function unboundedKnapsackDP (line 15) | int unboundedKnapsackDP(int wgt[], int val[], int cap, int wgtSize) { function unboundedKnapsackDPComp (line 43) | int unboundedKnapsackDPComp(int wgt[], int val[], int cap, int wgtSize) { function main (line 66) | int main() { FILE: ru/codes/c/chapter_graph/graph_adjacency_list.c type AdjListNode (line 13) | typedef struct AdjListNode { type GraphAdjList (line 19) | typedef struct { function GraphAdjList (line 25) | GraphAdjList *newGraphAdjList() { function delGraphAdjList (line 38) | void delGraphAdjList(GraphAdjList *graph) { function AdjListNode (line 55) | AdjListNode *findNode(GraphAdjList *graph, Vertex *vet) { function addEdgeHelper (line 65) | void addEdgeHelper(AdjListNode *head, Vertex *vet) { function addEdge (line 74) | void addEdge(GraphAdjList *graph, Vertex *vet1, Vertex *vet2) { function removeEdgeHelper (line 84) | void removeEdgeHelper(AdjListNode *head, Vertex *vet) { function removeEdge (line 101) | void removeEdge(GraphAdjList *graph, Vertex *vet1, Vertex *vet2) { function addVertex (line 111) | void addVertex(GraphAdjList *graph, Vertex *vet) { function removeVertex (line 121) | void removeVertex(GraphAdjList *graph, Vertex *vet) { function printGraph (line 159) | void printGraph(const GraphAdjList *graph) { FILE: ru/codes/c/chapter_graph/graph_adjacency_list_test.c function main (line 10) | int main() { FILE: ru/codes/c/chapter_graph/graph_adjacency_matrix.c type GraphAdjMat (line 13) | typedef struct { function GraphAdjMat (line 20) | GraphAdjMat *newGraphAdjMat() { function delGraphAdjMat (line 32) | void delGraphAdjMat(GraphAdjMat *graph) { function addVertex (line 37) | void addVertex(GraphAdjMat *graph, int val) { function removeVertex (line 52) | void removeVertex(GraphAdjMat *graph, int index) { function addEdge (line 78) | void addEdge(GraphAdjMat *graph, int i, int j) { function removeEdge (line 89) | void removeEdge(GraphAdjMat *graph, int i, int j) { function printGraphAdjMat (line 99) | void printGraphAdjMat(GraphAdjMat *graph) { function main (line 109) | int main() { FILE: ru/codes/c/chapter_graph/graph_bfs.c type Queue (line 13) | typedef struct { function Queue (line 19) | Queue *newQueue() { function isEmpty (line 26) | int isEmpty(Queue *q) { function enqueue (line 31) | void enqueue(Queue *q, Vertex *vet) { function Vertex (line 38) | Vertex *dequeue(Queue *q) { function isVisited (line 46) | int isVisited(Vertex **visited, int size, Vertex *vet) { function graphBFS (line 57) | void graphBFS(GraphAdjList *graph, Vertex *startVet, Vertex **res, int *... function main (line 82) | int main() { FILE: ru/codes/c/chapter_graph/graph_dfs.c function isVisited (line 13) | int isVisited(Vertex **res, int size, Vertex *vet) { function dfs (line 24) | void dfs(GraphAdjList *graph, Vertex **res, int *resSize, Vertex *vet) { function graphDFS (line 41) | void graphDFS(GraphAdjList *graph, Vertex *startVet, Vertex **res, int *... function main (line 46) | int main() { FILE: ru/codes/c/chapter_greedy/coin_change_greedy.c function coinChangeGreedy (line 10) | int coinChangeGreedy(int *coins, int size, int amt) { function main (line 29) | int main() { FILE: ru/codes/c/chapter_greedy/fractional_knapsack.c type Item (line 10) | typedef struct { function sortByValueDensity (line 16) | int sortByValueDensity(const void *a, const void *b) { function fractionalKnapsack (line 23) | float fractionalKnapsack(int wgt[], int val[], int itemCount, int cap) { function main (line 50) | int main(void) { FILE: ru/codes/c/chapter_greedy/max_capacity.c function myMin (line 10) | int myMin(int a, int b) { function myMax (line 14) | int myMax(int a, int b) { function maxCapacity (line 19) | int maxCapacity(int ht[], int htLength) { function main (line 41) | int main(void) { FILE: ru/codes/c/chapter_greedy/max_product_cutting.c function maxProductCutting (line 10) | int maxProductCutting(int n) { function main (line 31) | int main(void) { FILE: ru/codes/c/chapter_hashing/array_hash_map.c type Pair (line 13) | typedef struct { type MapSet (line 19) | typedef struct { type ArrayHashMap (line 25) | typedef struct { function ArrayHashMap (line 30) | ArrayHashMap *newArrayHashMap() { function delArrayHashMap (line 39) | void delArrayHashMap(ArrayHashMap *hmap) { function hashFunc (line 50) | int hashFunc(int key) { function put (line 65) | void put(ArrayHashMap *hmap, const int key, const char *val) { function removeItem (line 76) | void removeItem(ArrayHashMap *hmap, const int key) { function pairSet (line 84) | void pairSet(ArrayHashMap *hmap, MapSet *set) { function keySet (line 108) | void keySet(ArrayHashMap *hmap, MapSet *set) { function valueSet (line 130) | void valueSet(ArrayHashMap *hmap, MapSet *set) { function print (line 152) | void print(ArrayHashMap *hmap) { function main (line 164) | int main() { FILE: ru/codes/c/chapter_hashing/hash_map_chaining.c type Pair (line 15) | typedef struct { type Node (line 21) | typedef struct Node { type HashMapChaining (line 27) | typedef struct { function HashMapChaining (line 36) | HashMapChaining *newHashMapChaining() { function delHashMapChaining (line 50) | void delHashMapChaining(HashMapChaining *hashMap) { function hashFunc (line 65) | int hashFunc(HashMapChaining *hashMap, int key) { function loadFactor (line 70) | double loadFactor(HashMapChaining *hashMap) { function extend (line 92) | void extend(HashMapChaining *hashMap) { function put (line 120) | void put(HashMapChaining *hashMap, int key, const char *val) { function removeItem (line 147) | void removeItem(HashMapChaining *hashMap, int key) { function print (line 171) | void print(HashMapChaining *hashMap) { function main (line 184) | int main() { FILE: ru/codes/c/chapter_hashing/hash_map_open_addressing.c type Pair (line 10) | typedef struct { type HashMapOpenAddressing (line 16) | typedef struct { function HashMapOpenAddressing (line 29) | HashMapOpenAddressing *newHashMapOpenAddressing() { function delHashMapOpenAddressing (line 44) | void delHashMapOpenAddressing(HashMapOpenAddressing *hashMap) { function hashFunc (line 58) | int hashFunc(HashMapOpenAddressing *hashMap, int key) { function loadFactor (line 63) | double loadFactor(HashMapOpenAddressing *hashMap) { function findBucket (line 68) | int findBucket(HashMapOpenAddressing *hashMap, int key) { function put (line 107) | void put(HashMapOpenAddressing *hashMap, int key, char *val) { function removeItem (line 134) | void removeItem(HashMapOpenAddressing *hashMap, int key) { function extend (line 148) | void extend(HashMapOpenAddressing *hashMap) { function print (line 169) | void print(HashMapOpenAddressing *hashMap) { function main (line 183) | int main() { FILE: ru/codes/c/chapter_hashing/simple_hash.c function addHash (line 10) | int addHash(char *key) { function mulHash (line 20) | int mulHash(char *key) { function xorHash (line 30) | int xorHash(char *key) { function rotHash (line 41) | int rotHash(char *key) { function main (line 52) | int main() { FILE: ru/codes/c/chapter_heap/my_heap.c type MaxHeap (line 12) | typedef struct { function MaxHeap (line 25) | MaxHeap *newMaxHeap(int nums[], int size) { function delMaxHeap (line 38) | void delMaxHeap(MaxHeap *maxHeap) { function left (line 44) | int left(MaxHeap *maxHeap, int i) { function right (line 49) | int right(MaxHeap *maxHeap, int i) { function parent (line 54) | int parent(MaxHeap *maxHeap, int i) { function swap (line 59) | void swap(MaxHeap *maxHeap, int i, int j) { function size (line 66) | int size(MaxHeap *maxHeap) { function isEmpty (line 71) | int isEmpty(MaxHeap *maxHeap) { function peek (line 76) | int peek(MaxHeap *maxHeap) { function push (line 81) | void push(MaxHeap *maxHeap, int val) { function pop (line 96) | int pop(MaxHeap *maxHeap) { function siftDown (line 115) | void siftDown(MaxHeap *maxHeap, int i) { function siftUp (line 139) | void siftUp(MaxHeap *maxHeap, int i) { FILE: ru/codes/c/chapter_heap/my_heap_test.c function main (line 10) | int main() { FILE: ru/codes/c/chapter_heap/top_k.c function pushMinHeap (line 10) | void pushMinHeap(MaxHeap *maxHeap, int val) { function popMinHeap (line 16) | int popMinHeap(MaxHeap *maxHeap) { function peekMinHeap (line 22) | int peekMinHeap(MaxHeap *maxHeap) { function main (line 62) | int main() { FILE: ru/codes/c/chapter_searching/binary_search.c function binarySearch (line 10) | int binarySearch(int *nums, int len, int target) { function binarySearchLCRO (line 28) | int binarySearchLCRO(int *nums, int len, int target) { function main (line 46) | int main() { FILE: ru/codes/c/chapter_searching/binary_search_edge.c function binarySearchInsertion (line 10) | int binarySearchInsertion(int *nums, int numSize, int target) { function binarySearchLeftEdge (line 25) | int binarySearchLeftEdge(int *nums, int numSize, int target) { function binarySearchRightEdge (line 37) | int binarySearchRightEdge(int *nums, int numSize, int target) { function main (line 51) | int main() { FILE: ru/codes/c/chapter_searching/binary_search_insertion.c function binarySearchInsertionSimple (line 10) | int binarySearchInsertionSimple(int *nums, int numSize, int target) { function binarySearchInsertion (line 27) | int binarySearchInsertion(int *nums, int numSize, int target) { function main (line 44) | int main() { FILE: ru/codes/c/chapter_searching/two_sum.c type HashTable (line 26) | typedef struct { function HashTable (line 33) | HashTable *find(HashTable *h, int key) { function insert (line 40) | void insert(HashTable **h, int key, int val) { function main (line 69) | int main() { FILE: ru/codes/c/chapter_sorting/bubble_sort.c function bubbleSort (line 10) | void bubbleSort(int nums[], int size) { function bubbleSortWithFlag (line 25) | void bubbleSortWithFlag(int nums[], int size) { function main (line 44) | int main() { FILE: ru/codes/c/chapter_sorting/bucket_sort.c function compare (line 12) | int compare(const void *a, const void *b) { function bucketSort (line 19) | void bucketSort(float nums[], int n) { function main (line 49) | int main() { FILE: ru/codes/c/chapter_sorting/counting_sort.c function countingSortNaive (line 11) | void countingSortNaive(int nums[], int size) { function countingSort (line 38) | void countingSort(int nums[], int size) { function main (line 73) | int main() { FILE: ru/codes/c/chapter_sorting/heap_sort.c function siftDown (line 10) | void siftDown(int nums[], int n, int i) { function heapSort (line 34) | void heapSort(int nums[], int n) { function main (line 51) | int main() { FILE: ru/codes/c/chapter_sorting/insertion_sort.c function insertionSort (line 10) | void insertionSort(int nums[], int size) { function main (line 26) | int main() { FILE: ru/codes/c/chapter_sorting/merge_sort.c function merge (line 10) | void merge(int *nums, int left, int mid, int right) { function mergeSort (line 41) | void mergeSort(int *nums, int left, int right) { function main (line 54) | int main() { FILE: ru/codes/c/chapter_sorting/quick_sort.c function swap (line 10) | void swap(int nums[], int i, int j) { function partition (line 17) | int partition(int nums[], int left, int right) { function quickSort (line 37) | void quickSort(int nums[], int left, int right) { function medianThree (line 52) | int medianThree(int nums[], int left, int mid, int right) { function partitionMedian (line 62) | int partitionMedian(int nums[], int left, int right) { function quickSortMedian (line 81) | void quickSortMedian(int nums[], int left, int right) { function quickSortTailCall (line 95) | void quickSortTailCall(int nums[], int left, int right) { function main (line 116) | int main() { FILE: ru/codes/c/chapter_sorting/radix_sort.c function digit (line 10) | int digit(int num, int exp) { function countingSortDigit (line 16) | void countingSortDigit(int nums[], int size, int exp) { function radixSort (line 49) | void radixSort(int nums[], int size) { function main (line 67) | int main() { FILE: ru/codes/c/chapter_sorting/selection_sort.c function selectionSort (line 10) | void selectionSort(int nums[], int n) { function main (line 27) | int main() { FILE: ru/codes/c/chapter_stack_and_queue/array_deque.c type ArrayDeque (line 10) | typedef struct { function ArrayDeque (line 18) | ArrayDeque *newArrayDeque(int capacity) { function delArrayDeque (line 28) | void delArrayDeque(ArrayDeque *deque) { function capacity (line 34) | int capacity(ArrayDeque *deque) { function size (line 39) | int size(ArrayDeque *deque) { function empty (line 44) | bool empty(ArrayDeque *deque) { function dequeIndex (line 49) | int dequeIndex(ArrayDeque *deque, int i) { function pushFirst (line 57) | void pushFirst(ArrayDeque *deque, int num) { function pushLast (line 71) | void pushLast(ArrayDeque *deque, int num) { function peekFirst (line 84) | int peekFirst(ArrayDeque *deque) { function peekLast (line 91) | int peekLast(ArrayDeque *deque) { function popFirst (line 99) | int popFirst(ArrayDeque *deque) { function popLast (line 108) | int popLast(ArrayDeque *deque) { function main (line 127) | int main() { FILE: ru/codes/c/chapter_stack_and_queue/array_queue.c type ArrayQueue (line 10) | typedef struct { function ArrayQueue (line 18) | ArrayQueue *newArrayQueue(int capacity) { function delArrayQueue (line 28) | void delArrayQueue(ArrayQueue *queue) { function capacity (line 34) | int capacity(ArrayQueue *queue) { function size (line 39) | int size(ArrayQueue *queue) { function empty (line 44) | bool empty(ArrayQueue *queue) { function peek (line 49) | int peek(ArrayQueue *queue) { function push (line 55) | void push(ArrayQueue *queue, int num) { function pop (line 69) | int pop(ArrayQueue *queue) { function main (line 90) | int main() { FILE: ru/codes/c/chapter_stack_and_queue/array_stack.c type ArrayStack (line 12) | typedef struct { function ArrayStack (line 18) | ArrayStack *newArrayStack() { function delArrayStack (line 27) | void delArrayStack(ArrayStack *stack) { function size (line 33) | int size(ArrayStack *stack) { function isEmpty (line 38) | bool isEmpty(ArrayStack *stack) { function push (line 43) | void push(ArrayStack *stack, int num) { function peek (line 53) | int peek(ArrayStack *stack) { function pop (line 62) | int pop(ArrayStack *stack) { function main (line 69) | int main() { FILE: ru/codes/c/chapter_stack_and_queue/linkedlist_deque.c type DoublyListNode (line 10) | typedef struct DoublyListNode { function DoublyListNode (line 17) | DoublyListNode *newDoublyListNode(int num) { function delDoublyListNode (line 26) | void delDoublyListNode(DoublyListNode *node) { type LinkedListDeque (line 31) | typedef struct { function LinkedListDeque (line 37) | LinkedListDeque *newLinkedListDeque() { function delLinkedListdeque (line 46) | void delLinkedListdeque(LinkedListDeque *deque) { function size (line 58) | int size(LinkedListDeque *deque) { function empty (line 63) | bool empty(LinkedListDeque *deque) { function push (line 68) | void push(LinkedListDeque *deque, int num, bool isFront) { function pushFirst (line 92) | void pushFirst(LinkedListDeque *deque, int num) { function pushLast (line 97) | void pushLast(LinkedListDeque *deque, int num) { function peekFirst (line 102) | int peekFirst(LinkedListDeque *deque) { function peekLast (line 108) | int peekLast(LinkedListDeque *deque) { function pop (line 114) | int pop(LinkedListDeque *deque, bool isFront) { function popFirst (line 145) | int popFirst(LinkedListDeque *deque) { function popLast (line 150) | int popLast(LinkedListDeque *deque) { function printLinkedListDeque (line 155) | void printLinkedListDeque(LinkedListDeque *deque) { function main (line 169) | int main() { FILE: ru/codes/c/chapter_stack_and_queue/linkedlist_queue.c type LinkedListQueue (line 10) | typedef struct { function LinkedListQueue (line 16) | LinkedListQueue *newLinkedListQueue() { function delLinkedListQueue (line 25) | void delLinkedListQueue(LinkedListQueue *queue) { function size (line 37) | int size(LinkedListQueue *queue) { function empty (line 42) | bool empty(LinkedListQueue *queue) { function push (line 47) | void push(LinkedListQueue *queue, int num) { function peek (line 64) | int peek(LinkedListQueue *queue) { function pop (line 70) | int pop(LinkedListQueue *queue) { function printLinkedListQueue (line 80) | void printLinkedListQueue(LinkedListQueue *queue) { function main (line 94) | int main() { FILE: ru/codes/c/chapter_stack_and_queue/linkedlist_stack.c type LinkedListStack (line 10) | typedef struct { function LinkedListStack (line 16) | LinkedListStack *newLinkedListStack() { function delLinkedListStack (line 24) | void delLinkedListStack(LinkedListStack *s) { function size (line 34) | int size(LinkedListStack *s) { function isEmpty (line 39) | bool isEmpty(LinkedListStack *s) { function push (line 44) | void push(LinkedListStack *s, int num) { function peek (line 53) | int peek(LinkedListStack *s) { function pop (line 62) | int pop(LinkedListStack *s) { function main (line 73) | int main() { FILE: ru/codes/c/chapter_tree/array_binary_tree.c type ArrayBinaryTree (line 10) | typedef struct { function ArrayBinaryTree (line 16) | ArrayBinaryTree *newArrayBinaryTree(int *arr, int arrSize) { function delArrayBinaryTree (line 25) | void delArrayBinaryTree(ArrayBinaryTree *abt) { function size (line 31) | int size(ArrayBinaryTree *abt) { function val (line 36) | int val(ArrayBinaryTree *abt, int i) { function left (line 44) | int left(int i) { function right (line 49) | int right(int i) { function parent (line 54) | int parent(int i) { function dfs (line 72) | void dfs(ArrayBinaryTree *abt, int i, char *order, int *res, int *index) { function main (line 117) | int main() { FILE: ru/codes/c/chapter_tree/avl_tree.c type AVLTree (line 10) | typedef struct { function AVLTree (line 15) | AVLTree *newAVLTree() { function delAVLTree (line 22) | void delAVLTree(AVLTree *tree) { function height (line 28) | int height(TreeNode *node) { function updateHeight (line 37) | void updateHeight(TreeNode *node) { function balanceFactor (line 49) | int balanceFactor(TreeNode *node) { function TreeNode (line 59) | TreeNode *rightRotate(TreeNode *node) { function TreeNode (line 74) | TreeNode *leftRotate(TreeNode *node) { function TreeNode (line 89) | TreeNode *rotate(TreeNode *node) { function TreeNode (line 119) | TreeNode *insertHelper(TreeNode *node, int val) { function insert (line 141) | void insert(AVLTree *tree, int val) { function TreeNode (line 146) | TreeNode *removeHelper(TreeNode *node, int val) { function removeItem (line 190) | void removeItem(AVLTree *tree, int val) { function TreeNode (line 195) | TreeNode *search(AVLTree *tree, int val) { function testInsert (line 214) | void testInsert(AVLTree *tree, int val) { function testRemove (line 220) | void testRemove(AVLTree *tree, int val) { function main (line 227) | int main() { FILE: ru/codes/c/chapter_tree/binary_search_tree.c type BinarySearchTree (line 10) | typedef struct { function BinarySearchTree (line 15) | BinarySearchTree *newBinarySearchTree() { function delBinarySearchTree (line 23) | void delBinarySearchTree(BinarySearchTree *bst) { function TreeNode (line 29) | TreeNode *getRoot(BinarySearchTree *bst) { function TreeNode (line 34) | TreeNode *search(BinarySearchTree *bst, int num) { function insert (line 54) | void insert(BinarySearchTree *bst, int num) { function removeItem (line 87) | void removeItem(BinarySearchTree *bst, int num) { function main (line 138) | int main() { FILE: ru/codes/c/chapter_tree/binary_tree.c function main (line 10) | int main() { FILE: ru/codes/c/chapter_tree/binary_tree_bfs.c function main (line 54) | int main() { FILE: ru/codes/c/chapter_tree/binary_tree_dfs.c function preOrder (line 15) | void preOrder(TreeNode *root, int *size) { function inOrder (line 25) | void inOrder(TreeNode *root, int *size) { function postOrder (line 35) | void postOrder(TreeNode *root, int *size) { function main (line 45) | int main() { FILE: ru/codes/c/utils/common_test.c function testListNode (line 9) | void testListNode() { function testTreeNode (line 16) | void testTreeNode() { function main (line 29) | int main(int argc, char *argv[]) { FILE: ru/codes/c/utils/list_node.h type ListNode (line 15) | typedef struct ListNode { function ListNode (line 21) | ListNode *newListNode(int val) { function ListNode (line 30) | ListNode *arrToLinkedList(const int *arr, size_t size) { function freeMemoryLinkedList (line 45) | void freeMemoryLinkedList(ListNode *cur) { FILE: ru/codes/c/utils/print_util.h function printArray (line 22) | void printArray(int arr[], int size) { function printArrayFloat (line 35) | void printArrayFloat(float arr[], int size) { function printLinkedList (line 48) | void printLinkedList(ListNode *node) { type Trunk (line 59) | typedef struct Trunk { function Trunk (line 64) | Trunk *newTrunk(Trunk *prev, char *str) { function showTrunks (line 72) | void showTrunks(Trunk *trunk) { function printTreeHelper (line 85) | void printTreeHelper(TreeNode *node, Trunk *prev, bool isRight) { function printTree (line 113) | void printTree(TreeNode *root) { function printHeap (line 118) | void printHeap(int arr[], int size) { FILE: ru/codes/c/utils/tree_node.h type TreeNode (line 19) | typedef struct TreeNode { function TreeNode (line 27) | TreeNode *newTreeNode(int val) { function TreeNode (line 55) | TreeNode *arrayToTreeDFS(int *arr, int size, int i) { function TreeNode (line 67) | TreeNode *arrayToTree(int *arr, int size) { function treeToArrayDFS (line 72) | void treeToArrayDFS(TreeNode *root, int i, int *res, int *size) { function freeMemoryTree (line 95) | void freeMemoryTree(TreeNode *root) { FILE: ru/codes/c/utils/uthash.h type UT_hash_bucket (line 1072) | typedef struct UT_hash_bucket { type UT_hash_table (line 1096) | typedef struct UT_hash_table { type UT_hash_handle (line 1129) | typedef struct UT_hash_handle { FILE: ru/codes/c/utils/vector.h type vector (line 15) | typedef struct vector { function vector (line 23) | vector *newVector() { function vector (line 33) | vector *_newVector(int size, void *elem, int elemSize) { function delVector (line 48) | void delVector(vector *v) { function vectorPushback (line 67) | void vectorPushback(vector *v, void *elem, int elemSize) { function vectorPopback (line 78) | void vectorPopback(vector *v) { function vectorClear (line 86) | void vectorClear(vector *v) { function vectorSize (line 95) | int vectorSize(vector *v) { function vectorSet (line 120) | void vectorSet(vector *v, int pos, void *elem, int elemSize) { function vectorExpand (line 132) | void vectorExpand(vector *v) { function vectorShrink (line 138) | void vectorShrink(vector *v) { function vectorInsert (line 144) | void vectorInsert(vector *v, int pos, void *elem, int elemSize) { function vectorErase (line 158) | void vectorErase(vector *v, int pos) { function vectorSwap (line 169) | void vectorSwap(vector *v, int i, int j) { function vectorEmpty (line 176) | bool vectorEmpty(vector *v) { function vectorFull (line 181) | bool vectorFull(vector *v) { function vectorEqual (line 186) | bool vectorEqual(vector *v1, vector *v2) { function vectorSort (line 203) | void vectorSort(vector *v, int (*cmp)(const void *, const void *)) { function printVector (line 209) | void printVector(vector *v, void (*printFunc)(vector *v, void *p)) { function printVectorMatrix (line 239) | void printVectorMatrix(vector *vv, void (*printFunc)(vector *v, void *p)) { FILE: ru/codes/c/utils/vertex.h type Vertex (line 15) | typedef struct { function Vertex (line 20) | Vertex *newVertex(int val) { function Vertex (line 28) | Vertex **valsToVets(int *vals, int size) { FILE: ru/codes/cpp/chapter_array_and_linkedlist/array.cpp function randomAccess (line 10) | int randomAccess(int *nums, int size) { function insert (line 33) | void insert(int *nums, int size, int num, int index) { function remove (line 43) | void remove(int *nums, int size, int index) { function traverse (line 51) | void traverse(int *nums, int size) { function find (line 60) | int find(int *nums, int size, int target) { function main (line 69) | int main() { FILE: ru/codes/cpp/chapter_array_and_linkedlist/linked_list.cpp function insert (line 10) | void insert(ListNode *n0, ListNode *P) { function remove (line 17) | void remove(ListNode *n0) { function ListNode (line 29) | ListNode *access(ListNode *head, int index) { function find (line 39) | int find(ListNode *head, int target) { function main (line 51) | int main() { FILE: ru/codes/cpp/chapter_array_and_linkedlist/list.cpp function main (line 10) | int main() { FILE: ru/codes/cpp/chapter_array_and_linkedlist/my_list.cpp class MyList (line 10) | class MyList { method MyList (line 19) | MyList() { method size (line 29) | int size() { method capacity (line 34) | int capacity() { method get (line 39) | int get(int index) { method set (line 47) | void set(int index, int num) { method add (line 54) | void add(int num) { method insert (line 64) | void insert(int index, int num) { method remove (line 80) | int remove(int index) { method extendCapacity (line 95) | void extendCapacity() { method toVector (line 110) | vector toVector() { function main (line 121) | int main() { FILE: ru/codes/cpp/chapter_backtracking/n_queens.cpp function backtrack (line 10) | void backtrack(int row, int n, vector> &state, vector>> nQueens(int n) { function main (line 51) | int main() { FILE: ru/codes/cpp/chapter_backtracking/permutations_i.cpp function backtrack (line 10) | void backtrack(vector &state, const vector &choices, vector> permutationsI(vector nums) { function main (line 43) | int main() { FILE: ru/codes/cpp/chapter_backtracking/permutations_ii.cpp function backtrack (line 10) | void backtrack(vector &state, const vector &choices, vector> permutationsII(vector nums) { function main (line 45) | int main() { FILE: ru/codes/cpp/chapter_backtracking/preorder_traversal_i_compact.cpp function preOrder (line 12) | void preOrder(TreeNode *root) { function main (line 25) | int main() { FILE: ru/codes/cpp/chapter_backtracking/preorder_traversal_ii_compact.cpp function preOrder (line 13) | void preOrder(TreeNode *root) { function main (line 30) | int main() { FILE: ru/codes/cpp/chapter_backtracking/preorder_traversal_iii_compact.cpp function preOrder (line 13) | void preOrder(TreeNode *root) { function main (line 31) | int main() { FILE: ru/codes/cpp/chapter_backtracking/preorder_traversal_iii_template.cpp function isSolution (line 10) | bool isSolution(vector &state) { function recordSolution (line 15) | void recordSolution(vector &state, vector... function isValid (line 20) | bool isValid(vector &state, TreeNode *choice) { function makeChoice (line 25) | void makeChoice(vector &state, TreeNode *choice) { function undoChoice (line 30) | void undoChoice(vector &state, TreeNode *choice) { function backtrack (line 35) | void backtrack(vector &state, vector &choices, v... function main (line 57) | int main() { FILE: ru/codes/cpp/chapter_backtracking/subset_sum_i.cpp function backtrack (line 10) | void backtrack(vector &state, int target, vector &choices, int... function subsetSumI (line 34) | vector> subsetSumI(vector &nums, int target) { function main (line 44) | int main() { FILE: ru/codes/cpp/chapter_backtracking/subset_sum_i_naive.cpp function backtrack (line 10) | void backtrack(vector &state, int target, int total, vector &c... function subsetSumINaive (line 32) | vector> subsetSumINaive(vector &nums, int target) { function main (line 41) | int main() { FILE: ru/codes/cpp/chapter_backtracking/subset_sum_ii.cpp function backtrack (line 10) | void backtrack(vector &state, int target, vector &choices, int... function subsetSumII (line 39) | vector> subsetSumII(vector &nums, int target) { function main (line 49) | int main() { FILE: ru/codes/cpp/chapter_computational_complexity/iteration.cpp function forLoop (line 10) | int forLoop(int n) { function whileLoop (line 20) | int whileLoop(int n) { function whileLoopII (line 32) | int whileLoopII(int n) { function string (line 46) | string nestedForLoop(int n) { function main (line 59) | int main() { FILE: ru/codes/cpp/chapter_computational_complexity/recursion.cpp function recur (line 10) | int recur(int n) { function forLoopRecur (line 21) | int forLoopRecur(int n) { function tailRecur (line 41) | int tailRecur(int n, int res) { function fib (line 50) | int fib(int n) { function main (line 61) | int main() { FILE: ru/codes/cpp/chapter_computational_complexity/space_complexity.cpp function func (line 10) | int func() { function constant (line 16) | void constant(int n) { function linear (line 33) | void linear(int n) { function linearRecur (line 49) | void linearRecur(int n) { function quadratic (line 57) | void quadratic(int n) { function quadraticRecur (line 70) | int quadraticRecur(int n) { function TreeNode (line 79) | TreeNode *buildTree(int n) { function main (line 89) | int main() { FILE: ru/codes/cpp/chapter_computational_complexity/time_complexity.cpp function constant (line 10) | int constant(int n) { function linear (line 19) | int linear(int n) { function arrayTraversal (line 27) | int arrayTraversal(vector &nums) { function quadratic (line 37) | int quadratic(int n) { function bubbleSort (line 49) | int bubbleSort(vector &nums) { function exponential (line 68) | int exponential(int n) { function expRecur (line 82) | int expRecur(int n) { function logarithmic (line 89) | int logarithmic(int n) { function logRecur (line 99) | int logRecur(int n) { function linearLogRecur (line 106) | int linearLogRecur(int n) { function factorialRecur (line 117) | int factorialRecur(int n) { function main (line 129) | int main() { FILE: ru/codes/cpp/chapter_computational_complexity/worst_best_time_complexity.cpp function randomNumbers (line 10) | vector randomNumbers(int n) { function findOne (line 24) | int findOne(vector &nums) { function main (line 35) | int main() { FILE: ru/codes/cpp/chapter_divide_and_conquer/binary_search_recur.cpp function dfs (line 10) | int dfs(vector &nums, int target, int i, int j) { function binarySearch (line 30) | int binarySearch(vector &nums, int target) { function main (line 37) | int main() { FILE: ru/codes/cpp/chapter_divide_and_conquer/build_tree.cpp function TreeNode (line 10) | TreeNode *dfs(vector &preorder, unordered_map &inorderMap... function TreeNode (line 27) | TreeNode *buildTree(vector &preorder, vector &inorder) { function main (line 38) | int main() { FILE: ru/codes/cpp/chapter_divide_and_conquer/hanota.cpp function move (line 10) | void move(vector &src, vector &tar) { function dfs (line 19) | void dfs(int i, vector &src, vector &buf, vector &tar) { function solveHanota (line 34) | void solveHanota(vector &A, vector &B, vector &C) { function main (line 41) | int main() { FILE: ru/codes/cpp/chapter_dynamic_programming/climbing_stairs_backtrack.cpp function backtrack (line 11) | void backtrack(vector &choices, int state, int n, vector &res) { function climbingStairsBacktrack (line 27) | int climbingStairsBacktrack(int n) { function main (line 36) | int main() { FILE: ru/codes/cpp/chapter_dynamic_programming/climbing_stairs_constraint_dp.cpp function climbingStairsConstraintDP (line 10) | int climbingStairsConstraintDP(int n) { function main (line 30) | int main() { FILE: ru/codes/cpp/chapter_dynamic_programming/climbing_stairs_dfs.cpp function dfs (line 10) | int dfs(int i) { function climbingStairsDFS (line 20) | int climbingStairsDFS(int n) { function main (line 25) | int main() { FILE: ru/codes/cpp/chapter_dynamic_programming/climbing_stairs_dfs_mem.cpp function dfs (line 10) | int dfs(int i, vector &mem) { function climbingStairsDFSMem (line 25) | int climbingStairsDFSMem(int n) { function main (line 32) | int main() { FILE: ru/codes/cpp/chapter_dynamic_programming/climbing_stairs_dp.cpp function climbingStairsDP (line 10) | int climbingStairsDP(int n) { function climbingStairsDPComp (line 26) | int climbingStairsDPComp(int n) { function main (line 39) | int main() { FILE: ru/codes/cpp/chapter_dynamic_programming/coin_change.cpp function coinChangeDP (line 10) | int coinChangeDP(vector &coins, int amt) { function coinChangeDPComp (line 35) | int coinChangeDPComp(vector &coins, int amt) { function main (line 57) | int main() { FILE: ru/codes/cpp/chapter_dynamic_programming/coin_change_ii.cpp function coinChangeIIDP (line 10) | int coinChangeIIDP(vector &coins, int amt) { function coinChangeIIDPComp (line 34) | int coinChangeIIDPComp(vector &coins, int amt) { function main (line 55) | int main() { FILE: ru/codes/cpp/chapter_dynamic_programming/edit_distance.cpp function editDistanceDFS (line 10) | int editDistanceDFS(string s, string t, int i, int j) { function editDistanceDFSMem (line 32) | int editDistanceDFSMem(string s, string t, vector> &mem, int... function editDistanceDP (line 58) | int editDistanceDP(string s, string t) { function editDistanceDPComp (line 84) | int editDistanceDPComp(string s, string t) { function main (line 113) | int main() { FILE: ru/codes/cpp/chapter_dynamic_programming/knapsack.cpp function knapsackDFS (line 8) | int knapsackDFS(vector &wgt, vector &val, int i, int c) { function knapsackDFSMem (line 25) | int knapsackDFSMem(vector &wgt, vector &val, vector &wgt, vector &val, int cap) { function knapsackDPComp (line 67) | int knapsackDPComp(vector &wgt, vector &val, int cap) { function main (line 85) | int main() { FILE: ru/codes/cpp/chapter_dynamic_programming/min_cost_climbing_stairs_dp.cpp function minCostClimbingStairsDP (line 10) | int minCostClimbingStairsDP(vector &cost) { function minCostClimbingStairsDPComp (line 27) | int minCostClimbingStairsDPComp(vector &cost) { function main (line 41) | int main() { FILE: ru/codes/cpp/chapter_dynamic_programming/min_path_sum.cpp function minPathSumDFS (line 10) | int minPathSumDFS(vector> &grid, int i, int j) { function minPathSumDFSMem (line 27) | int minPathSumDFSMem(vector> &grid, vector> &mem... function minPathSumDP (line 49) | int minPathSumDP(vector> &grid) { function minPathSumDPComp (line 72) | int minPathSumDPComp(vector> &grid) { function main (line 94) | int main() { FILE: ru/codes/cpp/chapter_dynamic_programming/unbounded_knapsack.cpp function unboundedKnapsackDP (line 10) | int unboundedKnapsackDP(vector &wgt, vector &val, int cap) { function unboundedKnapsackDPComp (line 30) | int unboundedKnapsackDPComp(vector &wgt, vector &val, int cap) { function main (line 50) | int main() { FILE: ru/codes/cpp/chapter_graph/graph_adjacency_list.cpp class GraphAdjList (line 10) | class GraphAdjList { method remove (line 16) | void remove(vector &vec, Vertex *vet) { method GraphAdjList (line 26) | GraphAdjList(const vector> &edges) { method size (line 36) | int size() { method addEdge (line 41) | void addEdge(Vertex *vet1, Vertex *vet2) { method removeEdge (line 50) | void removeEdge(Vertex *vet1, Vertex *vet2) { method addVertex (line 59) | void addVertex(Vertex *vet) { method removeVertex (line 67) | void removeVertex(Vertex *vet) { method print (line 79) | void print() { FILE: ru/codes/cpp/chapter_graph/graph_adjacency_list_test.cpp function main (line 10) | int main() { FILE: ru/codes/cpp/chapter_graph/graph_adjacency_matrix.cpp class GraphAdjMat (line 10) | class GraphAdjMat { method GraphAdjMat (line 16) | GraphAdjMat(const vector &vertices, const vector> &ed... method size (line 29) | int size() const { method addVertex (line 34) | void addVertex(int val) { method removeVertex (line 47) | void removeVertex(int index) { method addEdge (line 63) | void addEdge(int i, int j) { method removeEdge (line 75) | void removeEdge(int i, int j) { method print (line 85) | void print() { function main (line 94) | int main() { FILE: ru/codes/cpp/chapter_graph/graph_bfs.cpp function graphBFS (line 12) | vector graphBFS(GraphAdjList &graph, Vertex *startVet) { function main (line 38) | int main() { FILE: ru/codes/cpp/chapter_graph/graph_dfs.cpp function dfs (line 11) | void dfs(GraphAdjList &graph, unordered_set &visited, vector graphDFS(GraphAdjList &graph, Vertex *startVet) { function main (line 35) | int main() { FILE: ru/codes/cpp/chapter_greedy/coin_change_greedy.cpp function coinChangeGreedy (line 10) | int coinChangeGreedy(vector &coins, int amt) { function main (line 29) | int main() { FILE: ru/codes/cpp/chapter_greedy/fractional_knapsack.cpp class Item (line 10) | class Item { method Item (line 15) | Item(int w, int v) : w(w), v(v) { function fractionalKnapsack (line 20) | double fractionalKnapsack(vector &wgt, vector &val, int cap) { function main (line 46) | int main() { FILE: ru/codes/cpp/chapter_greedy/max_capacity.cpp function maxCapacity (line 10) | int maxCapacity(vector &ht) { function main (line 31) | int main() { FILE: ru/codes/cpp/chapter_greedy/max_product_cutting.cpp function maxProductCutting (line 10) | int maxProductCutting(int n) { function main (line 31) | int main() { FILE: ru/codes/cpp/chapter_hashing/array_hash_map.cpp type Pair (line 10) | struct Pair { method Pair (line 14) | Pair(int key, string val) { class ArrayHashMap (line 21) | class ArrayHashMap { method ArrayHashMap (line 26) | ArrayHashMap() { method hashFunc (line 40) | int hashFunc(int key) { method string (line 46) | string get(int key) { method put (line 55) | void put(int key, string val) { method remove (line 62) | void remove(int key) { method pairSet (line 70) | vector pairSet() { method keySet (line 81) | vector keySet() { method valueSet (line 92) | vector valueSet() { method print (line 103) | void print() { FILE: ru/codes/cpp/chapter_hashing/array_hash_map_test.cpp function main (line 10) | int main() { FILE: ru/codes/cpp/chapter_hashing/built_in_hash.cpp function main (line 10) | int main() { FILE: ru/codes/cpp/chapter_hashing/hash_map.cpp function main (line 10) | int main() { FILE: ru/codes/cpp/chapter_hashing/hash_map_chaining.cpp class HashMapChaining (line 10) | class HashMapChaining { method HashMapChaining (line 20) | HashMapChaining() : size(0), capacity(4), loadThres(2.0 / 3.0), extend... method hashFunc (line 35) | int hashFunc(int key) { method loadFactor (line 40) | double loadFactor() { method string (line 45) | string get(int key) { method put (line 58) | void put(int key, string val) { method remove (line 77) | void remove(int key) { method extend (line 93) | void extend() { method print (line 112) | void print() { function main (line 124) | int main() { FILE: ru/codes/cpp/chapter_hashing/hash_map_open_addressing.cpp class HashMapOpenAddressing (line 10) | class HashMapOpenAddressing { method HashMapOpenAddressing (line 21) | HashMapOpenAddressing() : size(0), buckets(capacity, nullptr) { method hashFunc (line 35) | int hashFunc(int key) { method loadFactor (line 40) | double loadFactor() { method findBucket (line 45) | int findBucket(int key) { method string (line 72) | string get(int key) { method put (line 84) | void put(int key, string val) { method remove (line 102) | void remove(int key) { method extend (line 114) | void extend() { method print (line 131) | void print() { function main (line 145) | int main() { FILE: ru/codes/cpp/chapter_hashing/simple_hash.cpp function addHash (line 10) | int addHash(string key) { function mulHash (line 20) | int mulHash(string key) { function xorHash (line 30) | int xorHash(string key) { function rotHash (line 40) | int rotHash(string key) { function main (line 50) | int main() { FILE: ru/codes/cpp/chapter_heap/heap.cpp function testPush (line 9) | void testPush(priority_queue &heap, int val) { function testPop (line 15) | void testPop(priority_queue &heap) { function main (line 23) | int main() { FILE: ru/codes/cpp/chapter_heap/my_heap.cpp class MaxHeap (line 10) | class MaxHeap { method left (line 16) | int left(int i) { method right (line 21) | int right(int i) { method parent (line 26) | int parent(int i) { method siftUp (line 31) | void siftUp(int i) { method siftDown (line 46) | void siftDown(int i) { method MaxHeap (line 65) | MaxHeap(vector nums) { method size (line 75) | int size() { method isEmpty (line 80) | bool isEmpty() { method peek (line 85) | int peek() { method push (line 90) | void push(int val) { method pop (line 98) | void pop() { method print (line 112) | void print() { function main (line 123) | int main() { FILE: ru/codes/cpp/chapter_heap/top_k.cpp function topKHeap (line 10) | priority_queue, greater> topKHeap(vector &num... function main (line 29) | int main() { FILE: ru/codes/cpp/chapter_searching/binary_search.cpp function binarySearch (line 10) | int binarySearch(vector &nums, int target) { function binarySearchLCRO (line 28) | int binarySearchLCRO(vector &nums, int target) { function main (line 46) | int main() { FILE: ru/codes/cpp/chapter_searching/binary_search_edge.cpp function binarySearchInsertion (line 10) | int binarySearchInsertion(const vector &nums, int target) { function binarySearchLeftEdge (line 25) | int binarySearchLeftEdge(vector &nums, int target) { function binarySearchRightEdge (line 37) | int binarySearchRightEdge(vector &nums, int target) { function main (line 51) | int main() { FILE: ru/codes/cpp/chapter_searching/binary_search_insertion.cpp function binarySearchInsertionSimple (line 10) | int binarySearchInsertionSimple(vector &nums, int target) { function binarySearchInsertion (line 27) | int binarySearchInsertion(vector &nums, int target) { function main (line 44) | int main() { FILE: ru/codes/cpp/chapter_searching/hashing_search.cpp function hashingSearchArray (line 10) | int hashingSearchArray(unordered_map map, int target) { function ListNode (line 19) | ListNode *hashingSearchLinkedList(unordered_map map, in... function main (line 28) | int main() { FILE: ru/codes/cpp/chapter_searching/linear_search.cpp function linearSearchArray (line 10) | int linearSearchArray(vector &nums, int target) { function ListNode (line 22) | ListNode *linearSearchLinkedList(ListNode *head, int target) { function main (line 35) | int main() { FILE: ru/codes/cpp/chapter_searching/two_sum.cpp function twoSumBruteForce (line 10) | vector twoSumBruteForce(vector &nums, int target) { function twoSumHashTable (line 23) | vector twoSumHashTable(vector &nums, int target) { function main (line 38) | int main() { FILE: ru/codes/cpp/chapter_sorting/bubble_sort.cpp function bubbleSort (line 10) | void bubbleSort(vector &nums) { function bubbleSortWithFlag (line 25) | void bubbleSortWithFlag(vector &nums) { function main (line 44) | int main() { FILE: ru/codes/cpp/chapter_sorting/bucket_sort.cpp function bucketSort (line 10) | void bucketSort(vector &nums) { function main (line 36) | int main() { FILE: ru/codes/cpp/chapter_sorting/counting_sort.cpp function countingSortNaive (line 11) | void countingSortNaive(vector &nums) { function countingSort (line 34) | void countingSort(vector &nums) { function main (line 65) | int main() { FILE: ru/codes/cpp/chapter_sorting/heap_sort.cpp function siftDown (line 10) | void siftDown(vector &nums, int n, int i) { function heapSort (line 32) | void heapSort(vector &nums) { function main (line 47) | int main() { FILE: ru/codes/cpp/chapter_sorting/insertion_sort.cpp function insertionSort (line 10) | void insertionSort(vector &nums) { function main (line 24) | int main() { FILE: ru/codes/cpp/chapter_sorting/merge_sort.cpp function merge (line 10) | void merge(vector &nums, int left, int mid, int right) { function mergeSort (line 37) | void mergeSort(vector &nums, int left, int right) { function main (line 50) | int main() { FILE: ru/codes/cpp/chapter_sorting/quick_sort.cpp class QuickSort (line 10) | class QuickSort { method partition (line 13) | static int partition(vector &nums, int left, int right) { method quickSort (line 29) | static void quickSort(vector &nums, int left, int right) { class QuickSortMedian (line 42) | class QuickSortMedian { method medianThree (line 45) | static int medianThree(vector &nums, int left, int mid, int right) { method partition (line 55) | static int partition(vector &nums, int left, int right) { method quickSort (line 75) | static void quickSort(vector &nums, int left, int right) { class QuickSortTailCall (line 88) | class QuickSortTailCall { method partition (line 91) | static int partition(vector &nums, int left, int right) { method quickSort (line 107) | static void quickSort(vector &nums, int left, int right) { function main (line 125) | int main() { FILE: ru/codes/cpp/chapter_sorting/radix_sort.cpp function digit (line 10) | int digit(int num, int exp) { function countingSortDigit (line 16) | void countingSortDigit(vector &nums, int exp) { function radixSort (line 43) | void radixSort(vector &nums) { function main (line 56) | int main() { FILE: ru/codes/cpp/chapter_sorting/selection_sort.cpp function selectionSort (line 10) | void selectionSort(vector &nums) { function main (line 26) | int main() { FILE: ru/codes/cpp/chapter_stack_and_queue/array_deque.cpp class ArrayDeque (line 10) | class ArrayDeque { method ArrayDeque (line 18) | ArrayDeque(int capacity) { method capacity (line 24) | int capacity() { method size (line 29) | int size() { method isEmpty (line 34) | bool isEmpty() { method index (line 39) | int index(int i) { method pushFirst (line 47) | void pushFirst(int num) { method pushLast (line 61) | void pushLast(int num) { method popFirst (line 74) | int popFirst() { method popLast (line 83) | int popLast() { method peekFirst (line 90) | int peekFirst() { method peekLast (line 97) | int peekLast() { method toVector (line 106) | vector toVector() { function main (line 117) | int main() { FILE: ru/codes/cpp/chapter_stack_and_queue/array_queue.cpp class ArrayQueue (line 10) | class ArrayQueue { method ArrayQueue (line 18) | ArrayQueue(int capacity) { method capacity (line 30) | int capacity() { method size (line 35) | int size() { method isEmpty (line 40) | bool isEmpty() { method push (line 45) | void push(int num) { method pop (line 59) | int pop() { method peek (line 68) | int peek() { method toVector (line 75) | vector toVector() { function main (line 86) | int main() { FILE: ru/codes/cpp/chapter_stack_and_queue/array_stack.cpp class ArrayStack (line 10) | class ArrayStack { method size (line 16) | int size() { method isEmpty (line 21) | bool isEmpty() { method push (line 26) | void push(int num) { method pop (line 31) | int pop() { method top (line 38) | int top() { method toVector (line 45) | vector toVector() { function main (line 51) | int main() { FILE: ru/codes/cpp/chapter_stack_and_queue/deque.cpp function main (line 10) | int main() { FILE: ru/codes/cpp/chapter_stack_and_queue/linkedlist_deque.cpp type DoublyListNode (line 10) | struct DoublyListNode { method DoublyListNode (line 14) | DoublyListNode(int val) : val(val), prev(nullptr), next(nullptr) { class LinkedListDeque (line 19) | class LinkedListDeque { method LinkedListDeque (line 26) | LinkedListDeque() : front(nullptr), rear(nullptr) { method size (line 41) | int size() { method isEmpty (line 46) | bool isEmpty() { method push (line 51) | void push(int num, bool isFront) { method pushFirst (line 73) | void pushFirst(int num) { method pushLast (line 78) | void pushLast(int num) { method pop (line 83) | int pop(bool isFront) { method popFirst (line 115) | int popFirst() { method popLast (line 120) | int popLast() { method peekFirst (line 125) | int peekFirst() { method peekLast (line 132) | int peekLast() { method toVector (line 139) | vector toVector() { function main (line 151) | int main() { FILE: ru/codes/cpp/chapter_stack_and_queue/linkedlist_queue.cpp class LinkedListQueue (line 10) | class LinkedListQueue { method LinkedListQueue (line 16) | LinkedListQueue() { method size (line 28) | int size() { method isEmpty (line 33) | bool isEmpty() { method push (line 38) | void push(int num) { method pop (line 55) | int pop() { method peek (line 67) | int peek() { method toVector (line 74) | vector toVector() { function main (line 86) | int main() { FILE: ru/codes/cpp/chapter_stack_and_queue/linkedlist_stack.cpp class LinkedListStack (line 10) | class LinkedListStack { method LinkedListStack (line 16) | LinkedListStack() { method size (line 27) | int size() { method isEmpty (line 32) | bool isEmpty() { method push (line 37) | void push(int num) { method pop (line 45) | int pop() { method top (line 56) | int top() { method toVector (line 63) | vector toVector() { function main (line 75) | int main() { FILE: ru/codes/cpp/chapter_stack_and_queue/queue.cpp function main (line 10) | int main() { FILE: ru/codes/cpp/chapter_stack_and_queue/stack.cpp function main (line 10) | int main() { FILE: ru/codes/cpp/chapter_tree/array_binary_tree.cpp class ArrayBinaryTree (line 10) | class ArrayBinaryTree { method ArrayBinaryTree (line 13) | ArrayBinaryTree(vector arr) { method size (line 18) | int size() { method val (line 23) | int val(int i) { method left (line 31) | int left(int i) { method right (line 36) | int right(int i) { method parent (line 41) | int parent(int i) { method levelOrder (line 46) | vector levelOrder() { method preOrder (line 57) | vector preOrder() { method inOrder (line 64) | vector inOrder() { method postOrder (line 71) | vector postOrder() { method dfs (line 81) | void dfs(int i, string order, vector &res) { function main (line 100) | int main() { FILE: ru/codes/cpp/chapter_tree/avl_tree.cpp class AVLTree (line 10) | class AVLTree { method updateHeight (line 13) | void updateHeight(TreeNode *node) { method TreeNode (line 19) | TreeNode *rightRotate(TreeNode *node) { method TreeNode (line 33) | TreeNode *leftRotate(TreeNode *node) { method TreeNode (line 47) | TreeNode *rotate(TreeNode *node) { method TreeNode (line 77) | TreeNode *insertHelper(TreeNode *node, int val) { method TreeNode (line 95) | TreeNode *removeHelper(TreeNode *node, int val) { method height (line 138) | int height(TreeNode *node) { method balanceFactor (line 144) | int balanceFactor(TreeNode *node) { method insert (line 153) | void insert(int val) { method remove (line 158) | void remove(int val) { method TreeNode (line 163) | TreeNode *search(int val) { method AVLTree (line 182) | AVLTree() : root(nullptr) { function testInsert (line 191) | void testInsert(AVLTree &tree, int val) { function testRemove (line 197) | void testRemove(AVLTree &tree, int val) { function main (line 204) | int main() { FILE: ru/codes/cpp/chapter_tree/binary_search_tree.cpp class BinarySearchTree (line 10) | class BinarySearchTree { method BinarySearchTree (line 16) | BinarySearchTree() { method TreeNode (line 27) | TreeNode *getRoot() { method TreeNode (line 32) | TreeNode *search(int num) { method insert (line 51) | void insert(int num) { method remove (line 80) | void remove(int num) { function main (line 135) | int main() { FILE: ru/codes/cpp/chapter_tree/binary_tree.cpp function main (line 10) | int main() { FILE: ru/codes/cpp/chapter_tree/binary_tree_bfs.cpp function levelOrder (line 10) | vector levelOrder(TreeNode *root) { function main (line 29) | int main() { FILE: ru/codes/cpp/chapter_tree/binary_tree_dfs.cpp function preOrder (line 13) | void preOrder(TreeNode *root) { function inOrder (line 23) | void inOrder(TreeNode *root) { function postOrder (line 33) | void postOrder(TreeNode *root) { function main (line 43) | int main() { FILE: ru/codes/cpp/utils/list_node.hpp type ListNode (line 15) | struct ListNode { method ListNode (line 18) | ListNode(int x) : val(x), next(nullptr) { function ListNode (line 23) | ListNode *vecToLinkedList(vector list) { method ListNode (line 18) | ListNode(int x) : val(x), next(nullptr) { function freeMemoryLinkedList (line 34) | void freeMemoryLinkedList(ListNode *cur) { FILE: ru/codes/cpp/utils/print_utils.hpp function vecFind (line 17) | int vecFind(const vector &vec, T ele) { function string (line 28) | string strJoin(const string &delim, const T &vec) { function string (line 40) | string strRepeat(string str, int n) { function printArray (line 48) | void printArray(T *arr, int n) { function string (line 60) | string getVectorString(vector &list) { function printVector (line 65) | void printVector(vector list) { function printVectorMatrix (line 70) | void printVectorMatrix(vector> &matrix) { function printLinkedList (line 78) | void printLinkedList(ListNode *head) { type Trunk (line 88) | struct Trunk { method Trunk (line 91) | Trunk(Trunk *prev, string str) { function showTrunks (line 97) | void showTrunks(Trunk *p) { function printTree (line 111) | void printTree(TreeNode *root, Trunk *prev, bool isRight) { function printTree (line 143) | void printTree(TreeNode *root) { function printStack (line 148) | void printStack(stack stk) { function printQueue (line 170) | void printQueue(queue queue) { function printDeque (line 186) | void printDeque(deque deque) { function printHashMap (line 203) | void printHashMap(unordered_map map) { function S (line 210) | S &Container(priority_queue &pq) { function printHeap (line 220) | void printHeap(priority_queue &heap) { FILE: ru/codes/cpp/utils/tree_node.hpp type TreeNode (line 15) | struct TreeNode { method TreeNode (line 21) | TreeNode() = default; method TreeNode (line 22) | explicit TreeNode(int x, TreeNode *parent = nullptr) : val(x), parent(... function TreeNode (line 43) | TreeNode *vectorToTreeDFS(vector &arr, int i) { method TreeNode (line 21) | TreeNode() = default; method TreeNode (line 22) | explicit TreeNode(int x, TreeNode *parent = nullptr) : val(x), parent(... function TreeNode (line 54) | TreeNode *vectorToTree(vector arr) { method TreeNode (line 21) | TreeNode() = default; method TreeNode (line 22) | explicit TreeNode(int x, TreeNode *parent = nullptr) : val(x), parent(... function treeToVecorDFS (line 59) | void treeToVecorDFS(TreeNode *root, int i, vector &res) { function treeToVecor (line 71) | vector treeToVecor(TreeNode *root) { function freeMemoryTree (line 78) | void freeMemoryTree(TreeNode *root) { FILE: ru/codes/cpp/utils/vertex.hpp type Vertex (line 14) | struct Vertex { method Vertex (line 16) | Vertex(int x) : val(x) { function valsToVets (line 21) | vector valsToVets(vector vals) { function vetsToVals (line 30) | vector vetsToVals(vector vets) { FILE: ru/codes/csharp/chapter_array_and_linkedlist/array.cs class array (line 7) | public class array { method RandomAccess (line 9) | int RandomAccess(int[] nums) { method Extend (line 19) | int[] Extend(int[] nums, int enlarge) { method Insert (line 31) | void Insert(int[] nums, int num, int index) { method Remove (line 41) | void Remove(int[] nums, int index) { method Traverse (line 49) | void Traverse(int[] nums) { method Find (line 62) | int Find(int[] nums, int target) { method ToString (line 71) | string ToString(int[] nums) { method Test (line 76) | [Test] FILE: ru/codes/csharp/chapter_array_and_linkedlist/linked_list.cs class linked_list (line 7) | public class linked_list { method Insert (line 9) | void Insert(ListNode n0, ListNode P) { method Remove (line 16) | void Remove(ListNode n0) { method Access (line 26) | ListNode? Access(ListNode? head, int index) { method Find (line 36) | int Find(ListNode? head, int target) { method Test (line 48) | [Test] FILE: ru/codes/csharp/chapter_array_and_linkedlist/list.cs class list (line 9) | public class list { method Test (line 10) | [Test] FILE: ru/codes/csharp/chapter_array_and_linkedlist/my_list.cs class MyList (line 10) | class MyList { method MyList (line 17) | public MyList() { method Size (line 22) | public int Size() { method Capacity (line 27) | public int Capacity() { method Get (line 32) | public int Get(int index) { method Set (line 40) | public void Set(int index, int num) { method Add (line 47) | public void Add(int num) { method Insert (line 57) | public void Insert(int index, int num) { method Remove (line 73) | public int Remove(int index) { method ExtendCapacity (line 88) | public void ExtendCapacity() { method ToArray (line 96) | public int[] ToArray() { class my_list (line 106) | public class my_list { method Test (line 107) | [Test] FILE: ru/codes/csharp/chapter_backtracking/n_queens.cs class n_queens (line 9) | public class n_queens { method Backtrack (line 11) | void Backtrack(int row, int n, List> state, List>> NQueens(int n) { method Test (line 62) | [Test] FILE: ru/codes/csharp/chapter_backtracking/permutations_i.cs class permutations_i (line 9) | public class permutations_i { method Backtrack (line 11) | void Backtrack(List state, int[] choices, bool[] selected, List> PermutationsI(int[] nums) { method Test (line 41) | [Test] FILE: ru/codes/csharp/chapter_backtracking/permutations_ii.cs class permutations_ii (line 9) | public class permutations_ii { method Backtrack (line 11) | void Backtrack(List state, int[] choices, bool[] selected, List> PermutationsII(int[] nums) { method Test (line 43) | [Test] FILE: ru/codes/csharp/chapter_backtracking/preorder_traversal_i_compact.cs class preorder_traversal_i_compact (line 9) | public class preorder_traversal_i_compact { method PreOrder (line 13) | void PreOrder(TreeNode? root) { method Test (line 25) | [Test] FILE: ru/codes/csharp/chapter_backtracking/preorder_traversal_ii_compact.cs class preorder_traversal_ii_compact (line 9) | public class preorder_traversal_ii_compact { method PreOrder (line 14) | void PreOrder(TreeNode? root) { method Test (line 30) | [Test] FILE: ru/codes/csharp/chapter_backtracking/preorder_traversal_iii_compact.cs class preorder_traversal_iii_compact (line 9) | public class preorder_traversal_iii_compact { method PreOrder (line 14) | void PreOrder(TreeNode? root) { method Test (line 31) | [Test] FILE: ru/codes/csharp/chapter_backtracking/preorder_traversal_iii_template.cs class preorder_traversal_iii_template (line 9) | public class preorder_traversal_iii_template { method IsSolution (line 11) | bool IsSolution(List state) { method RecordSolution (line 16) | void RecordSolution(List state, List> res) { method IsValid (line 21) | bool IsValid(List state, TreeNode choice) { method MakeChoice (line 26) | void MakeChoice(List state, TreeNode choice) { method UndoChoice (line 31) | void UndoChoice(List state, TreeNode choice) { method Backtrack (line 36) | void Backtrack(List state, List choices, List state, int target, int[] choices, int start, ... method SubsetSumI (line 35) | List> SubsetSumI(int[] nums, int target) { method Test (line 44) | [Test] FILE: ru/codes/csharp/chapter_backtracking/subset_sum_i_naive.cs class subset_sum_i_naive (line 9) | public class subset_sum_i_naive { method Backtrack (line 11) | void Backtrack(List state, int target, int total, int[] choices, ... method SubsetSumINaive (line 33) | List> SubsetSumINaive(int[] nums, int target) { method Test (line 41) | [Test] FILE: ru/codes/csharp/chapter_backtracking/subset_sum_ii.cs class subset_sum_ii (line 9) | public class subset_sum_ii { method Backtrack (line 11) | void Backtrack(List state, int target, int[] choices, int start, ... method SubsetSumII (line 40) | List> SubsetSumII(int[] nums, int target) { method Test (line 49) | [Test] FILE: ru/codes/csharp/chapter_computational_complexity/iteration.cs class iteration (line 9) | public class iteration { method ForLoop (line 11) | int ForLoop(int n) { method WhileLoop (line 21) | int WhileLoop(int n) { method WhileLoopII (line 33) | int WhileLoopII(int n) { method NestedForLoop (line 47) | string NestedForLoop(int n) { method Test (line 60) | [Test] FILE: ru/codes/csharp/chapter_computational_complexity/recursion.cs class recursion (line 9) | public class recursion { method Recur (line 11) | int Recur(int n) { method ForLoopRecur (line 22) | int ForLoopRecur(int n) { method TailRecur (line 41) | int TailRecur(int n, int res) { method Fib (line 50) | int Fib(int n) { method Test (line 61) | [Test] FILE: ru/codes/csharp/chapter_computational_complexity/space_complexity.cs class space_complexity (line 9) | public class space_complexity { method Function (line 11) | int Function() { method Constant (line 17) | void Constant(int n) { method Linear (line 34) | void Linear(int n) { method LinearRecur (line 50) | void LinearRecur(int n) { method Quadratic (line 57) | void Quadratic(int n) { method QuadraticRecur (line 72) | int QuadraticRecur(int n) { method BuildTree (line 80) | TreeNode? BuildTree(int n) { method Test (line 89) | [Test] FILE: ru/codes/csharp/chapter_computational_complexity/time_complexity.cs class time_complexity (line 9) | public class time_complexity { method Algorithm (line 10) | void Algorithm(int n) { method AlgorithmA (line 26) | void AlgorithmA(int n) { method AlgorithmB (line 31) | void AlgorithmB(int n) { method AlgorithmC (line 38) | void AlgorithmC(int n) { method Constant (line 45) | int Constant(int n) { method Linear (line 54) | int Linear(int n) { method ArrayTraversal (line 62) | int ArrayTraversal(int[] nums) { method Quadratic (line 72) | int Quadratic(int n) { method BubbleSort (line 84) | int BubbleSort(int[] nums) { method Exponential (line 101) | int Exponential(int n) { method ExpRecur (line 115) | int ExpRecur(int n) { method Logarithmic (line 121) | int Logarithmic(int n) { method LogRecur (line 131) | int LogRecur(int n) { method LinearLogRecur (line 137) | int LinearLogRecur(int n) { method FactorialRecur (line 147) | int FactorialRecur(int n) { method Test (line 157) | [Test] FILE: ru/codes/csharp/chapter_computational_complexity/worst_best_time_complexity.cs class worst_best_time_complexity (line 9) | public class worst_best_time_complexity { method RandomNumbers (line 11) | int[] RandomNumbers(int n) { method FindOne (line 27) | int FindOne(int[] nums) { method Test (line 39) | [Test] FILE: ru/codes/csharp/chapter_divide_and_conquer/binary_search_recur.cs class binary_search_recur (line 9) | public class binary_search_recur { method DFS (line 11) | int DFS(int[] nums, int target, int i, int j) { method BinarySearch (line 31) | int BinarySearch(int[] nums, int target) { method Test (line 37) | [Test] FILE: ru/codes/csharp/chapter_divide_and_conquer/build_tree.cs class build_tree (line 9) | public class build_tree { method DFS (line 11) | TreeNode? DFS(int[] preorder, Dictionary inorderMap, int i, ... method BuildTree (line 28) | TreeNode? BuildTree(int[] preorder, int[] inorder) { method Test (line 38) | [Test] FILE: ru/codes/csharp/chapter_divide_and_conquer/hanota.cs class hanota (line 9) | public class hanota { method Move (line 11) | void Move(List src, List tar) { method DFS (line 20) | void DFS(int i, List src, List buf, List tar) { method SolveHanota (line 35) | void SolveHanota(List A, List B, List C) { method Test (line 41) | [Test] FILE: ru/codes/csharp/chapter_dynamic_programming/climbing_stairs_backtrack.cs class climbing_stairs_backtrack (line 9) | public class climbing_stairs_backtrack { method Backtrack (line 11) | void Backtrack(List choices, int state, int n, List res) { method ClimbingStairsBacktrack (line 27) | int ClimbingStairsBacktrack(int n) { method Test (line 35) | [Test] FILE: ru/codes/csharp/chapter_dynamic_programming/climbing_stairs_constraint_dp.cs class climbing_stairs_constraint_dp (line 9) | public class climbing_stairs_constraint_dp { method ClimbingStairsConstraintDP (line 11) | int ClimbingStairsConstraintDP(int n) { method Test (line 30) | [Test] FILE: ru/codes/csharp/chapter_dynamic_programming/climbing_stairs_dfs.cs class climbing_stairs_dfs (line 9) | public class climbing_stairs_dfs { method DFS (line 11) | int DFS(int i) { method ClimbingStairsDFS (line 21) | int ClimbingStairsDFS(int n) { method Test (line 25) | [Test] FILE: ru/codes/csharp/chapter_dynamic_programming/climbing_stairs_dfs_mem.cs class climbing_stairs_dfs_mem (line 9) | public class climbing_stairs_dfs_mem { method DFS (line 11) | int DFS(int i, int[] mem) { method ClimbingStairsDFSMem (line 26) | int ClimbingStairsDFSMem(int n) { method Test (line 33) | [Test] FILE: ru/codes/csharp/chapter_dynamic_programming/climbing_stairs_dp.cs class climbing_stairs_dp (line 9) | public class climbing_stairs_dp { method ClimbingStairsDP (line 11) | int ClimbingStairsDP(int n) { method ClimbingStairsDPComp (line 27) | int ClimbingStairsDPComp(int n) { method Test (line 39) | [Test] FILE: ru/codes/csharp/chapter_dynamic_programming/coin_change.cs class coin_change (line 9) | public class coin_change { method CoinChangeDP (line 11) | int CoinChangeDP(int[] coins, int amt) { method CoinChangeDPComp (line 36) | int CoinChangeDPComp(int[] coins, int amt) { method Test (line 58) | [Test] FILE: ru/codes/csharp/chapter_dynamic_programming/coin_change_ii.cs class coin_change_ii (line 9) | public class coin_change_ii { method CoinChangeIIDP (line 11) | int CoinChangeIIDP(int[] coins, int amt) { method CoinChangeIIDPComp (line 35) | int CoinChangeIIDPComp(int[] coins, int amt) { method Test (line 55) | [Test] FILE: ru/codes/csharp/chapter_dynamic_programming/edit_distance.cs class edit_distance (line 9) | public class edit_distance { method EditDistanceDFS (line 11) | int EditDistanceDFS(string s, string t, int i, int j) { method EditDistanceDFSMem (line 33) | int EditDistanceDFSMem(string s, string t, int[][] mem, int i, int j) { method EditDistanceDP (line 59) | int EditDistanceDP(string s, string t) { method EditDistanceDPComp (line 85) | int EditDistanceDPComp(string s, string t) { method Test (line 113) | [Test] FILE: ru/codes/csharp/chapter_dynamic_programming/knapsack.cs class knapsack (line 9) | public class knapsack { method KnapsackDFS (line 11) | int KnapsackDFS(int[] weight, int[] val, int i, int c) { method KnapsackDFSMem (line 28) | int KnapsackDFSMem(int[] weight, int[] val, int[][] mem, int i, int c) { method KnapsackDP (line 50) | int KnapsackDP(int[] weight, int[] val, int cap) { method KnapsackDPComp (line 70) | int KnapsackDPComp(int[] weight, int[] val, int cap) { method Test (line 90) | [Test] FILE: ru/codes/csharp/chapter_dynamic_programming/min_cost_climbing_stairs_dp.cs class min_cost_climbing_stairs_dp (line 9) | public class min_cost_climbing_stairs_dp { method MinCostClimbingStairsDP (line 11) | int MinCostClimbingStairsDP(int[] cost) { method MinCostClimbingStairsDPComp (line 28) | int MinCostClimbingStairsDPComp(int[] cost) { method Test (line 41) | [Test] FILE: ru/codes/csharp/chapter_dynamic_programming/min_path_sum.cs class min_path_sum (line 9) | public class min_path_sum { method MinPathSumDFS (line 11) | int MinPathSumDFS(int[][] grid, int i, int j) { method MinPathSumDFSMem (line 28) | int MinPathSumDFSMem(int[][] grid, int[][] mem, int i, int j) { method MinPathSumDP (line 50) | int MinPathSumDP(int[][] grid) { method MinPathSumDPComp (line 73) | int MinPathSumDPComp(int[][] grid) { method Test (line 94) | [Test] FILE: ru/codes/csharp/chapter_dynamic_programming/unbounded_knapsack.cs class unbounded_knapsack (line 9) | public class unbounded_knapsack { method UnboundedKnapsackDP (line 11) | int UnboundedKnapsackDP(int[] wgt, int[] val, int cap) { method UnboundedKnapsackDPComp (line 31) | int UnboundedKnapsackDPComp(int[] wgt, int[] val, int cap) { method Test (line 50) | [Test] FILE: ru/codes/csharp/chapter_graph/graph_adjacency_list.cs class GraphAdjList (line 10) | public class GraphAdjList { method GraphAdjList (line 15) | public GraphAdjList(Vertex[][] edges) { method Size (line 26) | int Size() { method AddEdge (line 31) | public void AddEdge(Vertex vet1, Vertex vet2) { method RemoveEdge (line 40) | public void RemoveEdge(Vertex vet1, Vertex vet2) { method AddVertex (line 49) | public void AddVertex(Vertex vet) { method RemoveVertex (line 57) | public void RemoveVertex(Vertex vet) { method Print (line 69) | public void Print() { class graph_adjacency_list (line 80) | public class graph_adjacency_list { method Test (line 81) | [Test] FILE: ru/codes/csharp/chapter_graph/graph_adjacency_matrix.cs class GraphAdjMat (line 10) | class GraphAdjMat { method GraphAdjMat (line 15) | public GraphAdjMat(int[] vertices, int[][] edges) { method Size (line 30) | int Size() { method AddVertex (line 35) | public void AddVertex(int val) { method RemoveVertex (line 52) | public void RemoveVertex(int index) { method AddEdge (line 67) | public void AddEdge(int i, int j) { method RemoveEdge (line 78) | public void RemoveEdge(int i, int j) { method Print (line 87) | public void Print() { class graph_adjacency_matrix (line 95) | public class graph_adjacency_matrix { method Test (line 96) | [Test] FILE: ru/codes/csharp/chapter_graph/graph_bfs.cs class graph_bfs (line 9) | public class graph_bfs { method GraphBFS (line 12) | List GraphBFS(GraphAdjList graph, Vertex startVet) { method Test (line 37) | [Test] FILE: ru/codes/csharp/chapter_graph/graph_dfs.cs class graph_dfs (line 9) | public class graph_dfs { method DFS (line 11) | void DFS(GraphAdjList graph, HashSet visited, List res... method GraphDFS (line 26) | List GraphDFS(GraphAdjList graph, Vertex startVet) { method Test (line 35) | [Test] FILE: ru/codes/csharp/chapter_greedy/coin_change_greedy.cs class coin_change_greedy (line 9) | public class coin_change_greedy { method CoinChangeGreedy (line 11) | int CoinChangeGreedy(int[] coins, int amt) { method Test (line 29) | [Test] FILE: ru/codes/csharp/chapter_greedy/fractional_knapsack.cs class Item (line 10) | class Item(int w, int v) { class fractional_knapsack (line 15) | public class fractional_knapsack { method FractionalKnapsack (line 17) | double FractionalKnapsack(int[] wgt, int[] val, int cap) { method Test (line 42) | [Test] FILE: ru/codes/csharp/chapter_greedy/max_capacity.cs class max_capacity (line 9) | public class max_capacity { method MaxCapacity (line 11) | int MaxCapacity(int[] ht) { method Test (line 31) | [Test] FILE: ru/codes/csharp/chapter_greedy/max_product_cutting.cs class max_product_cutting (line 9) | public class max_product_cutting { method MaxProductCutting (line 11) | int MaxProductCutting(int n) { method Test (line 31) | [Test] FILE: ru/codes/csharp/chapter_hashing/array_hash_map.cs class Pair (line 10) | class Pair(int key, string val) { class ArrayHashMap (line 16) | class ArrayHashMap { method ArrayHashMap (line 18) | public ArrayHashMap() { method HashFunc (line 27) | int HashFunc(int key) { method Get (line 33) | public string? Get(int key) { method Put (line 41) | public void Put(int key, string val) { method Remove (line 48) | public void Remove(int key) { method PairSet (line 55) | public List PairSet() { method KeySet (line 65) | public List KeySet() { method ValueSet (line 75) | public List ValueSet() { method Print (line 85) | public void Print() { class array_hash_map (line 93) | public class array_hash_map { method Test (line 94) | [Test] FILE: ru/codes/csharp/chapter_hashing/built_in_hash.cs class built_in_hash (line 9) | public class built_in_hash { method Test (line 10) | [Test] FILE: ru/codes/csharp/chapter_hashing/hash_map.cs class hash_map (line 10) | public class hash_map { method Test (line 11) | [Test] FILE: ru/codes/csharp/chapter_hashing/hash_map_chaining.cs class HashMapChaining (line 10) | class HashMapChaining { method HashMapChaining (line 18) | public HashMapChaining() { method HashFunc (line 30) | int HashFunc(int key) { method LoadFactor (line 35) | double LoadFactor() { method Get (line 40) | public string? Get(int key) { method Put (line 53) | public void Put(int key, string val) { method Remove (line 72) | public void Remove(int key) { method Extend (line 85) | void Extend() { method Print (line 104) | public void Print() { class hash_map_chaining (line 117) | public class hash_map_chaining { method Test (line 118) | [Test] FILE: ru/codes/csharp/chapter_hashing/hash_map_open_addressing.cs class HashMapOpenAddressing (line 10) | class HashMapOpenAddressing { method HashMapOpenAddressing (line 19) | public HashMapOpenAddressing() { method HashFunc (line 25) | int HashFunc(int key) { method LoadFactor (line 30) | double LoadFactor() { method FindBucket (line 35) | int FindBucket(int key) { method Get (line 62) | public string? Get(int key) { method Put (line 74) | public void Put(int key, string val) { method Remove (line 92) | public void Remove(int key) { method Extend (line 103) | void Extend() { method Print (line 119) | public void Print() { class hash_map_open_addressing (line 132) | public class hash_map_open_addressing { method Test (line 133) | [Test] FILE: ru/codes/csharp/chapter_hashing/simple_hash.cs class simple_hash (line 9) | public class simple_hash { method AddHash (line 11) | int AddHash(string key) { method MulHash (line 21) | int MulHash(string key) { method XorHash (line 31) | int XorHash(string key) { method RotHash (line 41) | int RotHash(string key) { method Test (line 50) | [Test] FILE: ru/codes/csharp/chapter_heap/heap.cs class heap (line 9) | public class heap { method TestPush (line 10) | void TestPush(PriorityQueue heap, int val) { method TestPop (line 16) | void TestPop(PriorityQueue heap) { method Test (line 22) | [Test] FILE: ru/codes/csharp/chapter_heap/my_heap.cs class MaxHeap (line 10) | class MaxHeap { method MaxHeap (line 15) | public MaxHeap() { method MaxHeap (line 20) | public MaxHeap(IEnumerable nums) { method Left (line 31) | int Left(int i) { method Right (line 36) | int Right(int i) { method Parent (line 41) | int Parent(int i) { method Peek (line 46) | public int Peek() { method Push (line 51) | public void Push(int val) { method Size (line 59) | public int Size() { method IsEmpty (line 64) | public bool IsEmpty() { method SiftUp (line 69) | void SiftUp(int i) { method Pop (line 84) | public int Pop() { method SiftDown (line 100) | void SiftDown(int i) { method Swap (line 118) | void Swap(int i, int p) { method Print (line 123) | public void Print() { class my_heap (line 129) | public class my_heap { method Test (line 130) | [Test] FILE: ru/codes/csharp/chapter_heap/top_k.cs class top_k (line 9) | public class top_k { method TopKHeap (line 11) | PriorityQueue TopKHeap(int[] nums, int k) { method Test (line 29) | [Test] FILE: ru/codes/csharp/chapter_searching/binary_search.cs class binary_search (line 9) | public class binary_search { method BinarySearch (line 11) | int BinarySearch(int[] nums, int target) { method BinarySearchLCRO (line 29) | int BinarySearchLCRO(int[] nums, int target) { method Test (line 46) | [Test] FILE: ru/codes/csharp/chapter_searching/binary_search_edge.cs class binary_search_edge (line 9) | public class binary_search_edge { method BinarySearchLeftEdge (line 11) | int BinarySearchLeftEdge(int[] nums, int target) { method BinarySearchRightEdge (line 23) | int BinarySearchRightEdge(int[] nums, int target) { method Test (line 36) | [Test] FILE: ru/codes/csharp/chapter_searching/binary_search_insertion.cs class binary_search_insertion (line 9) | public class binary_search_insertion { method BinarySearchInsertionSimple (line 11) | public static int BinarySearchInsertionSimple(int[] nums, int target) { method BinarySearchInsertion (line 28) | public static int BinarySearchInsertion(int[] nums, int target) { method Test (line 44) | [Test] FILE: ru/codes/csharp/chapter_searching/hashing_search.cs class hashing_search (line 9) | public class hashing_search { method HashingSearchArray (line 11) | int HashingSearchArray(Dictionary map, int target) { method HashingSearchLinkedList (line 18) | ListNode? HashingSearchLinkedList(Dictionary map, int t... method Test (line 25) | [Test] FILE: ru/codes/csharp/chapter_searching/linear_search.cs class linear_search (line 9) | public class linear_search { method LinearSearchArray (line 11) | int LinearSearchArray(int[] nums, int target) { method LinearSearchLinkedList (line 23) | ListNode? LinearSearchLinkedList(ListNode? head, int target) { method Test (line 35) | [Test] FILE: ru/codes/csharp/chapter_searching/two_sum.cs class two_sum (line 9) | public class two_sum { method TwoSumBruteForce (line 11) | int[] TwoSumBruteForce(int[] nums, int target) { method TwoSumHashTable (line 24) | int[] TwoSumHashTable(int[] nums, int target) { method Test (line 38) | [Test] FILE: ru/codes/csharp/chapter_sorting/bubble_sort.cs class bubble_sort (line 9) | public class bubble_sort { method BubbleSort (line 11) | void BubbleSort(int[] nums) { method BubbleSortWithFlag (line 25) | void BubbleSortWithFlag(int[] nums) { method Test (line 41) | [Test] FILE: ru/codes/csharp/chapter_sorting/bucket_sort.cs class bucket_sort (line 9) | public class bucket_sort { method BucketSort (line 11) | void BucketSort(float[] nums) { method Test (line 39) | [Test] FILE: ru/codes/csharp/chapter_sorting/counting_sort.cs class counting_sort (line 9) | public class counting_sort { method CountingSortNaive (line 12) | void CountingSortNaive(int[] nums) { method CountingSort (line 35) | void CountingSort(int[] nums) { method Test (line 67) | [Test] FILE: ru/codes/csharp/chapter_sorting/heap_sort.cs class heap_sort (line 9) | public class heap_sort { method SiftDown (line 11) | void SiftDown(int[] nums, int n, int i) { method HeapSort (line 32) | void HeapSort(int[] nums) { method Test (line 46) | [Test] FILE: ru/codes/csharp/chapter_sorting/insertion_sort.cs class insertion_sort (line 9) | public class insertion_sort { method InsertionSort (line 11) | void InsertionSort(int[] nums) { method Test (line 24) | [Test] FILE: ru/codes/csharp/chapter_sorting/merge_sort.cs class merge_sort (line 9) | public class merge_sort { method Merge (line 11) | void Merge(int[] nums, int left, int mid, int right) { method MergeSort (line 38) | void MergeSort(int[] nums, int left, int right) { method Test (line 49) | [Test] FILE: ru/codes/csharp/chapter_sorting/quick_sort.cs class quickSort (line 9) | class quickSort { method Swap (line 11) | static void Swap(int[] nums, int i, int j) { method Partition (line 16) | static int Partition(int[] nums, int left, int right) { method QuickSort (line 31) | public static void QuickSort(int[] nums, int left, int right) { class QuickSortMedian (line 44) | class QuickSortMedian { method Swap (line 46) | static void Swap(int[] nums, int i, int j) { method MedianThree (line 51) | static int MedianThree(int[] nums, int left, int mid, int right) { method Partition (line 61) | static int Partition(int[] nums, int left, int right) { method QuickSort (line 80) | public static void QuickSort(int[] nums, int left, int right) { class QuickSortTailCall (line 93) | class QuickSortTailCall { method Swap (line 95) | static void Swap(int[] nums, int i, int j) { method Partition (line 100) | static int Partition(int[] nums, int left, int right) { method QuickSort (line 115) | public static void QuickSort(int[] nums, int left, int right) { class quick_sort (line 132) | public class quick_sort { method Test (line 133) | [Test] FILE: ru/codes/csharp/chapter_sorting/radix_sort.cs class radix_sort (line 9) | public class radix_sort { method Digit (line 11) | int Digit(int num, int exp) { method CountingSortDigit (line 17) | void CountingSortDigit(int[] nums, int exp) { method RadixSort (line 45) | void RadixSort(int[] nums) { method Test (line 61) | [Test] FILE: ru/codes/csharp/chapter_sorting/selection_sort.cs class selection_sort (line 9) | public class selection_sort { method SelectionSort (line 11) | void SelectionSort(int[] nums) { method Test (line 26) | [Test] FILE: ru/codes/csharp/chapter_stack_and_queue/array_deque.cs class ArrayDeque (line 10) | public class ArrayDeque { method ArrayDeque (line 16) | public ArrayDeque(int capacity) { method Capacity (line 22) | int Capacity() { method Size (line 27) | public int Size() { method IsEmpty (line 32) | public bool IsEmpty() { method Index (line 37) | int Index(int i) { method PushFirst (line 45) | public void PushFirst(int num) { method PushLast (line 59) | public void PushLast(int num) { method PopFirst (line 72) | public int PopFirst() { method PopLast (line 81) | public int PopLast() { method PeekFirst (line 88) | public int PeekFirst() { method PeekLast (line 96) | public int PeekLast() { method ToArray (line 106) | public int[] ToArray() { class array_deque (line 116) | public class array_deque { method Test (line 117) | [Test] FILE: ru/codes/csharp/chapter_stack_and_queue/array_queue.cs class ArrayQueue (line 10) | class ArrayQueue { method ArrayQueue (line 15) | public ArrayQueue(int capacity) { method Capacity (line 21) | int Capacity() { method Size (line 26) | public int Size() { method IsEmpty (line 31) | public bool IsEmpty() { method Push (line 36) | public void Push(int num) { method Pop (line 50) | public int Pop() { method Peek (line 59) | public int Peek() { method ToArray (line 66) | public int[] ToArray() { class array_queue (line 76) | public class array_queue { method Test (line 77) | [Test] FILE: ru/codes/csharp/chapter_stack_and_queue/array_stack.cs class ArrayStack (line 10) | class ArrayStack { method ArrayStack (line 12) | public ArrayStack() { method Size (line 18) | public int Size() { method IsEmpty (line 23) | public bool IsEmpty() { method Push (line 28) | public void Push(int num) { method Pop (line 33) | public int Pop() { method Peek (line 42) | public int Peek() { method ToArray (line 49) | public int[] ToArray() { class array_stack (line 54) | public class array_stack { method Test (line 55) | [Test] FILE: ru/codes/csharp/chapter_stack_and_queue/deque.cs class deque (line 9) | public class deque { method Test (line 10) | [Test] FILE: ru/codes/csharp/chapter_stack_and_queue/linkedlist_deque.cs class ListNode (line 10) | public class ListNode(int val) { class LinkedListDeque (line 17) | public class LinkedListDeque { method LinkedListDeque (line 21) | public LinkedListDeque() { method Size (line 27) | public int Size() { method IsEmpty (line 32) | public bool IsEmpty() { method Push (line 37) | void Push(int num, bool isFront) { method PushFirst (line 63) | public void PushFirst(int num) { method PushLast (line 68) | public void PushLast(int num) { method Pop (line 73) | int? Pop(bool isFront) { method PopFirst (line 105) | public int? PopFirst() { method PopLast (line 110) | public int? PopLast() { method PeekFirst (line 115) | public int? PeekFirst() { method PeekLast (line 122) | public int? PeekLast() { method ToArray (line 129) | public int?[] ToArray() { class linkedlist_deque (line 141) | public class linkedlist_deque { method Test (line 142) | [Test] FILE: ru/codes/csharp/chapter_stack_and_queue/linkedlist_queue.cs class LinkedListQueue (line 10) | class LinkedListQueue { method LinkedListQueue (line 14) | public LinkedListQueue() { method Size (line 20) | public int Size() { method IsEmpty (line 25) | public bool IsEmpty() { method Push (line 30) | public void Push(int num) { method Pop (line 46) | public int Pop() { method Peek (line 55) | public int Peek() { method ToArray (line 62) | public int[] ToArray() { class linkedlist_queue (line 76) | public class linkedlist_queue { method Test (line 77) | [Test] FILE: ru/codes/csharp/chapter_stack_and_queue/linkedlist_stack.cs class LinkedListStack (line 10) | class LinkedListStack { method LinkedListStack (line 14) | public LinkedListStack() { method Size (line 19) | public int Size() { method IsEmpty (line 24) | public bool IsEmpty() { method Push (line 29) | public void Push(int num) { method Pop (line 38) | public int Pop() { method Peek (line 46) | public int Peek() { method ToArray (line 53) | public int[] ToArray() { class linkedlist_stack (line 67) | public class linkedlist_stack { method Test (line 68) | [Test] FILE: ru/codes/csharp/chapter_stack_and_queue/queue.cs class queue (line 9) | public class queue { method Test (line 10) | [Test] FILE: ru/codes/csharp/chapter_stack_and_queue/stack.cs class stack (line 9) | public class stack { method Test (line 10) | [Test] FILE: ru/codes/csharp/chapter_tree/array_binary_tree.cs class ArrayBinaryTree (line 10) | public class ArrayBinaryTree(List arr) { method Size (line 14) | public int Size() { method Val (line 19) | public int? Val(int i) { method Left (line 27) | public int Left(int i) { method Right (line 32) | public int Right(int i) { method Parent (line 37) | public int Parent(int i) { method LevelOrder (line 42) | public List LevelOrder() { method DFS (line 53) | void DFS(int i, string order, List res) { method PreOrder (line 71) | public List PreOrder() { method InOrder (line 78) | public List InOrder() { method PostOrder (line 85) | public List PostOrder() { class array_binary_tree (line 92) | public class array_binary_tree { method Test (line 93) | [Test] FILE: ru/codes/csharp/chapter_tree/avl_tree.cs class AVLTree (line 10) | class AVLTree { method Height (line 14) | int Height(TreeNode? node) { method UpdateHeight (line 20) | void UpdateHeight(TreeNode node) { method BalanceFactor (line 26) | public int BalanceFactor(TreeNode? node) { method RightRotate (line 34) | TreeNode? RightRotate(TreeNode? node) { method LeftRotate (line 48) | TreeNode? LeftRotate(TreeNode? node) { method Rotate (line 62) | TreeNode? Rotate(TreeNode? node) { method Insert (line 92) | public void Insert(int val) { method InsertHelper (line 97) | TreeNode? InsertHelper(TreeNode? node, int val) { method Remove (line 114) | public void Remove(int val) { method RemoveHelper (line 119) | TreeNode? RemoveHelper(TreeNode? node, int val) { method Search (line 153) | public TreeNode? Search(int val) { class avl_tree (line 172) | public class avl_tree { method TestInsert (line 173) | static void TestInsert(AVLTree tree, int val) { method TestRemove (line 179) | static void TestRemove(AVLTree tree, int val) { method Test (line 185) | [Test] FILE: ru/codes/csharp/chapter_tree/binary_search_tree.cs class BinarySearchTree (line 9) | class BinarySearchTree { method BinarySearchTree (line 12) | public BinarySearchTree() { method GetRoot (line 18) | public TreeNode? GetRoot() { method Search (line 23) | public TreeNode? Search(int num) { method Insert (line 42) | public void Insert(int num) { method Remove (line 75) | public void Remove(int num) { class binary_search_tree (line 126) | public class binary_search_tree { method Test (line 127) | [Test] FILE: ru/codes/csharp/chapter_tree/binary_tree.cs class binary_tree (line 9) | public class binary_tree { method Test (line 10) | [Test] FILE: ru/codes/csharp/chapter_tree/binary_tree_bfs.cs class binary_tree_bfs (line 9) | public class binary_tree_bfs { method LevelOrder (line 12) | List LevelOrder(TreeNode root) { method Test (line 29) | [Test] FILE: ru/codes/csharp/chapter_tree/binary_tree_dfs.cs class binary_tree_dfs (line 9) | public class binary_tree_dfs { method PreOrder (line 13) | void PreOrder(TreeNode? root) { method InOrder (line 22) | void InOrder(TreeNode? root) { method PostOrder (line 31) | void PostOrder(TreeNode? root) { method Test (line 39) | [Test] FILE: ru/codes/csharp/utils/ListNode.cs class ListNode (line 8) | public class ListNode(int x) { method ArrToLinkedList (line 13) | public static ListNode? ArrToLinkedList(int[] arr) { method ToString (line 23) | public override string? ToString() { FILE: ru/codes/csharp/utils/PrintUtil.cs class Trunk (line 9) | public class Trunk(Trunk? prev, string str) { class PrintUtil (line 14) | public static class PrintUtil { method PrintList (line 16) | public static void PrintList(IList list) { method PrintList (line 20) | public static string PrintList(this IEnumerable list) { method PrintMatrix (line 25) | public static void PrintMatrix(T[][] matrix) { method PrintMatrix (line 34) | public static void PrintMatrix(List> matrix) { method PrintLinkedList (line 43) | public static void PrintLinkedList(ListNode? head) { method PrintTree (line 57) | public static void PrintTree(TreeNode? root) { method PrintTree (line 62) | public static void PrintTree(TreeNode? root, Trunk? prev, bool isRight) { method ShowTrunks (line 93) | public static void ShowTrunks(Trunk? p) { method PrintHashMap (line 103) | public static void PrintHashMap(Dictionary map) where K : ... method PrintHeap (line 110) | public static void PrintHeap(Queue queue) { method PrintHeap (line 120) | public static void PrintHeap(PriorityQueue queue) { FILE: ru/codes/csharp/utils/TreeNode.cs class TreeNode (line 10) | public class TreeNode(int? x) { method ListToTreeDFS (line 33) | static TreeNode? ListToTreeDFS(List arr, int i) { method ListToTree (line 45) | public static TreeNode? ListToTree(List arr) { method TreeToListDFS (line 50) | static void TreeToListDFS(TreeNode? root, int i, List res) { method TreeToList (line 62) | public static List TreeToList(TreeNode root) { FILE: ru/codes/csharp/utils/Vertex.cs class Vertex (line 10) | public class Vertex(int val) { method ValsToVets (line 14) | public static Vertex[] ValsToVets(int[] vals) { method VetsToVals (line 23) | public static List VetsToVals(List vets) { FILE: ru/codes/dart/build.dart function main (line 3) | void main() FILE: ru/codes/dart/chapter_array_and_linkedlist/array.dart function randomAccess (line 12) | int randomAccess(List nums) function extend (line 21) | List extend(List nums, int enlarge) function insert (line 33) | void insert(List nums, int _num, int index) function remove (line 43) | void remove(List nums, int index) function traverse (line 51) | void traverse(List nums) function find (line 68) | int find(List nums, int target) function main (line 76) | void main() FILE: ru/codes/dart/chapter_array_and_linkedlist/linked_list.dart function insert (line 11) | void insert(ListNode n0, ListNode P) function remove (line 18) | void remove(ListNode n0) function access (line 27) | ListNode? access(ListNode? head, int index) function find (line 36) | int find(ListNode? head, int target) function main (line 49) | void main() FILE: ru/codes/dart/chapter_array_and_linkedlist/list.dart function main (line 10) | void main() FILE: ru/codes/dart/chapter_array_and_linkedlist/my_list.dart class MyList (line 8) | class MyList { method size (line 20) | int size() method capacity (line 23) | int capacity() method get (line 26) | int get(int index) method set (line 32) | void set(int index, int _num) method add (line 38) | void add(int _num) method insert (line 47) | void insert(int index, int _num) method remove (line 61) | int remove(int index) method extendCapacity (line 75) | void extendCapacity() method toArray (line 87) | List toArray() function main (line 97) | void main() FILE: ru/codes/dart/chapter_backtracking/n_queens.dart function backtrack (line 8) | void backtrack( function nQueens (line 50) | List>> nQueens(int n) function main (line 64) | void main() FILE: ru/codes/dart/chapter_backtracking/permutations_i.dart function backtrack (line 8) | void backtrack( function permutationsI (line 37) | List> permutationsI(List nums) function main (line 44) | void main() FILE: ru/codes/dart/chapter_backtracking/permutations_ii.dart function backtrack (line 8) | void backtrack( function permutationsII (line 39) | List> permutationsII(List nums) function main (line 46) | void main() FILE: ru/codes/dart/chapter_backtracking/preorder_traversal_i_compact.dart function preOrder (line 11) | void preOrder(TreeNode? root, List res) function main (line 24) | void main() FILE: ru/codes/dart/chapter_backtracking/preorder_traversal_ii_compact.dart function preOrder (line 11) | void preOrder( function main (line 33) | void main() FILE: ru/codes/dart/chapter_backtracking/preorder_traversal_iii_compact.dart function preOrder (line 11) | void preOrder( function main (line 33) | void main() FILE: ru/codes/dart/chapter_backtracking/preorder_traversal_iii_template.dart function isSolution (line 11) | bool isSolution(List state) function recordSolution (line 16) | void recordSolution(List state, List> res) function isValid (line 21) | bool isValid(List state, TreeNode? choice) function makeChoice (line 26) | void makeChoice(List state, TreeNode? choice) function undoChoice (line 31) | void undoChoice(List state, TreeNode? choice) function backtrack (line 36) | void backtrack( function main (line 61) | void main() FILE: ru/codes/dart/chapter_backtracking/subset_sum_i.dart function backtrack (line 8) | void backtrack( function subsetSumI (line 38) | List> subsetSumI(List nums, int target) function main (line 48) | void main() FILE: ru/codes/dart/chapter_backtracking/subset_sum_i_naive.dart function backtrack (line 8) | void backtrack( function subsetSumINaive (line 36) | List> subsetSumINaive(List nums, int target) function main (line 45) | void main() FILE: ru/codes/dart/chapter_backtracking/subset_sum_ii.dart function backtrack (line 8) | void backtrack( function subsetSumII (line 43) | List> subsetSumII(List nums, int target) function main (line 53) | void main() FILE: ru/codes/dart/chapter_computational_complexity/iteration.dart function forLoop (line 8) | int forLoop(int n) function whileLoop (line 18) | int whileLoop(int n) function whileLoopII (line 30) | int whileLoopII(int n) function nestedForLoop (line 44) | String nestedForLoop(int n) function main (line 57) | void main() FILE: ru/codes/dart/chapter_computational_complexity/recursion.dart function recur (line 8) | int recur(int n) function forLoopRecur (line 18) | int forLoopRecur(int n) function tailRecur (line 37) | int tailRecur(int n, int res) function fib (line 45) | int fib(int n) function main (line 55) | void main() FILE: ru/codes/dart/chapter_computational_complexity/space_complexity.dart function function (line 15) | int function() function constant (line 21) | void constant(int n) function linear (line 38) | void linear(int n) function linearRecur (line 54) | void linearRecur(int n) function quadratic (line 61) | void quadratic(int n) function quadraticRecur (line 76) | int quadraticRecur(int n) function buildTree (line 84) | TreeNode? buildTree(int n) function main (line 93) | void main() FILE: ru/codes/dart/chapter_computational_complexity/time_complexity.dart function constant (line 10) | int constant(int n) function linear (line 20) | int linear(int n) function arrayTraversal (line 29) | int arrayTraversal(List nums) function quadratic (line 39) | int quadratic(int n) function bubbleSort (line 51) | int bubbleSort(List nums) function exponential (line 70) | int exponential(int n) function expRecur (line 84) | int expRecur(int n) function logarithmic (line 90) | int logarithmic(int n) function logRecur (line 100) | int logRecur(int n) function linearLogRecur (line 106) | int linearLogRecur(int n) function factorialRecur (line 116) | int factorialRecur(int n) function main (line 127) | void main() FILE: ru/codes/dart/chapter_computational_complexity/worst_best_time_complexity.dart function randomNumbers (line 8) | List randomNumbers(int n) function findOne (line 21) | int findOne(List nums) function main (line 32) | void main() FILE: ru/codes/dart/chapter_divide_and_conquer/binary_search_recur.dart function dfs (line 8) | int dfs(List nums, int target, int i, int j) function binarySearch (line 28) | int binarySearch(List nums, int target) function main (line 35) | void main() FILE: ru/codes/dart/chapter_divide_and_conquer/build_tree.dart function dfs (line 11) | TreeNode? dfs( function buildTree (line 35) | TreeNode? buildTree(List preorder, List inorder) function main (line 46) | void main() FILE: ru/codes/dart/chapter_divide_and_conquer/hanota.dart function move (line 8) | void move(List src, List tar) function dfs (line 16) | void dfs(int i, List src, List buf, List tar) function solveHanota (line 31) | void solveHanota(List A, List B, List C) function main (line 38) | void main() FILE: ru/codes/dart/chapter_dynamic_programming/climbing_stairs_backtrack.dart function backtrack (line 8) | void backtrack(List choices, int state, int n, List res) function climbingStairsBacktrack (line 24) | int climbingStairsBacktrack(int n) function main (line 34) | void main() FILE: ru/codes/dart/chapter_dynamic_programming/climbing_stairs_constraint_dp.dart function climbingStairsConstraintDP (line 8) | int climbingStairsConstraintDP(int n) function main (line 28) | void main() FILE: ru/codes/dart/chapter_dynamic_programming/climbing_stairs_dfs.dart function dfs (line 8) | int dfs(int i) function climbingStairsDFS (line 17) | int climbingStairsDFS(int n) function main (line 22) | void main() FILE: ru/codes/dart/chapter_dynamic_programming/climbing_stairs_dfs_mem.dart function dfs (line 8) | int dfs(int i, List mem) function climbingStairsDFSMem (line 21) | int climbingStairsDFSMem(int n) function main (line 28) | void main() FILE: ru/codes/dart/chapter_dynamic_programming/climbing_stairs_dp.dart function climbingStairsDP (line 8) | int climbingStairsDP(int n) function climbingStairsDPComp (line 23) | int climbingStairsDPComp(int n) function main (line 35) | void main() FILE: ru/codes/dart/chapter_dynamic_programming/coin_change.dart function coinChangeDP (line 10) | int coinChangeDP(List coins, int amt) function coinChangeDPComp (line 35) | int coinChangeDPComp(List coins, int amt) function main (line 57) | void main() FILE: ru/codes/dart/chapter_dynamic_programming/coin_change_ii.dart function coinChangeIIDP (line 8) | int coinChangeIIDP(List coins, int amt) function coinChangeIIDPComp (line 32) | int coinChangeIIDPComp(List coins, int amt) function main (line 53) | void main() FILE: ru/codes/dart/chapter_dynamic_programming/edit_distance.dart function editDistanceDFS (line 10) | int editDistanceDFS(String s, String t, int i, int j) function editDistanceDFSMem (line 28) | int editDistanceDFSMem(String s, String t, List> mem, int i, i... function editDistanceDP (line 49) | int editDistanceDP(String s, String t) function editDistanceDPComp (line 75) | int editDistanceDPComp(String s, String t) function main (line 104) | void main() FILE: ru/codes/dart/chapter_dynamic_programming/knapsack.dart function knapsackDFS (line 10) | int knapsackDFS(List wgt, List val, int i, int c) function knapsackDFSMem (line 27) | int knapsackDFSMem( function knapsackDP (line 55) | int knapsackDP(List wgt, List val, int cap) function knapsackDPComp (line 75) | int knapsackDPComp(List wgt, List val, int cap) function main (line 93) | void main() FILE: ru/codes/dart/chapter_dynamic_programming/min_cost_climbing_stairs_dp.dart function minCostClimbingStairsDP (line 10) | int minCostClimbingStairsDP(List cost) function minCostClimbingStairsDPComp (line 26) | int minCostClimbingStairsDPComp(List cost) function main (line 39) | void main() FILE: ru/codes/dart/chapter_dynamic_programming/min_path_sum.dart function minPathSumDFS (line 10) | int minPathSumDFS(List> grid, int i, int j) function minPathSumDFSMem (line 28) | int minPathSumDFSMem(List> grid, List> mem, int i, i... function minPathSumDP (line 51) | int minPathSumDP(List> grid) function minPathSumDPComp (line 74) | int minPathSumDPComp(List> grid) function main (line 95) | void main() FILE: ru/codes/dart/chapter_dynamic_programming/unbounded_knapsack.dart function unboundedKnapsackDP (line 10) | int unboundedKnapsackDP(List wgt, List val, int cap) function unboundedKnapsackDPComp (line 30) | int unboundedKnapsackDPComp(List wgt, List val, int cap) function main (line 50) | void main() FILE: ru/codes/dart/chapter_graph/graph_adjacency_list.dart class GraphAdjList (line 10) | class GraphAdjList { method size (line 24) | int size() method addEdge (line 29) | void addEdge(Vertex vet1, Vertex vet2) method removeEdge (line 41) | void removeEdge(Vertex vet1, Vertex vet2) method addVertex (line 53) | void addVertex(Vertex vet) method removeVertex (line 60) | void removeVertex(Vertex vet) method printAdjList (line 73) | void printAdjList() function main (line 86) | void main() FILE: ru/codes/dart/chapter_graph/graph_adjacency_matrix.dart class GraphAdjMat (line 10) | class GraphAdjMat { method size (line 30) | int size() method addVertex (line 35) | void addVertex(int val) method removeVertex (line 49) | void removeVertex(int index) method addEdge (line 65) | void addEdge(int i, int j) method removeEdge (line 77) | void removeEdge(int i, int j) method printAdjMat (line 87) | void printAdjMat() function main (line 95) | void main() FILE: ru/codes/dart/chapter_graph/graph_bfs.dart function graphBFS (line 13) | List graphBFS(GraphAdjList graph, Vertex startVet) function main (line 41) | void main() FILE: ru/codes/dart/chapter_graph/graph_dfs.dart function dfs (line 11) | void dfs( function graphDFS (line 30) | List graphDFS(GraphAdjList graph, Vertex startVet) function main (line 40) | void main() FILE: ru/codes/dart/chapter_greedy/coin_change_greedy.dart function coinChangeGreedy (line 8) | int coinChangeGreedy(List coins, int amt) function main (line 27) | void main() FILE: ru/codes/dart/chapter_greedy/fractional_knapsack.dart class Item (line 8) | class Item { function fractionalKnapsack (line 16) | double fractionalKnapsack(List wgt, List val, int cap) function main (line 39) | void main() FILE: ru/codes/dart/chapter_greedy/max_capacity.dart function maxCapacity (line 10) | int maxCapacity(List ht) function main (line 31) | void main() FILE: ru/codes/dart/chapter_greedy/max_product_cutting.dart function maxProductCutting (line 10) | int maxProductCutting(int n) function main (line 31) | void main() FILE: ru/codes/dart/chapter_hashing/array_hash_map.dart class Pair (line 8) | class Pair { class ArrayHashMap (line 15) | class ArrayHashMap { method _hashFunc (line 24) | int _hashFunc(int key) method get (line 30) | String? get(int key) method put (line 40) | void put(int key, String val) method remove (line 47) | void remove(int key) method pairSet (line 53) | List pairSet() method keySet (line 64) | List keySet() method values (line 75) | List values() method printHashMap (line 86) | void printHashMap() function main (line 94) | void main() FILE: ru/codes/dart/chapter_hashing/built_in_hash.dart function main (line 10) | void main() FILE: ru/codes/dart/chapter_hashing/hash_map.dart function main (line 8) | void main() FILE: ru/codes/dart/chapter_hashing/hash_map_chaining.dart class HashMapChaining (line 10) | class HashMapChaining { method hashFunc (line 27) | int hashFunc(int key) method loadFactor (line 32) | double loadFactor() method get (line 37) | String? get(int key) method put (line 51) | void put(int key, String val) method remove (line 72) | void remove(int key) method extend (line 86) | void extend() method printHashMap (line 102) | void printHashMap() function main (line 114) | void main() FILE: ru/codes/dart/chapter_hashing/hash_map_open_addressing.dart class HashMapOpenAddressing (line 10) | class HashMapOpenAddressing { method hashFunc (line 25) | int hashFunc(int key) method loadFactor (line 30) | double loadFactor() method findBucket (line 35) | int findBucket(int key) method get (line 62) | String? get(int key) method put (line 74) | void put(int key, String val) method remove (line 92) | void remove(int key) method extend (line 103) | void extend() method printHashMap (line 119) | void printHashMap() function main (line 133) | void main() FILE: ru/codes/dart/chapter_hashing/simple_hash.dart function addHash (line 8) | int addHash(String key) function mulHash (line 18) | int mulHash(String key) function xorHash (line 28) | int xorHash(String key) function rotHash (line 38) | int rotHash(String key) function main (line 48) | void main() FILE: ru/codes/dart/chapter_heap/my_heap.dart class MaxHeap (line 10) | class MaxHeap { method _left (line 24) | int _left(int i) method _right (line 29) | int _right(int i) method _parent (line 34) | int _parent(int i) method _swap (line 39) | void _swap(int i, int j) method size (line 46) | int size() method isEmpty (line 51) | bool isEmpty() method peek (line 56) | int peek() method push (line 61) | void push(int val) method siftUp (line 69) | void siftUp(int i) method pop (line 85) | int pop() method siftDown (line 99) | void siftDown(int i) method print (line 117) | void print() function main (line 123) | void main() FILE: ru/codes/dart/chapter_heap/top_k.dart function topKHeap (line 10) | MinHeap topKHeap(List nums, int k) function main (line 25) | void main() class MinHeap (line 35) | class MinHeap { method getHeap (line 49) | List getHeap() method _left (line 54) | int _left(int i) method _right (line 59) | int _right(int i) method _parent (line 64) | int _parent(int i) method _swap (line 69) | void _swap(int i, int j) method size (line 76) | int size() method isEmpty (line 81) | bool isEmpty() method peek (line 86) | int peek() method push (line 91) | void push(int val) method siftUp (line 99) | void siftUp(int i) method pop (line 115) | int pop() method siftDown (line 129) | void siftDown(int i) method print (line 147) | void print() FILE: ru/codes/dart/chapter_searching/binary_search.dart function binarySearch (line 8) | int binarySearch(List nums, int target) function binarySearchLCRO (line 30) | int binarySearchLCRO(List nums, int target) function main (line 52) | void main() FILE: ru/codes/dart/chapter_searching/binary_search_edge.dart function binarySearchLeftEdge (line 10) | int binarySearchLeftEdge(List nums, int target) function binarySearchRightEdge (line 22) | int binarySearchRightEdge(List nums, int target) function main (line 36) | void main() FILE: ru/codes/dart/chapter_searching/binary_search_insertion.dart function binarySearchInsertionSimple (line 8) | int binarySearchInsertionSimple(List nums, int target) function binarySearchInsertion (line 25) | int binarySearchInsertion(List nums, int target) function main (line 42) | void main() FILE: ru/codes/dart/chapter_searching/hashing_search.dart function hashingSearchArray (line 11) | int hashingSearchArray(Map map, int target) function hashingSearchLinkedList (line 21) | ListNode? hashingSearchLinkedList(Map map, int target) function main (line 31) | void main() FILE: ru/codes/dart/chapter_searching/linear_search.dart function linearSearchArray (line 10) | int linearSearchArray(List nums, int target) function linearSearchList (line 23) | ListNode? linearSearchList(ListNode? head, int target) function main (line 35) | void main() FILE: ru/codes/dart/chapter_searching/two_sum.dart function twoSumBruteForce (line 10) | List twoSumBruteForce(List nums, int target) function twoSumHashTable (line 22) | List twoSumHashTable(List nums, int target) function main (line 37) | void main() FILE: ru/codes/dart/chapter_sorting/bubble_sort.dart function bubbleSort (line 8) | void bubbleSort(List nums) function bubbleSortWithFlag (line 24) | void bubbleSortWithFlag(List nums) function main (line 43) | void main() FILE: ru/codes/dart/chapter_sorting/bucket_sort.dart function bucketSort (line 8) | void bucketSort(List nums) function main (line 34) | void main() FILE: ru/codes/dart/chapter_sorting/counting_sort.dart function countingSortNaive (line 10) | void countingSortNaive(List nums) function countingSort (line 33) | void countingSort(List nums) function main (line 64) | void main() FILE: ru/codes/dart/chapter_sorting/heap_sort.dart function siftDown (line 8) | void siftDown(List nums, int n, int i) function heapSort (line 28) | void heapSort(List nums) function main (line 45) | void main() FILE: ru/codes/dart/chapter_sorting/insertion_sort.dart function insertionSort (line 8) | void insertionSort(List nums) function main (line 22) | void main() FILE: ru/codes/dart/chapter_sorting/merge_sort.dart function merge (line 8) | void merge(List nums, int left, int mid, int right) function mergeSort (line 35) | void mergeSort(List nums, int left, int right) function main (line 47) | void main() FILE: ru/codes/dart/chapter_sorting/quick_sort.dart class QuickSort (line 8) | class QuickSort { method _swap (line 10) | void _swap(List nums, int i, int j) method _partition (line 17) | int _partition(List nums, int left, int right) method quickSort (line 30) | void quickSort(List nums, int left, int right) class QuickSortMedian (line 42) | class QuickSortMedian { method _swap (line 44) | void _swap(List nums, int i, int j) method _medianThree (line 51) | int _medianThree(List nums, int left, int mid, int right) method _partition (line 61) | int _partition(List nums, int left, int right) method quickSort (line 78) | void quickSort(List nums, int left, int right) class QuickSortTailCall (line 90) | class QuickSortTailCall { method _swap (line 92) | void _swap(List nums, int i, int j) method _partition (line 99) | int _partition(List nums, int left, int right) method quickSort (line 112) | void quickSort(List nums, int left, int right) function main (line 130) | void main() FILE: ru/codes/dart/chapter_sorting/radix_sort.dart function digit (line 8) | int digit(int _num, int exp) function countingSortDigit (line 14) | void countingSortDigit(List nums, int exp) function radixSort (line 40) | void radixSort(List nums) function main (line 55) | void main() FILE: ru/codes/dart/chapter_sorting/selection_sort.dart function selectionSort (line 8) | void selectionSort(List nums) function main (line 25) | void main() FILE: ru/codes/dart/chapter_stack_and_queue/array_deque.dart class ArrayDeque (line 8) | class ArrayDeque { method capacity (line 20) | int capacity() method size (line 25) | int size() method isEmpty (line 30) | bool isEmpty() method index (line 35) | int index(int i) method pushFirst (line 43) | void pushFirst(int _num) method pushLast (line 56) | void pushLast(int _num) method popFirst (line 68) | int popFirst() method popLast (line 77) | int popLast() method peekFirst (line 84) | int peekFirst() method peekLast (line 92) | int peekLast() method toArray (line 102) | List toArray() function main (line 113) | void main() FILE: ru/codes/dart/chapter_stack_and_queue/array_queue.dart class ArrayQueue (line 8) | class ArrayQueue { method capaCity (line 19) | int capaCity() method size (line 24) | int size() method isEmpty (line 29) | bool isEmpty() method push (line 34) | void push(int _num) method pop (line 47) | int pop() method peek (line 56) | int peek() method toArray (line 64) | List toArray() function main (line 75) | void main() FILE: ru/codes/dart/chapter_stack_and_queue/array_stack.dart class ArrayStack (line 8) | class ArrayStack { method size (line 15) | int size() method isEmpty (line 20) | bool isEmpty() method push (line 25) | void push(int _num) method pop (line 30) | int pop() method peek (line 38) | int peek() method toArray (line 46) | List toArray() function main (line 50) | void main() FILE: ru/codes/dart/chapter_stack_and_queue/deque.dart function main (line 9) | void main() FILE: ru/codes/dart/chapter_stack_and_queue/linkedlist_deque.dart class ListNode (line 8) | class ListNode { class LinkedListDeque (line 17) | class LinkedListDeque { method size (line 28) | int size() method isEmpty (line 33) | bool isEmpty() method push (line 38) | void push(int _num, bool isFront) method pushFirst (line 60) | void pushFirst(int _num) method pushLast (line 65) | void pushLast(int _num) method pop (line 70) | int? pop(bool isFront) method popFirst (line 102) | int? popFirst() method popLast (line 107) | int? popLast() method peekFirst (line 112) | int? peekFirst() method peekLast (line 117) | int? peekLast() method toArray (line 122) | List toArray() function main (line 134) | void main() FILE: ru/codes/dart/chapter_stack_and_queue/linkedlist_queue.dart class LinkedListQueue (line 10) | class LinkedListQueue { method size (line 21) | int size() method isEmpty (line 26) | bool isEmpty() method push (line 31) | void push(int _num) method pop (line 47) | int pop() method peek (line 56) | int peek() method toArray (line 64) | List toArray() function main (line 76) | void main() FILE: ru/codes/dart/chapter_stack_and_queue/linkedlist_stack.dart class LinkedListStack (line 10) | class LinkedListStack { method size (line 19) | int size() method isEmpty (line 24) | bool isEmpty() method push (line 29) | void push(int _num) method pop (line 37) | int pop() method peek (line 45) | int peek() method toList (line 53) | List toList() function main (line 66) | void main() FILE: ru/codes/dart/chapter_stack_and_queue/queue.dart function main (line 9) | void main() FILE: ru/codes/dart/chapter_stack_and_queue/stack.dart function main (line 7) | void main() FILE: ru/codes/dart/chapter_tree/array_binary_tree.dart class ArrayBinaryTree (line 11) | class ArrayBinaryTree { method size (line 18) | int size() method val (line 23) | int? val(int i) method left (line 32) | int? left(int i) method right (line 37) | int? right(int i) method parent (line 42) | int? parent(int i) method levelOrder (line 47) | List levelOrder() method dfs (line 58) | void dfs(int i, String order, List res) method preOrder (line 80) | List preOrder() method inOrder (line 87) | List inOrder() method postOrder (line 94) | List postOrder() function main (line 102) | void main() FILE: ru/codes/dart/chapter_tree/avl_tree.dart class AVLTree (line 11) | class AVLTree { method height (line 20) | int height(TreeNode? node) method updateHeight (line 26) | void updateHeight(TreeNode? node) method balanceFactor (line 32) | int balanceFactor(TreeNode? node) method rightRotate (line 40) | TreeNode? rightRotate(TreeNode? node) method leftRotate (line 54) | TreeNode? leftRotate(TreeNode? node) method rotate (line 68) | TreeNode? rotate(TreeNode? node) method insert (line 98) | void insert(int val) method insertHelper (line 103) | TreeNode? insertHelper(TreeNode? node, int val) method remove (line 120) | void remove(int val) method removeHelper (line 125) | TreeNode? removeHelper(TreeNode? node, int val) method search (line 159) | TreeNode? search(int val) function testInsert (line 177) | void testInsert(AVLTree tree, int val) function testRemove (line 183) | void testRemove(AVLTree tree, int val) function main (line 190) | void main() FILE: ru/codes/dart/chapter_tree/binary_search_tree.dart class BinarySearchTree (line 11) | class BinarySearchTree { method getRoot (line 21) | TreeNode? getRoot() method search (line 26) | TreeNode? search(int _num) method insert (line 45) | void insert(int _num) method remove (line 74) | void remove(int _num) function main (line 123) | void main() FILE: ru/codes/dart/chapter_tree/binary_tree.dart function main (line 10) | void main() FILE: ru/codes/dart/chapter_tree/binary_tree_bfs.dart function levelOrder (line 12) | List levelOrder(TreeNode? root) function main (line 28) | void main() FILE: ru/codes/dart/chapter_tree/binary_tree_dfs.dart function preOrder (line 14) | void preOrder(TreeNode? node) function inOrder (line 23) | void inOrder(TreeNode? node) function postOrder (line 32) | void postOrder(TreeNode? node) function main (line 41) | void main() FILE: ru/codes/dart/utils/list_node.dart class ListNode (line 8) | class ListNode { function listToLinkedList (line 16) | ListNode? listToLinkedList(List list) FILE: ru/codes/dart/utils/print_util.dart class Trunk (line 12) | class Trunk { function printMatrix (line 20) | void printMatrix(List> matrix) function printLinkedList (line 29) | void printLinkedList(ListNode? head) function printTree (line 45) | void printTree(TreeNode? root, [Trunk? prev = null, bool isRight = false]) function showTrunks (line 75) | void showTrunks(Trunk? p) function printHeap (line 85) | void printHeap(List heap) FILE: ru/codes/dart/utils/tree_node.dart class TreeNode (line 8) | class TreeNode { function listToTreeDFS (line 19) | TreeNode? listToTreeDFS(List arr, int i) function listToTree (line 30) | TreeNode? listToTree(List arr) function treeToListDFS (line 35) | void treeToListDFS(TreeNode? root, int i, List res) function treeToList (line 46) | List treeToList(TreeNode? root) FILE: ru/codes/dart/utils/vertex.dart class Vertex (line 8) | class Vertex { method valsToVets (line 13) | List valsToVets(List vals) method vetsToVals (line 22) | List vetsToVals(List vets) FILE: ru/codes/go/chapter_array_and_linkedlist/array.go function randomAccess (line 12) | func randomAccess(nums []int) (randomNum int) { function extend (line 21) | func extend(nums []int, enlarge int) []int { function insert (line 33) | func insert(nums []int, num int, index int) { function remove (line 43) | func remove(nums []int, index int) { function traverse (line 51) | func traverse(nums []int) { function find (line 70) | func find(nums []int, target int) (index int) { FILE: ru/codes/go/chapter_array_and_linkedlist/array_test.go function TestArray (line 18) | func TestArray(t *testing.T) { FILE: ru/codes/go/chapter_array_and_linkedlist/linked_list.go function insertNode (line 12) | func insertNode(n0 *ListNode, P *ListNode) { function removeItem (line 19) | func removeItem(n0 *ListNode) { function access (line 30) | func access(head *ListNode, index int) *ListNode { function findNode (line 41) | func findNode(head *ListNode, target int) int { FILE: ru/codes/go/chapter_array_and_linkedlist/linked_list_test.go function TestLinkedList (line 14) | func TestLinkedList(t *testing.T) { FILE: ru/codes/go/chapter_array_and_linkedlist/list_test.go function TestList (line 14) | func TestList(t *testing.T) { FILE: ru/codes/go/chapter_array_and_linkedlist/my_list.go type myList (line 8) | type myList struct method size (line 26) | func (l *myList) size() int { method capacity (line 31) | func (l *myList) capacity() int { method get (line 36) | func (l *myList) get(index int) int { method set (line 45) | func (l *myList) set(num, index int) { method add (line 53) | func (l *myList) add(num int) { method insert (line 64) | func (l *myList) insert(num, index int) { method remove (line 82) | func (l *myList) remove(index int) int { method extendCapacity (line 98) | func (l *myList) extendCapacity() { method toArray (line 106) | func (l *myList) toArray() []int { function newMyList (line 16) | func newMyList() *myList { FILE: ru/codes/go/chapter_array_and_linkedlist/my_list_test.go function TestMyList (line 13) | func TestMyList(t *testing.T) { FILE: ru/codes/go/chapter_backtracking/n_queens.go function backtrack (line 8) | func backtrack(row, n int, state *[][]string, res *[][][]string, cols, d... function nQueens (line 40) | func nQueens(n int) [][][]string { FILE: ru/codes/go/chapter_backtracking/n_queens_test.go function TestNQueens (line 12) | func TestNQueens(t *testing.T) { FILE: ru/codes/go/chapter_backtracking/permutation_test.go function TestPermutationI (line 14) | func TestPermutationI(t *testing.T) { function TestPermutationII (line 25) | func TestPermutationII(t *testing.T) { FILE: ru/codes/go/chapter_backtracking/permutations_i.go function backtrackI (line 8) | func backtrackI(state *[]int, choices *[]int, selected *[]bool, res *[][... function permutationsI (line 32) | func permutationsI(nums []int) [][]int { FILE: ru/codes/go/chapter_backtracking/permutations_ii.go function backtrackII (line 8) | func backtrackII(state *[]int, choices *[]int, selected *[]bool, res *[]... function permutationsII (line 35) | func permutationsII(nums []int) [][]int { FILE: ru/codes/go/chapter_backtracking/preorder_traversal_i_compact.go function preOrderI (line 12) | func preOrderI(root *TreeNode, res *[]*TreeNode) { FILE: ru/codes/go/chapter_backtracking/preorder_traversal_ii_compact.go function preOrderII (line 12) | func preOrderII(root *TreeNode, res *[][]*TreeNode, path *[]*TreeNode) { FILE: ru/codes/go/chapter_backtracking/preorder_traversal_iii_compact.go function preOrderIII (line 12) | func preOrderIII(root *TreeNode, res *[][]*TreeNode, path *[]*TreeNode) { FILE: ru/codes/go/chapter_backtracking/preorder_traversal_iii_template.go function isSolution (line 12) | func isSolution(state *[]*TreeNode) bool { function recordSolution (line 17) | func recordSolution(state *[]*TreeNode, res *[][]*TreeNode) { function isValid (line 22) | func isValid(state *[]*TreeNode, choice *TreeNode) bool { function makeChoice (line 27) | func makeChoice(state *[]*TreeNode, choice *TreeNode) { function undoChoice (line 32) | func undoChoice(state *[]*TreeNode, choice *TreeNode) { function backtrackIII (line 37) | func backtrackIII(state *[]*TreeNode, choices *[]*TreeNode, res *[][]*Tr... FILE: ru/codes/go/chapter_backtracking/preorder_traversal_test.go function TestPreorderTraversalICompact (line 14) | func TestPreorderTraversalICompact(t *testing.T) { function TestPreorderTraversalIICompact (line 31) | func TestPreorderTraversalIICompact(t *testing.T) { function TestPreorderTraversalIIICompact (line 51) | func TestPreorderTraversalIIICompact(t *testing.T) { function TestPreorderTraversalIIITemplate (line 71) | func TestPreorderTraversalIIITemplate(t *testing.T) { FILE: ru/codes/go/chapter_backtracking/subset_sum_i.go function backtrackSubsetSumI (line 10) | func backtrackSubsetSumI(start, target int, state, choices *[]int, res *... function subsetSumI (line 35) | func subsetSumI(nums []int, target int) [][]int { FILE: ru/codes/go/chapter_backtracking/subset_sum_i_naive.go function backtrackSubsetSumINaive (line 8) | func backtrackSubsetSumINaive(total, target int, state, choices *[]int, ... function subsetSumINaive (line 31) | func subsetSumINaive(nums []int, target int) [][]int { FILE: ru/codes/go/chapter_backtracking/subset_sum_ii.go function backtrackSubsetSumII (line 10) | func backtrackSubsetSumII(start, target int, state, choices *[]int, res ... function subsetSumII (line 40) | func subsetSumII(nums []int, target int) [][]int { FILE: ru/codes/go/chapter_backtracking/subset_sum_test.go function TestSubsetSumINaive (line 15) | func TestSubsetSumINaive(t *testing.T) { function TestSubsetSumI (line 30) | func TestSubsetSumI(t *testing.T) { function TestSubsetSumII (line 44) | func TestSubsetSumII(t *testing.T) { FILE: ru/codes/go/chapter_computational_complexity/iteration.go function forLoop (line 10) | func forLoop(n int) int { function whileLoop (line 20) | func whileLoop(n int) int { function whileLoopII (line 34) | func whileLoopII(n int) int { function nestedForLoop (line 49) | func nestedForLoop(n int) string { FILE: ru/codes/go/chapter_computational_complexity/iteration_test.go function TestIteration (line 13) | func TestIteration(t *testing.T) { FILE: ru/codes/go/chapter_computational_complexity/recursion.go function recur (line 10) | func recur(n int) int { function forLoopRecur (line 22) | func forLoopRecur(n int) int { function tailRecur (line 42) | func tailRecur(n int, res int) int { function fib (line 52) | func fib(n int) int { FILE: ru/codes/go/chapter_computational_complexity/recursion_test.go function TestRecursion (line 13) | func TestRecursion(t *testing.T) { FILE: ru/codes/go/chapter_computational_complexity/space_complexity.go type node (line 15) | type node struct function newNode (line 21) | func newNode(val int) *node { function function (line 26) | func function() int { function spaceConstant (line 32) | func spaceConstant(n int) { function spaceLinear (line 54) | func spaceLinear(n int) { function spaceLinearRecur (line 70) | func spaceLinearRecur(n int) { function spaceQuadratic (line 79) | func spaceQuadratic(n int) { function spaceQuadraticRecur (line 88) | func spaceQuadraticRecur(n int) int { function buildTree (line 98) | func buildTree(n int) *TreeNode { FILE: ru/codes/go/chapter_computational_complexity/space_complexity_test.go function TestSpaceComplexity (line 13) | func TestSpaceComplexity(t *testing.T) { FILE: ru/codes/go/chapter_computational_complexity/time_complexity.go function constant (line 8) | func constant(n int) int { function linear (line 18) | func linear(n int) int { function arrayTraversal (line 27) | func arrayTraversal(nums []int) int { function quadratic (line 37) | func quadratic(n int) int { function bubbleSort (line 49) | func bubbleSort(nums []int) int { function exponential (line 68) | func exponential(n int) int { function expRecur (line 82) | func expRecur(n int) int { function logarithmic (line 90) | func logarithmic(n int) int { function logRecur (line 100) | func logRecur(n int) int { function linearLogRecur (line 108) | func linearLogRecur(n int) int { function factorialRecur (line 120) | func factorialRecur(n int) int { FILE: ru/codes/go/chapter_computational_complexity/time_complexity_test.go function TestTimeComplexity (line 12) | func TestTimeComplexity(t *testing.T) { FILE: ru/codes/go/chapter_computational_complexity/worst_best_time_complexity.go function randomNumbers (line 12) | func randomNumbers(n int) []int { function findOne (line 26) | func findOne(nums []int) int { FILE: ru/codes/go/chapter_computational_complexity/worst_best_time_complexity_test.go function TestWorstBestTimeComplexity (line 12) | func TestWorstBestTimeComplexity(t *testing.T) { FILE: ru/codes/go/chapter_divide_and_conquer/binary_search_recur.go function dfs (line 8) | func dfs(nums []int, target, i, j int) int { function binarySearch (line 31) | func binarySearch(nums []int, target int) int { FILE: ru/codes/go/chapter_divide_and_conquer/binary_search_recur_test.go function TestBinarySearch (line 12) | func TestBinarySearch(t *testing.T) { FILE: ru/codes/go/chapter_divide_and_conquer/build_tree.go function dfsBuildTree (line 10) | func dfsBuildTree(preorder []int, inorderMap map[int]int, i, l, r int) *... function buildTree (line 28) | func buildTree(preorder, inorder []int) *TreeNode { FILE: ru/codes/go/chapter_divide_and_conquer/build_tree_test.go function TestBuildTree (line 14) | func TestBuildTree(t *testing.T) { FILE: ru/codes/go/chapter_divide_and_conquer/hanota.go function move (line 10) | func move(src, tar *list.List) { function dfsHanota (line 20) | func dfsHanota(i int, src, buf, tar *list.List) { function solveHanota (line 35) | func solveHanota(A, B, C *list.List) { FILE: ru/codes/go/chapter_divide_and_conquer/hanota_test.go function TestHanota (line 15) | func TestHanota(t *testing.T) { FILE: ru/codes/go/chapter_dynamic_programming/climbing_stairs_backtrack.go function backtrack (line 8) | func backtrack(choices []int, state, n int, res []int) { function climbingStairsBacktrack (line 26) | func climbingStairsBacktrack(n int) int { FILE: ru/codes/go/chapter_dynamic_programming/climbing_stairs_constraint_dp.go function climbingStairsConstraintDP (line 8) | func climbingStairsConstraintDP(n int) int { FILE: ru/codes/go/chapter_dynamic_programming/climbing_stairs_dfs.go function dfs (line 8) | func dfs(i int) int { function climbingStairsDFS (line 19) | func climbingStairsDFS(n int) int { FILE: ru/codes/go/chapter_dynamic_programming/climbing_stairs_dfs_mem.go function dfsMem (line 8) | func dfsMem(i int, mem []int) int { function climbingStairsDFSMem (line 25) | func climbingStairsDFSMem(n int) int { FILE: ru/codes/go/chapter_dynamic_programming/climbing_stairs_dp.go function climbingStairsDP (line 8) | func climbingStairsDP(n int) int { function climbingStairsDPComp (line 25) | func climbingStairsDPComp(n int) int { FILE: ru/codes/go/chapter_dynamic_programming/climbing_stairs_test.go function TestClimbingStairsBacktrack (line 12) | func TestClimbingStairsBacktrack(t *testing.T) { function TestClimbingStairsDFS (line 18) | func TestClimbingStairsDFS(t *testing.T) { function TestClimbingStairsDFSMem (line 24) | func TestClimbingStairsDFSMem(t *testing.T) { function TestClimbingStairsDP (line 30) | func TestClimbingStairsDP(t *testing.T) { function TestClimbingStairsDPComp (line 36) | func TestClimbingStairsDPComp(t *testing.T) { function TestClimbingStairsConstraintDP (line 42) | func TestClimbingStairsConstraintDP(t *testing.T) { function TestMinCostClimbingStairsDPComp (line 48) | func TestMinCostClimbingStairsDPComp(t *testing.T) { FILE: ru/codes/go/chapter_dynamic_programming/coin_change.go function coinChangeDP (line 10) | func coinChangeDP(coins []int, amt int) int { function coinChangeDPComp (line 41) | func coinChangeDPComp(coins []int, amt int) int { FILE: ru/codes/go/chapter_dynamic_programming/coin_change_ii.go function coinChangeIIDP (line 8) | func coinChangeIIDP(coins []int, amt int) int { function coinChangeIIDPComp (line 35) | func coinChangeIIDPComp(coins []int, amt int) int { FILE: ru/codes/go/chapter_dynamic_programming/coin_change_test.go function TestCoinChange (line 12) | func TestCoinChange(t *testing.T) { FILE: ru/codes/go/chapter_dynamic_programming/edit_distance.go function editDistanceDFS (line 8) | func editDistanceDFS(s string, t string, i int, j int) int { function editDistanceDFSMem (line 34) | func editDistanceDFSMem(s string, t string, mem [][]int, i int, j int) i... function editDistanceDP (line 65) | func editDistanceDP(s string, t string) int { function editDistanceDPComp (line 95) | func editDistanceDPComp(s string, t string) int { function MinInt (line 124) | func MinInt(a, b int) int { FILE: ru/codes/go/chapter_dynamic_programming/edit_distance_test.go function TestEditDistanceDFS (line 12) | func TestEditDistanceDFS(test *testing.T) { FILE: ru/codes/go/chapter_dynamic_programming/knapsack.go function knapsackDFS (line 10) | func knapsackDFS(wgt, val []int, i, c int) int { function knapsackDFSMem (line 27) | func knapsackDFSMem(wgt, val []int, mem [][]int, i, c int) int { function knapsackDP (line 49) | func knapsackDP(wgt, val []int, cap int) int { function knapsackDPComp (line 72) | func knapsackDPComp(wgt, val []int, cap int) int { FILE: ru/codes/go/chapter_dynamic_programming/knapsack_test.go function TestKnapsack (line 12) | func TestKnapsack(t *testing.T) { function TestUnboundedKnapsack (line 42) | func TestUnboundedKnapsack(t *testing.T) { FILE: ru/codes/go/chapter_dynamic_programming/min_cost_climbing_stairs_dp.go function minCostClimbingStairsDP (line 8) | func minCostClimbingStairsDP(cost []int) int { function minCostClimbingStairsDPComp (line 32) | func minCostClimbingStairsDPComp(cost []int) int { FILE: ru/codes/go/chapter_dynamic_programming/min_path_sum.go function minPathSumDFS (line 10) | func minPathSumDFS(grid [][]int, i, j int) int { function minPathSumDFSMem (line 27) | func minPathSumDFSMem(grid, mem [][]int, i, j int) int { function minPathSumDP (line 49) | func minPathSumDP(grid [][]int) int { function minPathSumDPComp (line 75) | func minPathSumDPComp(grid [][]int) int { FILE: ru/codes/go/chapter_dynamic_programming/min_path_sum_test.go function TestMinPathSum (line 12) | func TestMinPathSum(t *testing.T) { FILE: ru/codes/go/chapter_dynamic_programming/unbounded_knapsack.go function unboundedKnapsackDP (line 10) | func unboundedKnapsackDP(wgt, val []int, cap int) int { function unboundedKnapsackDPComp (line 33) | func unboundedKnapsackDPComp(wgt, val []int, cap int) int { FILE: ru/codes/go/chapter_graph/graph_adjacency_list.go type graphAdjList (line 16) | type graphAdjList struct method size (line 36) | func (g *graphAdjList) size() int { method addEdge (line 41) | func (g *graphAdjList) addEdge(vet1 Vertex, vet2 Vertex) { method removeEdge (line 53) | func (g *graphAdjList) removeEdge(vet1 Vertex, vet2 Vertex) { method addVertex (line 65) | func (g *graphAdjList) addVertex(vet Vertex) { method removeVertex (line 75) | func (g *graphAdjList) removeVertex(vet Vertex) { method print (line 89) | func (g *graphAdjList) print() { function newGraphAdjList (line 22) | func newGraphAdjList(edges [][]Vertex) *graphAdjList { FILE: ru/codes/go/chapter_graph/graph_adjacency_list_test.go function TestGraphAdjList (line 14) | func TestGraphAdjList(t *testing.T) { FILE: ru/codes/go/chapter_graph/graph_adjacency_matrix.go type graphAdjMat (line 10) | type graphAdjMat struct method size (line 39) | func (g *graphAdjMat) size() int { method addVertex (line 44) | func (g *graphAdjMat) addVertex(val int) { method removeVertex (line 58) | func (g *graphAdjMat) removeVertex(index int) { method addEdge (line 74) | func (g *graphAdjMat) addEdge(i, j int) { method removeEdge (line 86) | func (g *graphAdjMat) removeEdge(i, j int) { method print (line 96) | func (g *graphAdjMat) print() { function newGraphAdjMat (line 18) | func newGraphAdjMat(vertices []int, edges [][]int) *graphAdjMat { FILE: ru/codes/go/chapter_graph/graph_adjacency_matrix_test.go function TestGraphAdjMat (line 12) | func TestGraphAdjMat(t *testing.T) { FILE: ru/codes/go/chapter_graph/graph_bfs.go function graphBFS (line 13) | func graphBFS(g *graphAdjList, startVet Vertex) []Vertex { FILE: ru/codes/go/chapter_graph/graph_bfs_test.go function TestGraphBFS (line 14) | func TestGraphBFS(t *testing.T) { FILE: ru/codes/go/chapter_graph/graph_dfs.go function dfs (line 12) | func dfs(g *graphAdjList, visited map[Vertex]struct{}, res *[]Vertex, ve... function graphDFS (line 28) | func graphDFS(g *graphAdjList, startVet Vertex) []Vertex { FILE: ru/codes/go/chapter_graph/graph_dfs_test.go function TestGraphDFS (line 14) | func TestGraphDFS(t *testing.T) { FILE: ru/codes/go/chapter_greedy/coin_change_greedy.go function coinChangeGreedy (line 8) | func coinChangeGreedy(coins []int, amt int) int { FILE: ru/codes/go/chapter_greedy/coin_change_greedy_test.go function TestCoinChangeGreedy (line 12) | func TestCoinChangeGreedy(t *testing.T) { FILE: ru/codes/go/chapter_greedy/fractional_knapsack.go type Item (line 10) | type Item struct function fractionalKnapsack (line 16) | func fractionalKnapsack(wgt []int, val []int, cap int) float64 { FILE: ru/codes/go/chapter_greedy/fractional_knapsack_test.go function TestFractionalKnapsack (line 12) | func TestFractionalKnapsack(t *testing.T) { FILE: ru/codes/go/chapter_greedy/max_capacity.go function maxCapacity (line 10) | func maxCapacity(ht []int) int { FILE: ru/codes/go/chapter_greedy/max_capacity_test.go function TestMaxCapacity (line 12) | func TestMaxCapacity(t *testing.T) { FILE: ru/codes/go/chapter_greedy/max_product_cutting.go function maxProductCutting (line 10) | func maxProductCutting(n int) int { FILE: ru/codes/go/chapter_greedy/max_product_cutting_test.go function TestMaxProductCutting (line 12) | func TestMaxProductCutting(t *testing.T) { FILE: ru/codes/go/chapter_hashing/array_hash_map.go type pair (line 10) | type pair struct type arrayHashMap (line 16) | type arrayHashMap struct method hashFunc (line 28) | func (a *arrayHashMap) hashFunc(key int) int { method get (line 34) | func (a *arrayHashMap) get(key int) string { method put (line 44) | func (a *arrayHashMap) put(key int, val string) { method remove (line 51) | func (a *arrayHashMap) remove(key int) { method pairSet (line 58) | func (a *arrayHashMap) pairSet() []*pair { method keySet (line 69) | func (a *arrayHashMap) keySet() []int { method valueSet (line 80) | func (a *arrayHashMap) valueSet() []string { method print (line 91) | func (a *arrayHashMap) print() { function newArrayHashMap (line 21) | func newArrayHashMap() *arrayHashMap { FILE: ru/codes/go/chapter_hashing/array_hash_map_test.go function TestArrayHashMap (line 12) | func TestArrayHashMap(t *testing.T) { FILE: ru/codes/go/chapter_hashing/hash_collision_test.go function TestHashMapChaining (line 12) | func TestHashMapChaining(t *testing.T) { function TestHashMapOpenAddressing (line 38) | func TestHashMapOpenAddressing(t *testing.T) { FILE: ru/codes/go/chapter_hashing/hash_map_chaining.go type hashMapChaining (line 14) | type hashMapChaining struct method hashFunc (line 38) | func (m *hashMapChaining) hashFunc(key int) int { method loadFactor (line 43) | func (m *hashMapChaining) loadFactor() float64 { method get (line 48) | func (m *hashMapChaining) get(key int) string { method put (line 62) | func (m *hashMapChaining) put(key int, val string) { method remove (line 85) | func (m *hashMapChaining) remove(key int) { method extend (line 99) | func (m *hashMapChaining) extend() { method print (line 122) | func (m *hashMapChaining) print() { function newHashMapChaining (line 23) | func newHashMapChaining() *hashMapChaining { FILE: ru/codes/go/chapter_hashing/hash_map_open_addressing.go type hashMapOpenAddressing (line 12) | type hashMapOpenAddressing struct method hashFunc (line 34) | func (h *hashMapOpenAddressing) hashFunc(key int) int { method loadFactor (line 39) | func (h *hashMapOpenAddressing) loadFactor() float64 { method findBucket (line 44) | func (h *hashMapOpenAddressing) findBucket(key int) int { method get (line 70) | func (h *hashMapOpenAddressing) get(key int) string { method put (line 79) | func (h *hashMapOpenAddressing) put(key int, val string) { method remove (line 93) | func (h *hashMapOpenAddressing) remove(key int) { method extend (line 102) | func (h *hashMapOpenAddressing) extend() { method print (line 116) | func (h *hashMapOpenAddressing) print() { function newHashMapOpenAddressing (line 22) | func newHashMapOpenAddressing() *hashMapOpenAddressing { FILE: ru/codes/go/chapter_hashing/hash_map_test.go function TestHashMap (line 15) | func TestHashMap(t *testing.T) { function TestSimpleHash (line 58) | func TestSimpleHash(t *testing.T) { FILE: ru/codes/go/chapter_hashing/simple_hash.go function addHash (line 10) | func addHash(key string) int { function mulHash (line 22) | func mulHash(key string) int { function xorHash (line 34) | func xorHash(key string) int { function rotHash (line 46) | func rotHash(key string) int { FILE: ru/codes/go/chapter_heap/heap.go type intHeap (line 9) | type intHeap method Push (line 12) | func (h *intHeap) Push(x any) { method Pop (line 19) | func (h *intHeap) Pop() any { method Len (line 27) | func (h *intHeap) Len() int { method Less (line 32) | func (h *intHeap) Less(i, j int) bool { method Swap (line 38) | func (h *intHeap) Swap(i, j int) { method Top (line 43) | func (h *intHeap) Top() any { FILE: ru/codes/go/chapter_heap/heap_test.go function testPush (line 16) | func testPush(h *intHeap, val int) { function testPop (line 23) | func testPop(h *intHeap) { function TestHeap (line 30) | func TestHeap(t *testing.T) { function TestMyHeap (line 62) | func TestMyHeap(t *testing.T) { function TestTopKHeap (line 93) | func TestTopKHeap(t *testing.T) { FILE: ru/codes/go/chapter_heap/my_heap.go type maxHeap (line 13) | type maxHeap struct method left (line 37) | func (h *maxHeap) left(i int) int { method right (line 42) | func (h *maxHeap) right(i int) int { method parent (line 47) | func (h *maxHeap) parent(i int) int { method swap (line 53) | func (h *maxHeap) swap(i, j int) { method size (line 58) | func (h *maxHeap) size() int { method isEmpty (line 63) | func (h *maxHeap) isEmpty() bool { method peek (line 68) | func (h *maxHeap) peek() any { method push (line 73) | func (h *maxHeap) push(val any) { method siftUp (line 81) | func (h *maxHeap) siftUp(i int) { method pop (line 97) | func (h *maxHeap) pop() any { method siftDown (line 116) | func (h *maxHeap) siftDown(i int) { method print (line 138) | func (h *maxHeap) print() { function newHeap (line 19) | func newHeap() *maxHeap { function newMaxHeap (line 26) | func newMaxHeap(nums []any) *maxHeap { FILE: ru/codes/go/chapter_heap/top_k.go type minHeap (line 9) | type minHeap method Len (line 11) | func (h *minHeap) Len() int { return len(*h) } method Less (line 12) | func (h *minHeap) Less(i, j int) bool { return (*h)[i].(int) < (*h)[j]... method Swap (line 13) | func (h *minHeap) Swap(i, j int) { (*h)[i], (*h)[j] = (*h)[j], (*... method Push (line 16) | func (h *minHeap) Push(x any) { method Pop (line 21) | func (h *minHeap) Pop() any { method Top (line 29) | func (h *minHeap) Top() any { function topKHeap (line 34) | func topKHeap(nums []int, k int) *minHeap { FILE: ru/codes/go/chapter_searching/binary_search.go function binarySearch (line 8) | func binarySearch(nums []int, target int) int { function binarySearchLCRO (line 27) | func binarySearchLCRO(nums []int, target int) int { FILE: ru/codes/go/chapter_searching/binary_search_edge.go function binarySearchLeftEdge (line 8) | func binarySearchLeftEdge(nums []int, target int) int { function binarySearchRightEdge (line 20) | func binarySearchRightEdge(nums []int, target int) int { FILE: ru/codes/go/chapter_searching/binary_search_insertion.go function binarySearchInsertionSimple (line 8) | func binarySearchInsertionSimple(nums []int, target int) int { function binarySearchInsertion (line 30) | func binarySearchInsertion(nums []int, target int) int { FILE: ru/codes/go/chapter_searching/binary_search_test.go function TestBinarySearch (line 12) | func TestBinarySearch(t *testing.T) { function TestBinarySearchEdge (line 26) | func TestBinarySearchEdge(t *testing.T) { function TestBinarySearchInsertion (line 41) | func TestBinarySearchInsertion(t *testing.T) { FILE: ru/codes/go/chapter_searching/hashing_search.go function hashingSearchArray (line 10) | func hashingSearchArray(m map[int]int, target int) int { function hashingSearchLinkedList (line 21) | func hashingSearchLinkedList(m map[int]*ListNode, target int) *ListNode { FILE: ru/codes/go/chapter_searching/hashing_search_test.go function TestHashingSearch (line 14) | func TestHashingSearch(t *testing.T) { FILE: ru/codes/go/chapter_searching/linear_search.go function linearSearchArray (line 12) | func linearSearchArray(nums []int, target int) int { function linearSearchLinkedList (line 25) | func linearSearchLinkedList(node *ListNode, target int) *ListNode { FILE: ru/codes/go/chapter_searching/linear_search_test.go function TestLinearSearch (line 14) | func TestLinearSearch(t *testing.T) { FILE: ru/codes/go/chapter_searching/two_sum.go function twoSumBruteForce (line 8) | func twoSumBruteForce(nums []int, target int) []int { function twoSumHashTable (line 22) | func twoSumHashTable(nums []int, target int) []int { FILE: ru/codes/go/chapter_searching/two_sum_test.go function TestTwoSum (line 12) | func TestTwoSum(t *testing.T) { FILE: ru/codes/go/chapter_sorting/bubble_sort.go function bubbleSort (line 8) | func bubbleSort(nums []int) { function bubbleSortWithFlag (line 22) | func bubbleSortWithFlag(nums []int) { FILE: ru/codes/go/chapter_sorting/bubble_sort_test.go function TestBubbleSort (line 12) | func TestBubbleSort(t *testing.T) { FILE: ru/codes/go/chapter_sorting/bucket_sort.go function bucketSort (line 10) | func bucketSort(nums []float64) { FILE: ru/codes/go/chapter_sorting/bucket_sort_test.go function TestBucketSort (line 12) | func TestBucketSort(t *testing.T) { FILE: ru/codes/go/chapter_sorting/counting_sort.go type CountingSort (line 7) | type CountingSort struct function countingSortNaive (line 11) | func countingSortNaive(nums []int) { function countingSort (line 36) | func countingSort(nums []int) { FILE: ru/codes/go/chapter_sorting/counting_sort_test.go function TestCountingSort (line 12) | func TestCountingSort(t *testing.T) { FILE: ru/codes/go/chapter_sorting/heap_sort.go function siftDown (line 8) | func siftDown(nums *[]int, n, i int) { function heapSort (line 32) | func heapSort(nums *[]int) { FILE: ru/codes/go/chapter_sorting/heap_sort_test.go function TestHeapSort (line 12) | func TestHeapSort(t *testing.T) { FILE: ru/codes/go/chapter_sorting/insertion_sort.go function insertionSort (line 8) | func insertionSort(nums []int) { FILE: ru/codes/go/chapter_sorting/insertion_sort_test.go function TestInsertionSort (line 12) | func TestInsertionSort(t *testing.T) { FILE: ru/codes/go/chapter_sorting/merge_sort.go function merge (line 8) | func merge(nums []int, left, mid, right int) { function mergeSort (line 43) | func mergeSort(nums []int, left, right int) { FILE: ru/codes/go/chapter_sorting/merge_sort_test.go function TestMergeSort (line 12) | func TestMergeSort(t *testing.T) { FILE: ru/codes/go/chapter_sorting/quick_sort.go type quickSort (line 8) | type quickSort struct method partition (line 17) | func (q *quickSort) partition(nums []int, left, right int) int { method quickSort (line 36) | func (q *quickSort) quickSort(nums []int, left, right int) { type quickSortMedian (line 11) | type quickSortMedian struct method medianThree (line 49) | func (q *quickSortMedian) medianThree(nums []int, left, mid, right int... method partition (line 61) | func (q *quickSortMedian) partition(nums []int, left, right int) int { method quickSort (line 84) | func (q *quickSortMedian) quickSort(nums []int, left, right int) { type quickSortTailCall (line 14) | type quickSortTailCall struct method partition (line 97) | func (q *quickSortTailCall) partition(nums []int, left, right int) int { method quickSort (line 116) | func (q *quickSortTailCall) quickSort(nums []int, left, right int) { FILE: ru/codes/go/chapter_sorting/quick_sort_test.go function TestQuickSort (line 13) | func TestQuickSort(t *testing.T) { function TestQuickSortMedian (line 21) | func TestQuickSortMedian(t *testing.T) { function TestQuickSortTailCall (line 29) | func TestQuickSortTailCall(t *testing.T) { FILE: ru/codes/go/chapter_sorting/radix_sort.go function digit (line 10) | func digit(num, exp int) int { function countingSortDigit (line 16) | func countingSortDigit(nums []int, exp int) { function radixSort (line 44) | func radixSort(nums []int) { FILE: ru/codes/go/chapter_sorting/radix_sort_test.go function TestRadixSort (line 12) | func TestRadixSort(t *testing.T) { FILE: ru/codes/go/chapter_sorting/selection_sort.go function selectionSort (line 8) | func selectionSort(nums []int) { FILE: ru/codes/go/chapter_sorting/selection_sort_test.go function TestSelectionSort (line 12) | func TestSelectionSort(t *testing.T) { FILE: ru/codes/go/chapter_stack_and_queue/array_deque.go type arrayDeque (line 10) | type arrayDeque struct method size (line 28) | func (q *arrayDeque) size() int { method isEmpty (line 33) | func (q *arrayDeque) isEmpty() bool { method index (line 38) | func (q *arrayDeque) index(i int) int { method pushFirst (line 46) | func (q *arrayDeque) pushFirst(num int) { method pushLast (line 60) | func (q *arrayDeque) pushLast(num int) { method popFirst (line 73) | func (q *arrayDeque) popFirst() any { method popLast (line 85) | func (q *arrayDeque) popLast() any { method peekFirst (line 95) | func (q *arrayDeque) peekFirst() any { method peekLast (line 103) | func (q *arrayDeque) peekLast() any { method toSlice (line 113) | func (q *arrayDeque) toSlice() []int { function newArrayDeque (line 18) | func newArrayDeque(queCapacity int) *arrayDeque { FILE: ru/codes/go/chapter_stack_and_queue/array_queue.go type arrayQueue (line 8) | type arrayQueue struct method size (line 26) | func (q *arrayQueue) size() int { method isEmpty (line 31) | func (q *arrayQueue) isEmpty() bool { method push (line 36) | func (q *arrayQueue) push(num int) { method pop (line 50) | func (q *arrayQueue) pop() any { method peek (line 63) | func (q *arrayQueue) peek() any { method toSlice (line 71) | func (q *arrayQueue) toSlice() []int { function newArrayQueue (line 16) | func newArrayQueue(queCapacity int) *arrayQueue { FILE: ru/codes/go/chapter_stack_and_queue/array_stack.go type arrayStack (line 8) | type arrayStack struct method size (line 21) | func (s *arrayStack) size() int { method isEmpty (line 26) | func (s *arrayStack) isEmpty() bool { method push (line 31) | func (s *arrayStack) push(v int) { method pop (line 37) | func (s *arrayStack) pop() any { method peek (line 44) | func (s *arrayStack) peek() any { method toSlice (line 53) | func (s *arrayStack) toSlice() []int { function newArrayStack (line 13) | func newArrayStack() *arrayStack { FILE: ru/codes/go/chapter_stack_and_queue/deque_test.go function TestDeque (line 15) | func TestDeque(t *testing.T) { function TestArrayDeque (line 52) | func TestArrayDeque(t *testing.T) { function TestLinkedListDeque (line 95) | func TestLinkedListDeque(t *testing.T) { function BenchmarkLinkedListDeque (line 132) | func BenchmarkLinkedListDeque(b *testing.B) { FILE: ru/codes/go/chapter_stack_and_queue/linkedlist_deque.go type linkedListDeque (line 12) | type linkedListDeque struct method pushFirst (line 25) | func (s *linkedListDeque) pushFirst(value any) { method pushLast (line 30) | func (s *linkedListDeque) pushLast(value any) { method popFirst (line 35) | func (s *linkedListDeque) popFirst() any { method popLast (line 45) | func (s *linkedListDeque) popLast() any { method peekFirst (line 55) | func (s *linkedListDeque) peekFirst() any { method peekLast (line 64) | func (s *linkedListDeque) peekLast() any { method size (line 73) | func (s *linkedListDeque) size() int { method isEmpty (line 78) | func (s *linkedListDeque) isEmpty() bool { method toList (line 83) | func (s *linkedListDeque) toList() *list.List { function newLinkedListDeque (line 18) | func newLinkedListDeque() *linkedListDeque { FILE: ru/codes/go/chapter_stack_and_queue/linkedlist_queue.go type linkedListQueue (line 12) | type linkedListQueue struct method push (line 25) | func (s *linkedListQueue) push(value any) { method pop (line 30) | func (s *linkedListQueue) pop() any { method peek (line 40) | func (s *linkedListQueue) peek() any { method size (line 49) | func (s *linkedListQueue) size() int { method isEmpty (line 54) | func (s *linkedListQueue) isEmpty() bool { method toList (line 59) | func (s *linkedListQueue) toList() *list.List { function newLinkedListQueue (line 18) | func newLinkedListQueue() *linkedListQueue { FILE: ru/codes/go/chapter_stack_and_queue/linkedlist_stack.go type linkedListStack (line 12) | type linkedListStack struct method push (line 25) | func (s *linkedListStack) push(value int) { method pop (line 30) | func (s *linkedListStack) pop() any { method peek (line 40) | func (s *linkedListStack) peek() any { method size (line 49) | func (s *linkedListStack) size() int { method isEmpty (line 54) | func (s *linkedListStack) isEmpty() bool { method toList (line 59) | func (s *linkedListStack) toList() *list.List { function newLinkedListStack (line 18) | func newLinkedListStack() *linkedListStack { FILE: ru/codes/go/chapter_stack_and_queue/queue_test.go function TestQueue (line 15) | func TestQueue(t *testing.T) { function TestArrayQueue (line 48) | func TestArrayQueue(t *testing.T) { function TestLinkedListQueue (line 92) | func TestLinkedListQueue(t *testing.T) { function BenchmarkArrayQueue (line 124) | func BenchmarkArrayQueue(b *testing.B) { function BenchmarkLinkedQueue (line 137) | func BenchmarkLinkedQueue(b *testing.B) { FILE: ru/codes/go/chapter_stack_and_queue/stack_test.go function TestStack (line 14) | func TestStack(t *testing.T) { function TestArrayStack (line 47) | func TestArrayStack(t *testing.T) { function TestLinkedListStack (line 78) | func TestLinkedListStack(t *testing.T) { function BenchmarkArrayStack (line 109) | func BenchmarkArrayStack(b *testing.B) { function BenchmarkLinkedListStack (line 121) | func BenchmarkLinkedListStack(b *testing.B) { FILE: ru/codes/go/chapter_tree/array_binary_tree.go type arrayBinaryTree (line 8) | type arrayBinaryTree struct method size (line 20) | func (abt *arrayBinaryTree) size() int { method val (line 25) | func (abt *arrayBinaryTree) val(i int) any { method left (line 34) | func (abt *arrayBinaryTree) left(i int) int { method right (line 39) | func (abt *arrayBinaryTree) right(i int) int { method parent (line 44) | func (abt *arrayBinaryTree) parent(i int) int { method levelOrder (line 49) | func (abt *arrayBinaryTree) levelOrder() []any { method dfs (line 61) | func (abt *arrayBinaryTree) dfs(i int, order string, res *[]any) { method preOrder (line 83) | func (abt *arrayBinaryTree) preOrder() []any { method inOrder (line 90) | func (abt *arrayBinaryTree) inOrder() []any { method postOrder (line 97) | func (abt *arrayBinaryTree) postOrder() []any { function newArrayBinaryTree (line 13) | func newArrayBinaryTree(arr []any) *arrayBinaryTree { FILE: ru/codes/go/chapter_tree/array_binary_tree_test.go function TestArrayBinaryTree (line 14) | func TestArrayBinaryTree(t *testing.T) { FILE: ru/codes/go/chapter_tree/avl_tree.go type aVLTree (line 10) | type aVLTree struct method height (line 20) | func (t *aVLTree) height(node *TreeNode) int { method updateHeight (line 29) | func (t *aVLTree) updateHeight(node *TreeNode) { method balanceFactor (line 41) | func (t *aVLTree) balanceFactor(node *TreeNode) int { method rightRotate (line 51) | func (t *aVLTree) rightRotate(node *TreeNode) *TreeNode { method leftRotate (line 65) | func (t *aVLTree) leftRotate(node *TreeNode) *TreeNode { method rotate (line 79) | func (t *aVLTree) rotate(node *TreeNode) *TreeNode { method insert (line 110) | func (t *aVLTree) insert(val int) { method insertHelper (line 115) | func (t *aVLTree) insertHelper(node *TreeNode, val int) *TreeNode { method remove (line 137) | func (t *aVLTree) remove(val int) { method removeHelper (line 142) | func (t *aVLTree) removeHelper(node *TreeNode, val int) *TreeNode { method search (line 183) | func (t *aVLTree) search(val int) *TreeNode { function newAVLTree (line 15) | func newAVLTree() *aVLTree { FILE: ru/codes/go/chapter_tree/avl_tree_test.go function TestAVLTree (line 14) | func TestAVLTree(t *testing.T) { function testInsert (line 44) | func testInsert(tree *aVLTree, val int) { function testRemove (line 50) | func testRemove(tree *aVLTree, val int) { FILE: ru/codes/go/chapter_tree/binary_search_tree.go type binarySearchTree (line 11) | type binarySearchTree struct method getRoot (line 23) | func (bst *binarySearchTree) getRoot() *TreeNode { method search (line 28) | func (bst *binarySearchTree) search(num int) *TreeNode { method insert (line 48) | func (bst *binarySearchTree) insert(num int) { method remove (line 79) | func (bst *binarySearchTree) remove(num int) { method print (line 140) | func (bst *binarySearchTree) print() { function newBinarySearchTree (line 15) | func newBinarySearchTree() *binarySearchTree { FILE: ru/codes/go/chapter_tree/binary_search_tree_test.go function TestBinarySearchTree (line 12) | func TestBinarySearchTree(t *testing.T) { FILE: ru/codes/go/chapter_tree/binary_tree_bfs.go function levelOrder (line 14) | func levelOrder(root *TreeNode) []any { FILE: ru/codes/go/chapter_tree/binary_tree_bfs_test.go function TestLevelOrder (line 14) | func TestLevelOrder(t *testing.T) { FILE: ru/codes/go/chapter_tree/binary_tree_dfs.go function preOrder (line 14) | func preOrder(node *TreeNode) { function inOrder (line 25) | func inOrder(node *TreeNode) { function postOrder (line 36) | func postOrder(node *TreeNode) { FILE: ru/codes/go/chapter_tree/binary_tree_dfs_test.go function TestPreInPostOrderTraversal (line 14) | func TestPreInPostOrderTraversal(t *testing.T) { FILE: ru/codes/go/chapter_tree/binary_tree_test.go function TestBinaryTree (line 14) | func TestBinaryTree(t *testing.T) { FILE: ru/codes/go/pkg/list_node.go type ListNode (line 8) | type ListNode struct function NewListNode (line 14) | func NewListNode(v int) *ListNode { function ArrayToLinkedList (line 22) | func ArrayToLinkedList(arr []int) *ListNode { FILE: ru/codes/go/pkg/list_node_test.go function TestListNode (line 11) | func TestListNode(t *testing.T) { FILE: ru/codes/go/pkg/print_utils.go function PrintSlice (line 15) | func PrintSlice[T any](nums []T) { function PrintList (line 21) | func PrintList(list *list.List) { function PrintMap (line 37) | func PrintMap[K comparable, V any](m map[K]V) { function PrintHeap (line 44) | func PrintHeap(h []any) { function PrintLinkedList (line 53) | func PrintLinkedList(node *ListNode) { function PrintTree (line 67) | func PrintTree(root *TreeNode) { function printTreeHelper (line 74) | func printTreeHelper(root *TreeNode, prev *trunk, isRight bool) { type trunk (line 99) | type trunk struct function newTrunk (line 104) | func newTrunk(prev *trunk, str string) *trunk { function showTrunk (line 111) | func showTrunk(t *trunk) { FILE: ru/codes/go/pkg/tree_node.go type TreeNode (line 8) | type TreeNode struct function NewTreeNode (line 16) | func NewTreeNode(v any) *TreeNode { function SliceToTreeDFS (line 45) | func SliceToTreeDFS(arr []any, i int) *TreeNode { function SliceToTree (line 56) | func SliceToTree(arr []any) *TreeNode { function TreeToSliceDFS (line 61) | func TreeToSliceDFS(root *TreeNode, i int, res *[]any) { function TreeToSlice (line 74) | func TreeToSlice(root *TreeNode) []any { FILE: ru/codes/go/pkg/tree_node_test.go function TestTreeNode (line 12) | func TestTreeNode(t *testing.T) { FILE: ru/codes/go/pkg/vertex.go type Vertex (line 8) | type Vertex struct function NewVertex (line 13) | func NewVertex(val int) Vertex { function ValsToVets (line 20) | func ValsToVets(vals []int) []Vertex { function VetsToVals (line 29) | func VetsToVals(vets []Vertex) []int { function DeleteSliceElms (line 38) | func DeleteSliceElms[T any](a []T, elms ...T) []T { FILE: ru/codes/java/chapter_array_and_linkedlist/array.java class array (line 12) | public class array { method randomAccess (line 14) | static int randomAccess(int[] nums) { method extend (line 23) | static int[] extend(int[] nums, int enlarge) { method insert (line 35) | static void insert(int[] nums, int num, int index) { method remove (line 45) | static void remove(int[] nums, int index) { method traverse (line 53) | static void traverse(int[] nums) { method find (line 66) | static int find(int[] nums, int target) { method main (line 75) | public static void main(String[] args) { FILE: ru/codes/java/chapter_array_and_linkedlist/linked_list.java class linked_list (line 11) | public class linked_list { method insert (line 13) | static void insert(ListNode n0, ListNode P) { method remove (line 20) | static void remove(ListNode n0) { method access (line 30) | static ListNode access(ListNode head, int index) { method find (line 40) | static int find(ListNode head, int target) { method main (line 52) | public static void main(String[] args) { FILE: ru/codes/java/chapter_array_and_linkedlist/list.java class list (line 11) | public class list { method main (line 12) | public static void main(String[] args) { FILE: ru/codes/java/chapter_array_and_linkedlist/my_list.java class MyList (line 12) | class MyList { method MyList (line 19) | public MyList() { method size (line 24) | public int size() { method capacity (line 29) | public int capacity() { method get (line 34) | public int get(int index) { method set (line 42) | public void set(int index, int num) { method add (line 49) | public void add(int num) { method insert (line 59) | public void insert(int index, int num) { method remove (line 75) | public int remove(int index) { method extendCapacity (line 90) | public void extendCapacity() { method toArray (line 98) | public int[] toArray() { class my_list (line 109) | public class my_list { method main (line 111) | public static void main(String[] args) { FILE: ru/codes/java/chapter_backtracking/n_queens.java class n_queens (line 11) | public class n_queens { method backtrack (line 13) | public static void backtrack(int row, int n, List> state,... method nQueens (line 44) | public static List>> nQueens(int n) { method main (line 64) | public static void main(String[] args) { FILE: ru/codes/java/chapter_backtracking/permutations_i.java class permutations_i (line 11) | public class permutations_i { method backtrack (line 13) | public static void backtrack(List state, int[] choices, boole... method permutationsI (line 37) | static List> permutationsI(int[] nums) { method main (line 43) | public static void main(String[] args) { FILE: ru/codes/java/chapter_backtracking/permutations_ii.java class permutations_ii (line 11) | public class permutations_ii { method backtrack (line 13) | static void backtrack(List state, int[] choices, boolean[] se... method permutationsII (line 39) | static List> permutationsII(int[] nums) { method main (line 45) | public static void main(String[] args) { FILE: ru/codes/java/chapter_backtracking/preorder_traversal_i_compact.java class preorder_traversal_i_compact (line 12) | public class preorder_traversal_i_compact { method preOrder (line 16) | static void preOrder(TreeNode root) { method main (line 28) | public static void main(String[] args) { FILE: ru/codes/java/chapter_backtracking/preorder_traversal_ii_compact.java class preorder_traversal_ii_compact (line 12) | public class preorder_traversal_ii_compact { method preOrder (line 17) | static void preOrder(TreeNode root) { method main (line 33) | public static void main(String[] args) { FILE: ru/codes/java/chapter_backtracking/preorder_traversal_iii_compact.java class preorder_traversal_iii_compact (line 12) | public class preorder_traversal_iii_compact { method preOrder (line 17) | static void preOrder(TreeNode root) { method main (line 34) | public static void main(String[] args) { FILE: ru/codes/java/chapter_backtracking/preorder_traversal_iii_template.java class preorder_traversal_iii_template (line 12) | public class preorder_traversal_iii_template { method isSolution (line 14) | static boolean isSolution(List state) { method recordSolution (line 19) | static void recordSolution(List state, List> ... method isValid (line 24) | static boolean isValid(List state, TreeNode choice) { method makeChoice (line 29) | static void makeChoice(List state, TreeNode choice) { method undoChoice (line 34) | static void undoChoice(List state, TreeNode choice) { method backtrack (line 39) | static void backtrack(List state, List choices, Li... method main (line 59) | public static void main(String[] args) { FILE: ru/codes/java/chapter_backtracking/subset_sum_i.java class subset_sum_i (line 11) | public class subset_sum_i { method backtrack (line 13) | static void backtrack(List state, int target, int[] choices, ... method subsetSumI (line 37) | static List> subsetSumI(int[] nums, int target) { method main (line 46) | public static void main(String[] args) { FILE: ru/codes/java/chapter_backtracking/subset_sum_i_naive.java class subset_sum_i_naive (line 11) | public class subset_sum_i_naive { method backtrack (line 13) | static void backtrack(List state, int target, int total, int[... method subsetSumINaive (line 35) | static List> subsetSumINaive(int[] nums, int target) { method main (line 43) | public static void main(String[] args) { FILE: ru/codes/java/chapter_backtracking/subset_sum_ii.java class subset_sum_ii (line 11) | public class subset_sum_ii { method backtrack (line 13) | static void backtrack(List state, int target, int[] choices, ... method subsetSumII (line 42) | static List> subsetSumII(int[] nums, int target) { method main (line 51) | public static void main(String[] args) { FILE: ru/codes/java/chapter_computational_complexity/iteration.java class iteration (line 9) | public class iteration { method forLoop (line 11) | static int forLoop(int n) { method whileLoop (line 21) | static int whileLoop(int n) { method whileLoopII (line 33) | static int whileLoopII(int n) { method nestedForLoop (line 47) | static String nestedForLoop(int n) { method main (line 60) | public static void main(String[] args) { FILE: ru/codes/java/chapter_computational_complexity/recursion.java class recursion (line 11) | public class recursion { method recur (line 13) | static int recur(int n) { method forLoopRecur (line 24) | static int forLoopRecur(int n) { method tailRecur (line 43) | static int tailRecur(int n, int res) { method fib (line 52) | static int fib(int n) { method main (line 63) | public static void main(String[] args) { FILE: ru/codes/java/chapter_computational_complexity/space_complexity.java class space_complexity (line 12) | public class space_complexity { method function (line 14) | static int function() { method constant (line 20) | static void constant(int n) { method linear (line 37) | static void linear(int n) { method linearRecur (line 53) | static void linearRecur(int n) { method quadratic (line 61) | static void quadratic(int n) { method quadraticRecur (line 76) | static int quadraticRecur(int n) { method buildTree (line 86) | static TreeNode buildTree(int n) { method main (line 96) | public static void main(String[] args) { FILE: ru/codes/java/chapter_computational_complexity/time_complexity.java class time_complexity (line 9) | public class time_complexity { method constant (line 11) | static int constant(int n) { method linear (line 20) | static int linear(int n) { method arrayTraversal (line 28) | static int arrayTraversal(int[] nums) { method quadratic (line 38) | static int quadratic(int n) { method bubbleSort (line 50) | static int bubbleSort(int[] nums) { method exponential (line 69) | static int exponential(int n) { method expRecur (line 83) | static int expRecur(int n) { method logarithmic (line 90) | static int logarithmic(int n) { method logRecur (line 100) | static int logRecur(int n) { method linearLogRecur (line 107) | static int linearLogRecur(int n) { method factorialRecur (line 118) | static int factorialRecur(int n) { method main (line 130) | public static void main(String[] args) { FILE: ru/codes/java/chapter_computational_complexity/worst_best_time_complexity.java class worst_best_time_complexity (line 11) | public class worst_best_time_complexity { method randomNumbers (line 13) | static int[] randomNumbers(int n) { method findOne (line 30) | static int findOne(int[] nums) { method main (line 41) | public static void main(String[] args) { FILE: ru/codes/java/chapter_divide_and_conquer/binary_search_recur.java class binary_search_recur (line 9) | public class binary_search_recur { method dfs (line 11) | static int dfs(int[] nums, int target, int i, int j) { method binarySearch (line 31) | static int binarySearch(int[] nums, int target) { method main (line 37) | public static void main(String[] args) { FILE: ru/codes/java/chapter_divide_and_conquer/build_tree.java class build_tree (line 12) | public class build_tree { method dfs (line 14) | static TreeNode dfs(int[] preorder, Map inorderMap, ... method buildTree (line 31) | static TreeNode buildTree(int[] preorder, int[] inorder) { method main (line 41) | public static void main(String[] args) { FILE: ru/codes/java/chapter_divide_and_conquer/hanota.java class hanota (line 11) | public class hanota { method move (line 13) | static void move(List src, List tar) { method dfs (line 21) | static void dfs(int i, List src, List buf, List A, List B, List choices, int state, int n, ... method climbingStairsBacktrack (line 29) | public static int climbingStairsBacktrack(int n) { method main (line 38) | public static void main(String[] args) { FILE: ru/codes/java/chapter_dynamic_programming/climbing_stairs_constraint_dp.java class climbing_stairs_constraint_dp (line 9) | public class climbing_stairs_constraint_dp { method climbingStairsConstraintDP (line 11) | static int climbingStairsConstraintDP(int n) { method main (line 30) | public static void main(String[] args) { FILE: ru/codes/java/chapter_dynamic_programming/climbing_stairs_dfs.java class climbing_stairs_dfs (line 9) | public class climbing_stairs_dfs { method dfs (line 11) | public static int dfs(int i) { method climbingStairsDFS (line 21) | public static int climbingStairsDFS(int n) { method main (line 25) | public static void main(String[] args) { FILE: ru/codes/java/chapter_dynamic_programming/climbing_stairs_dfs_mem.java class climbing_stairs_dfs_mem (line 11) | public class climbing_stairs_dfs_mem { method dfs (line 13) | public static int dfs(int i, int[] mem) { method climbingStairsDFSMem (line 28) | public static int climbingStairsDFSMem(int n) { method main (line 35) | public static void main(String[] args) { FILE: ru/codes/java/chapter_dynamic_programming/climbing_stairs_dp.java class climbing_stairs_dp (line 9) | public class climbing_stairs_dp { method climbingStairsDP (line 11) | public static int climbingStairsDP(int n) { method climbingStairsDPComp (line 27) | public static int climbingStairsDPComp(int n) { method main (line 39) | public static void main(String[] args) { FILE: ru/codes/java/chapter_dynamic_programming/coin_change.java class coin_change (line 11) | public class coin_change { method coinChangeDP (line 13) | static int coinChangeDP(int[] coins, int amt) { method coinChangeDPComp (line 38) | static int coinChangeDPComp(int[] coins, int amt) { method main (line 60) | public static void main(String[] args) { FILE: ru/codes/java/chapter_dynamic_programming/coin_change_ii.java class coin_change_ii (line 9) | public class coin_change_ii { method coinChangeIIDP (line 11) | static int coinChangeIIDP(int[] coins, int amt) { method coinChangeIIDPComp (line 35) | static int coinChangeIIDPComp(int[] coins, int amt) { method main (line 55) | public static void main(String[] args) { FILE: ru/codes/java/chapter_dynamic_programming/edit_distance.java class edit_distance (line 11) | public class edit_distance { method editDistanceDFS (line 13) | static int editDistanceDFS(String s, String t, int i, int j) { method editDistanceDFSMem (line 35) | static int editDistanceDFSMem(String s, String t, int[][] mem, int i, ... method editDistanceDP (line 61) | static int editDistanceDP(String s, String t) { method editDistanceDPComp (line 87) | static int editDistanceDPComp(String s, String t) { method main (line 115) | public static void main(String[] args) { FILE: ru/codes/java/chapter_dynamic_programming/knapsack.java class knapsack (line 11) | public class knapsack { method knapsackDFS (line 14) | static int knapsackDFS(int[] wgt, int[] val, int i, int c) { method knapsackDFSMem (line 31) | static int knapsackDFSMem(int[] wgt, int[] val, int[][] mem, int i, in... method knapsackDP (line 53) | static int knapsackDP(int[] wgt, int[] val, int cap) { method knapsackDPComp (line 73) | static int knapsackDPComp(int[] wgt, int[] val, int cap) { method main (line 90) | public static void main(String[] args) { FILE: ru/codes/java/chapter_dynamic_programming/min_cost_climbing_stairs_dp.java class min_cost_climbing_stairs_dp (line 11) | public class min_cost_climbing_stairs_dp { method minCostClimbingStairsDP (line 13) | public static int minCostClimbingStairsDP(int[] cost) { method minCostClimbingStairsDPComp (line 30) | public static int minCostClimbingStairsDPComp(int[] cost) { method main (line 43) | public static void main(String[] args) { FILE: ru/codes/java/chapter_dynamic_programming/min_path_sum.java class min_path_sum (line 11) | public class min_path_sum { method minPathSumDFS (line 13) | static int minPathSumDFS(int[][] grid, int i, int j) { method minPathSumDFSMem (line 30) | static int minPathSumDFSMem(int[][] grid, int[][] mem, int i, int j) { method minPathSumDP (line 52) | static int minPathSumDP(int[][] grid) { method minPathSumDPComp (line 75) | static int minPathSumDPComp(int[][] grid) { method main (line 96) | public static void main(String[] args) { FILE: ru/codes/java/chapter_dynamic_programming/unbounded_knapsack.java class unbounded_knapsack (line 9) | public class unbounded_knapsack { method unboundedKnapsackDP (line 11) | static int unboundedKnapsackDP(int[] wgt, int[] val, int cap) { method unboundedKnapsackDPComp (line 31) | static int unboundedKnapsackDPComp(int[] wgt, int[] val, int cap) { method main (line 50) | public static void main(String[] args) { FILE: ru/codes/java/chapter_graph/graph_adjacency_list.java class GraphAdjList (line 13) | class GraphAdjList { method GraphAdjList (line 18) | public GraphAdjList(Vertex[][] edges) { method size (line 29) | public int size() { method addEdge (line 34) | public void addEdge(Vertex vet1, Vertex vet2) { method removeEdge (line 43) | public void removeEdge(Vertex vet1, Vertex vet2) { method addVertex (line 52) | public void addVertex(Vertex vet) { method removeVertex (line 60) | public void removeVertex(Vertex vet) { method print (line 72) | public void print() { class graph_adjacency_list (line 83) | public class graph_adjacency_list { method main (line 84) | public static void main(String[] args) { FILE: ru/codes/java/chapter_graph/graph_adjacency_matrix.java class GraphAdjMat (line 13) | class GraphAdjMat { method GraphAdjMat (line 18) | public GraphAdjMat(int[] vertices, int[][] edges) { method size (line 33) | public int size() { method addVertex (line 38) | public void addVertex(int val) { method removeVertex (line 55) | public void removeVertex(int index) { method addEdge (line 70) | public void addEdge(int i, int j) { method removeEdge (line 81) | public void removeEdge(int i, int j) { method print (line 90) | public void print() { class graph_adjacency_matrix (line 98) | public class graph_adjacency_matrix { method main (line 99) | public static void main(String[] args) { FILE: ru/codes/java/chapter_graph/graph_bfs.java class graph_bfs (line 12) | public class graph_bfs { method graphBFS (line 15) | static List graphBFS(GraphAdjList graph, Vertex startVet) { method main (line 40) | public static void main(String[] args) { FILE: ru/codes/java/chapter_graph/graph_dfs.java class graph_dfs (line 12) | public class graph_dfs { method dfs (line 14) | static void dfs(GraphAdjList graph, Set visited, List ... method graphDFS (line 28) | static List graphDFS(GraphAdjList graph, Vertex startVet) { method main (line 37) | public static void main(String[] args) { FILE: ru/codes/java/chapter_greedy/coin_change_greedy.java class coin_change_greedy (line 11) | public class coin_change_greedy { method coinChangeGreedy (line 13) | static int coinChangeGreedy(int[] coins, int amt) { method main (line 31) | public static void main(String[] args) { FILE: ru/codes/java/chapter_greedy/fractional_knapsack.java class Item (line 13) | class Item { method Item (line 17) | public Item(int w, int v) { class fractional_knapsack (line 23) | public class fractional_knapsack { method fractionalKnapsack (line 25) | static double fractionalKnapsack(int[] wgt, int[] val, int cap) { method main (line 50) | public static void main(String[] args) { FILE: ru/codes/java/chapter_greedy/max_capacity.java class max_capacity (line 9) | public class max_capacity { method maxCapacity (line 11) | static int maxCapacity(int[] ht) { method main (line 31) | public static void main(String[] args) { FILE: ru/codes/java/chapter_greedy/max_product_cutting.java class max_product_cutting (line 11) | public class max_product_cutting { method maxProductCutting (line 13) | public static int maxProductCutting(int n) { method main (line 33) | public static void main(String[] args) { FILE: ru/codes/java/chapter_hashing/array_hash_map.java class Pair (line 12) | class Pair { method Pair (line 16) | public Pair(int key, String val) { class ArrayHashMap (line 23) | class ArrayHashMap { method ArrayHashMap (line 26) | public ArrayHashMap() { method hashFunc (line 35) | private int hashFunc(int key) { method get (line 41) | public String get(int key) { method put (line 50) | public void put(int key, String val) { method remove (line 57) | public void remove(int key) { method pairSet (line 64) | public List pairSet() { method keySet (line 74) | public List keySet() { method valueSet (line 84) | public List valueSet() { method print (line 94) | public void print() { class array_hash_map (line 101) | public class array_hash_map { method main (line 102) | public static void main(String[] args) { FILE: ru/codes/java/chapter_hashing/built_in_hash.java class built_in_hash (line 12) | public class built_in_hash { method main (line 13) | public static void main(String[] args) { FILE: ru/codes/java/chapter_hashing/hash_map.java class hash_map (line 12) | public class hash_map { method main (line 13) | public static void main(String[] args) { FILE: ru/codes/java/chapter_hashing/hash_map_chaining.java class HashMapChaining (line 13) | class HashMapChaining { method HashMapChaining (line 21) | public HashMapChaining() { method hashFunc (line 33) | int hashFunc(int key) { method loadFactor (line 38) | double loadFactor() { method get (line 43) | String get(int key) { method put (line 57) | void put(int key, String val) { method remove (line 78) | void remove(int key) { method extend (line 92) | void extend() { method print (line 111) | void print() { class hash_map_chaining (line 122) | public class hash_map_chaining { method main (line 123) | public static void main(String[] args) { FILE: ru/codes/java/chapter_hashing/hash_map_open_addressing.java class HashMapOpenAddressing (line 10) | class HashMapOpenAddressing { method HashMapOpenAddressing (line 19) | public HashMapOpenAddressing() { method hashFunc (line 25) | private int hashFunc(int key) { method loadFactor (line 30) | private double loadFactor() { method findBucket (line 35) | private int findBucket(int key) { method get (line 62) | public String get(int key) { method put (line 74) | public void put(int key, String val) { method remove (line 92) | public void remove(int key) { method extend (line 103) | private void extend() { method print (line 119) | public void print() { class hash_map_open_addressing (line 132) | public class hash_map_open_addressing { method main (line 133) | public static void main(String[] args) { FILE: ru/codes/java/chapter_hashing/simple_hash.java class simple_hash (line 9) | public class simple_hash { method addHash (line 11) | static int addHash(String key) { method mulHash (line 21) | static int mulHash(String key) { method xorHash (line 31) | static int xorHash(String key) { method rotHash (line 41) | static int rotHash(String key) { method main (line 50) | public static void main(String[] args) { FILE: ru/codes/java/chapter_heap/heap.java class heap (line 12) | public class heap { method testPush (line 13) | public static void testPush(Queue heap, int val) { method testPop (line 19) | public static void testPop(Queue heap) { method main (line 25) | public static void main(String[] args) { FILE: ru/codes/java/chapter_heap/my_heap.java class MaxHeap (line 13) | class MaxHeap { method MaxHeap (line 18) | public MaxHeap(List nums) { method left (line 28) | private int left(int i) { method right (line 33) | private int right(int i) { method parent (line 38) | private int parent(int i) { method swap (line 43) | private void swap(int i, int j) { method size (line 50) | public int size() { method isEmpty (line 55) | public boolean isEmpty() { method peek (line 60) | public int peek() { method push (line 65) | public void push(int val) { method siftUp (line 73) | private void siftUp(int i) { method pop (line 88) | public int pop() { method siftDown (line 103) | private void siftDown(int i) { method print (line 122) | public void print() { class my_heap (line 129) | public class my_heap { method main (line 130) | public static void main(String[] args) { FILE: ru/codes/java/chapter_heap/top_k.java class top_k (line 12) | public class top_k { method topKHeap (line 14) | static Queue topKHeap(int[] nums, int k) { method main (line 32) | public static void main(String[] args) { FILE: ru/codes/java/chapter_searching/binary_search.java class binary_search (line 9) | public class binary_search { method binarySearch (line 11) | static int binarySearch(int[] nums, int target) { method binarySearchLCRO (line 29) | static int binarySearchLCRO(int[] nums, int target) { method main (line 46) | public static void main(String[] args) { FILE: ru/codes/java/chapter_searching/binary_search_edge.java class binary_search_edge (line 9) | public class binary_search_edge { method binarySearchLeftEdge (line 11) | static int binarySearchLeftEdge(int[] nums, int target) { method binarySearchRightEdge (line 23) | static int binarySearchRightEdge(int[] nums, int target) { method main (line 36) | public static void main(String[] args) { FILE: ru/codes/java/chapter_searching/binary_search_insertion.java class binary_search_insertion (line 9) | class binary_search_insertion { method binarySearchInsertionSimple (line 11) | static int binarySearchInsertionSimple(int[] nums, int target) { method binarySearchInsertion (line 28) | static int binarySearchInsertion(int[] nums, int target) { method main (line 44) | public static void main(String[] args) { FILE: ru/codes/java/chapter_searching/hashing_search.java class hashing_search (line 12) | public class hashing_search { method hashingSearchArray (line 14) | static int hashingSearchArray(Map map, int target) { method hashingSearchLinkedList (line 21) | static ListNode hashingSearchLinkedList(Map map, in... method main (line 27) | public static void main(String[] args) { FILE: ru/codes/java/chapter_searching/linear_search.java class linear_search (line 11) | public class linear_search { method linearSearchArray (line 13) | static int linearSearchArray(int[] nums, int target) { method linearSearchLinkedList (line 25) | static ListNode linearSearchLinkedList(ListNode head, int target) { method main (line 37) | public static void main(String[] args) { FILE: ru/codes/java/chapter_searching/two_sum.java class two_sum (line 11) | public class two_sum { method twoSumBruteForce (line 13) | static int[] twoSumBruteForce(int[] nums, int target) { method twoSumHashTable (line 26) | static int[] twoSumHashTable(int[] nums, int target) { method main (line 40) | public static void main(String[] args) { FILE: ru/codes/java/chapter_sorting/bubble_sort.java class bubble_sort (line 11) | public class bubble_sort { method bubbleSort (line 13) | static void bubbleSort(int[] nums) { method bubbleSortWithFlag (line 29) | static void bubbleSortWithFlag(int[] nums) { method main (line 48) | public static void main(String[] args) { FILE: ru/codes/java/chapter_sorting/bucket_sort.java class bucket_sort (line 11) | public class bucket_sort { method bucketSort (line 13) | static void bucketSort(float[] nums) { method main (line 41) | public static void main(String[] args) { FILE: ru/codes/java/chapter_sorting/counting_sort.java class counting_sort (line 11) | public class counting_sort { method countingSortNaive (line 14) | static void countingSortNaive(int[] nums) { method countingSort (line 37) | static void countingSort(int[] nums) { method main (line 69) | public static void main(String[] args) { FILE: ru/codes/java/chapter_sorting/heap_sort.java class heap_sort (line 11) | public class heap_sort { method siftDown (line 13) | public static void siftDown(int[] nums, int n, int i) { method heapSort (line 36) | public static void heapSort(int[] nums) { method main (line 52) | public static void main(String[] args) { FILE: ru/codes/java/chapter_sorting/insertion_sort.java class insertion_sort (line 11) | public class insertion_sort { method insertionSort (line 13) | static void insertionSort(int[] nums) { method main (line 26) | public static void main(String[] args) { FILE: ru/codes/java/chapter_sorting/merge_sort.java class merge_sort (line 11) | public class merge_sort { method merge (line 13) | static void merge(int[] nums, int left, int mid, int right) { method mergeSort (line 40) | static void mergeSort(int[] nums, int left, int right) { method main (line 52) | public static void main(String[] args) { FILE: ru/codes/java/chapter_sorting/quick_sort.java class QuickSort (line 12) | class QuickSort { method swap (line 14) | static void swap(int[] nums, int i, int j) { method partition (line 21) | static int partition(int[] nums, int left, int right) { method quickSort (line 36) | public static void quickSort(int[] nums, int left, int right) { class QuickSortMedian (line 49) | class QuickSortMedian { method swap (line 51) | static void swap(int[] nums, int i, int j) { method medianThree (line 58) | static int medianThree(int[] nums, int left, int mid, int right) { method partition (line 68) | static int partition(int[] nums, int left, int right) { method quickSort (line 87) | public static void quickSort(int[] nums, int left, int right) { class QuickSortTailCall (line 100) | class QuickSortTailCall { method swap (line 102) | static void swap(int[] nums, int i, int j) { method partition (line 109) | static int partition(int[] nums, int left, int right) { method quickSort (line 124) | public static void quickSort(int[] nums, int left, int right) { class quick_sort (line 141) | public class quick_sort { method main (line 142) | public static void main(String[] args) { FILE: ru/codes/java/chapter_sorting/radix_sort.java class radix_sort (line 11) | public class radix_sort { method digit (line 13) | static int digit(int num, int exp) { method countingSortDigit (line 19) | static void countingSortDigit(int[] nums, int exp) { method radixSort (line 46) | static void radixSort(int[] nums) { method main (line 62) | public static void main(String[] args) { FILE: ru/codes/java/chapter_sorting/selection_sort.java class selection_sort (line 11) | public class selection_sort { method selectionSort (line 13) | public static void selectionSort(int[] nums) { method main (line 30) | public static void main(String[] args) { FILE: ru/codes/java/chapter_stack_and_queue/array_deque.java class ArrayDeque (line 12) | class ArrayDeque { method ArrayDeque (line 18) | public ArrayDeque(int capacity) { method capacity (line 24) | public int capacity() { method size (line 29) | public int size() { method isEmpty (line 34) | public boolean isEmpty() { method index (line 39) | private int index(int i) { method pushFirst (line 47) | public void pushFirst(int num) { method pushLast (line 61) | public void pushLast(int num) { method popFirst (line 74) | public int popFirst() { method popLast (line 83) | public int popLast() { method peekFirst (line 90) | public int peekFirst() { method peekLast (line 97) | public int peekLast() { method toArray (line 106) | public int[] toArray() { class array_deque (line 116) | public class array_deque { method main (line 117) | public static void main(String[] args) { FILE: ru/codes/java/chapter_stack_and_queue/array_queue.java class ArrayQueue (line 12) | class ArrayQueue { method ArrayQueue (line 17) | public ArrayQueue(int capacity) { method capacity (line 23) | public int capacity() { method size (line 28) | public int size() { method isEmpty (line 33) | public boolean isEmpty() { method push (line 38) | public void push(int num) { method pop (line 52) | public int pop() { method peek (line 61) | public int peek() { method toArray (line 68) | public int[] toArray() { class array_queue (line 78) | public class array_queue { method main (line 79) | public static void main(String[] args) { FILE: ru/codes/java/chapter_stack_and_queue/array_stack.java class ArrayStack (line 12) | class ArrayStack { method ArrayStack (line 15) | public ArrayStack() { method size (line 21) | public int size() { method isEmpty (line 26) | public boolean isEmpty() { method push (line 31) | public void push(int num) { method pop (line 36) | public int pop() { method peek (line 43) | public int peek() { method toArray (line 50) | public Object[] toArray() { class array_stack (line 55) | public class array_stack { method main (line 56) | public static void main(String[] args) { FILE: ru/codes/java/chapter_stack_and_queue/deque.java class deque (line 11) | public class deque { method main (line 12) | public static void main(String[] args) { FILE: ru/codes/java/chapter_stack_and_queue/linkedlist_deque.java class ListNode (line 12) | class ListNode { method ListNode (line 17) | ListNode(int val) { class LinkedListDeque (line 24) | class LinkedListDeque { method LinkedListDeque (line 28) | public LinkedListDeque() { method size (line 33) | public int size() { method isEmpty (line 38) | public boolean isEmpty() { method push (line 43) | private void push(int num, boolean isFront) { method pushFirst (line 65) | public void pushFirst(int num) { method pushLast (line 70) | public void pushLast(int num) { method pop (line 75) | private int pop(boolean isFront) { method popFirst (line 105) | public int popFirst() { method popLast (line 110) | public int popLast() { method peekFirst (line 115) | public int peekFirst() { method peekLast (line 122) | public int peekLast() { method toArray (line 129) | public int[] toArray() { class linkedlist_deque (line 140) | public class linkedlist_deque { method main (line 141) | public static void main(String[] args) { FILE: ru/codes/java/chapter_stack_and_queue/linkedlist_queue.java class LinkedListQueue (line 12) | class LinkedListQueue { method LinkedListQueue (line 16) | public LinkedListQueue() { method size (line 22) | public int size() { method isEmpty (line 27) | public boolean isEmpty() { method push (line 32) | public void push(int num) { method pop (line 48) | public int pop() { method peek (line 57) | public int peek() { method toArray (line 64) | public int[] toArray() { class linkedlist_queue (line 75) | public class linkedlist_queue { method main (line 76) | public static void main(String[] args) { FILE: ru/codes/java/chapter_stack_and_queue/linkedlist_stack.java class LinkedListStack (line 13) | class LinkedListStack { method LinkedListStack (line 17) | public LinkedListStack() { method size (line 22) | public int size() { method isEmpty (line 27) | public boolean isEmpty() { method push (line 32) | public void push(int num) { method pop (line 40) | public int pop() { method peek (line 48) | public int peek() { method toArray (line 55) | public int[] toArray() { class linkedlist_stack (line 66) | public class linkedlist_stack { method main (line 67) | public static void main(String[] args) { FILE: ru/codes/java/chapter_stack_and_queue/queue.java class queue (line 11) | public class queue { method main (line 12) | public static void main(String[] args) { FILE: ru/codes/java/chapter_stack_and_queue/stack.java class stack (line 11) | public class stack { method main (line 12) | public static void main(String[] args) { FILE: ru/codes/java/chapter_tree/array_binary_tree.java class ArrayBinaryTree (line 13) | class ArrayBinaryTree { method ArrayBinaryTree (line 17) | public ArrayBinaryTree(List arr) { method size (line 22) | public int size() { method val (line 27) | public Integer val(int i) { method left (line 35) | public Integer left(int i) { method right (line 40) | public Integer right(int i) { method parent (line 45) | public Integer parent(int i) { method levelOrder (line 50) | public List levelOrder() { method dfs (line 61) | private void dfs(Integer i, String order, List res) { method preOrder (line 79) | public List preOrder() { method inOrder (line 86) | public List inOrder() { method postOrder (line 93) | public List postOrder() { class array_binary_tree (line 100) | public class array_binary_tree { method main (line 101) | public static void main(String[] args) { FILE: ru/codes/java/chapter_tree/avl_tree.java class AVLTree (line 12) | class AVLTree { method height (line 16) | public int height(TreeNode node) { method updateHeight (line 22) | private void updateHeight(TreeNode node) { method balanceFactor (line 28) | public int balanceFactor(TreeNode node) { method rightRotate (line 37) | private TreeNode rightRotate(TreeNode node) { method leftRotate (line 51) | private TreeNode leftRotate(TreeNode node) { method rotate (line 65) | private TreeNode rotate(TreeNode node) { method insert (line 95) | public void insert(int val) { method insertHelper (line 100) | private TreeNode insertHelper(TreeNode node, int val) { method remove (line 118) | public void remove(int val) { method removeHelper (line 123) | private TreeNode removeHelper(TreeNode node, int val) { method search (line 158) | public TreeNode search(int val) { class avl_tree (line 177) | public class avl_tree { method testInsert (line 178) | static void testInsert(AVLTree tree, int val) { method testRemove (line 184) | static void testRemove(AVLTree tree, int val) { method main (line 190) | public static void main(String[] args) { FILE: ru/codes/java/chapter_tree/binary_search_tree.java class BinarySearchTree (line 12) | class BinarySearchTree { method BinarySearchTree (line 16) | public BinarySearchTree() { method getRoot (line 22) | public TreeNode getRoot() { method search (line 27) | public TreeNode search(int num) { method insert (line 46) | public void insert(int num) { method remove (line 75) | public void remove(int num) { class binary_search_tree (line 126) | public class binary_search_tree { method main (line 127) | public static void main(String[] args) { FILE: ru/codes/java/chapter_tree/binary_tree.java class binary_tree (line 11) | public class binary_tree { method main (line 12) | public static void main(String[] args) { FILE: ru/codes/java/chapter_tree/binary_tree_bfs.java class binary_tree_bfs (line 12) | public class binary_tree_bfs { method levelOrder (line 14) | static List levelOrder(TreeNode root) { method main (line 31) | public static void main(String[] args) { FILE: ru/codes/java/chapter_tree/binary_tree_dfs.java class binary_tree_dfs (line 12) | public class binary_tree_dfs { method preOrder (line 17) | static void preOrder(TreeNode root) { method inOrder (line 27) | static void inOrder(TreeNode root) { method postOrder (line 37) | static void postOrder(TreeNode root) { method main (line 46) | public static void main(String[] args) { FILE: ru/codes/java/utils/ListNode.java class ListNode (line 10) | public class ListNode { method ListNode (line 14) | public ListNode(int x) { method arrToLinkedList (line 19) | public static ListNode arrToLinkedList(int[] arr) { FILE: ru/codes/java/utils/PrintUtil.java class Trunk (line 11) | class Trunk { method Trunk (line 15) | Trunk(Trunk prev, String str) { class PrintUtil (line 21) | public class PrintUtil { method printMatrix (line 23) | public static void printMatrix(T[][] matrix) { method printMatrix (line 32) | public static void printMatrix(List> matrix) { method printLinkedList (line 41) | public static void printLinkedList(ListNode head) { method printTree (line 51) | public static void printTree(TreeNode root) { method printTree (line 60) | public static void printTree(TreeNode root, Trunk prev, boolean isRigh... method showTrunks (line 91) | public static void showTrunks(Trunk p) { method printHashMap (line 101) | public static void printHashMap(Map map) { method printHeap (line 108) | public static void printHeap(Queue queue) { FILE: ru/codes/java/utils/TreeNode.java class TreeNode (line 12) | public class TreeNode { method TreeNode (line 19) | public TreeNode(int x) { method listToTreeDFS (line 40) | private static TreeNode listToTreeDFS(List arr, int i) { method listToTree (line 51) | public static TreeNode listToTree(List arr) { method treeToListDFS (line 56) | private static void treeToListDFS(TreeNode root, int i, List ... method treeToList (line 68) | public static List treeToList(TreeNode root) { FILE: ru/codes/java/utils/Vertex.java class Vertex (line 12) | public class Vertex { method Vertex (line 15) | public Vertex(int val) { method valsToVets (line 20) | public static Vertex[] valsToVets(int[] vals) { method vetsToVals (line 29) | public static List vetsToVals(List vets) { FILE: ru/codes/javascript/chapter_array_and_linkedlist/array.js function randomAccess (line 8) | function randomAccess(nums) { function extend (line 19) | function extend(nums, enlarge) { function insert (line 31) | function insert(nums, num, index) { function remove (line 41) | function remove(nums, index) { function traverse (line 49) | function traverse(nums) { function find (line 62) | function find(nums, target) { FILE: ru/codes/javascript/chapter_array_and_linkedlist/linked_list.js function insert (line 11) | function insert(n0, P) { function remove (line 18) | function remove(n0) { function access (line 27) | function access(head, index) { function find (line 38) | function find(head, target) { FILE: ru/codes/javascript/chapter_array_and_linkedlist/my_list.js class MyList (line 8) | class MyList { method constructor (line 15) | constructor() { method size (line 20) | size() { method capacity (line 25) | capacity() { method get (line 30) | get(index) { method set (line 37) | set(index, num) { method add (line 43) | add(num) { method insert (line 54) | insert(index, num) { method remove (line 70) | remove(index) { method extendCapacity (line 84) | extendCapacity() { method toArray (line 94) | toArray() { FILE: ru/codes/javascript/chapter_backtracking/n_queens.js function backtrack (line 8) | function backtrack(row, n, state, res, cols, diags1, diags2) { function nQueens (line 34) | function nQueens(n) { FILE: ru/codes/javascript/chapter_backtracking/permutations_i.js function backtrack (line 8) | function backtrack(state, choices, selected, res) { function permutationsI (line 31) | function permutationsI(nums) { FILE: ru/codes/javascript/chapter_backtracking/permutations_ii.js function backtrack (line 8) | function backtrack(state, choices, selected, res) { function permutationsII (line 33) | function permutationsII(nums) { FILE: ru/codes/javascript/chapter_backtracking/preorder_traversal_i_compact.js function preOrder (line 11) | function preOrder(root, res) { FILE: ru/codes/javascript/chapter_backtracking/preorder_traversal_ii_compact.js function preOrder (line 11) | function preOrder(root, path, res) { FILE: ru/codes/javascript/chapter_backtracking/preorder_traversal_iii_compact.js function preOrder (line 11) | function preOrder(root, path, res) { FILE: ru/codes/javascript/chapter_backtracking/preorder_traversal_iii_template.js function isSolution (line 11) | function isSolution(state) { function recordSolution (line 16) | function recordSolution(state, res) { function isValid (line 21) | function isValid(state, choice) { function makeChoice (line 26) | function makeChoice(state, choice) { function undoChoice (line 31) | function undoChoice(state) { function backtrack (line 36) | function backtrack(state, choices, res) { FILE: ru/codes/javascript/chapter_backtracking/subset_sum_i.js function backtrack (line 8) | function backtrack(state, target, choices, start, res) { function subsetSumI (line 32) | function subsetSumI(nums, target) { FILE: ru/codes/javascript/chapter_backtracking/subset_sum_i_naive.js function backtrack (line 8) | function backtrack(state, target, total, choices, res) { function subsetSumINaive (line 30) | function subsetSumINaive(nums, target) { FILE: ru/codes/javascript/chapter_backtracking/subset_sum_ii.js function backtrack (line 8) | function backtrack(state, target, choices, start, res) { function subsetSumII (line 37) | function subsetSumII(nums, target) { FILE: ru/codes/javascript/chapter_computational_complexity/iteration.js function forLoop (line 8) | function forLoop(n) { function whileLoop (line 18) | function whileLoop(n) { function whileLoopII (line 30) | function whileLoopII(n) { function nestedForLoop (line 44) | function nestedForLoop(n) { FILE: ru/codes/javascript/chapter_computational_complexity/recursion.js function recur (line 8) | function recur(n) { function forLoopRecur (line 18) | function forLoopRecur(n) { function tailRecur (line 37) | function tailRecur(n, res) { function fib (line 45) | function fib(n) { FILE: ru/codes/javascript/chapter_computational_complexity/space_complexity.js function constFunc (line 12) | function constFunc() { function constant (line 18) | function constant(n) { function linear (line 35) | function linear(n) { function linearRecur (line 51) | function linearRecur(n) { function quadratic (line 58) | function quadratic(n) { function quadraticRecur (line 75) | function quadraticRecur(n) { function buildTree (line 83) | function buildTree(n) { FILE: ru/codes/javascript/chapter_computational_complexity/time_complexity.js function constant (line 8) | function constant(n) { function linear (line 16) | function linear(n) { function arrayTraversal (line 23) | function arrayTraversal(nums) { function quadratic (line 33) | function quadratic(n) { function bubbleSort (line 45) | function bubbleSort(nums) { function exponential (line 64) | function exponential(n) { function expRecur (line 79) | function expRecur(n) { function logarithmic (line 85) | function logarithmic(n) { function logRecur (line 95) | function logRecur(n) { function linearLogRecur (line 101) | function linearLogRecur(n) { function factorialRecur (line 111) | function factorialRecur(n) { FILE: ru/codes/javascript/chapter_computational_complexity/worst_best_time_complexity.js function randomNumbers (line 8) | function randomNumbers(n) { function findOne (line 25) | function findOne(nums) { FILE: ru/codes/javascript/chapter_divide_and_conquer/binary_search_recur.js function dfs (line 8) | function dfs(nums, target, i, j) { function binarySearch (line 28) | function binarySearch(nums, target) { FILE: ru/codes/javascript/chapter_divide_and_conquer/build_tree.js function dfs (line 11) | function dfs(preorder, inorderMap, i, l, r) { function buildTree (line 27) | function buildTree(preorder, inorder) { FILE: ru/codes/javascript/chapter_divide_and_conquer/hanota.js function move (line 8) | function move(src, tar) { function dfs (line 16) | function dfs(i, src, buf, tar) { function solveHanota (line 31) | function solveHanota(A, B, C) { FILE: ru/codes/javascript/chapter_dynamic_programming/climbing_stairs_backtrack.js function backtrack (line 8) | function backtrack(choices, state, n, res) { function climbingStairsBacktrack (line 22) | function climbingStairsBacktrack(n) { FILE: ru/codes/javascript/chapter_dynamic_programming/climbing_stairs_constraint_dp.js function climbingStairsConstraintDP (line 8) | function climbingStairsConstraintDP(n) { FILE: ru/codes/javascript/chapter_dynamic_programming/climbing_stairs_dfs.js function dfs (line 8) | function dfs(i) { function climbingStairsDFS (line 17) | function climbingStairsDFS(n) { FILE: ru/codes/javascript/chapter_dynamic_programming/climbing_stairs_dfs_mem.js function dfs (line 8) | function dfs(i, mem) { function climbingStairsDFSMem (line 21) | function climbingStairsDFSMem(n) { FILE: ru/codes/javascript/chapter_dynamic_programming/climbing_stairs_dp.js function climbingStairsDP (line 8) | function climbingStairsDP(n) { function climbingStairsDPComp (line 23) | function climbingStairsDPComp(n) { FILE: ru/codes/javascript/chapter_dynamic_programming/coin_change.js function coinChangeDP (line 8) | function coinChangeDP(coins, amt) { function coinChangeDPComp (line 35) | function coinChangeDPComp(coins, amt) { FILE: ru/codes/javascript/chapter_dynamic_programming/coin_change_ii.js function coinChangeIIDP (line 8) | function coinChangeIIDP(coins, amt) { function coinChangeIIDPComp (line 34) | function coinChangeIIDPComp(coins, amt) { FILE: ru/codes/javascript/chapter_dynamic_programming/edit_distance.js function editDistanceDFS (line 8) | function editDistanceDFS(s, t, i, j) { function editDistanceDFSMem (line 31) | function editDistanceDFSMem(s, t, mem, i, j) { function editDistanceDP (line 58) | function editDistanceDP(s, t) { function editDistanceDPComp (line 86) | function editDistanceDPComp(s, t) { FILE: ru/codes/javascript/chapter_dynamic_programming/knapsack.js function knapsackDFS (line 8) | function knapsackDFS(wgt, val, i, c) { function knapsackDFSMem (line 25) | function knapsackDFSMem(wgt, val, mem, i, c) { function knapsackDP (line 48) | function knapsackDP(wgt, val, cap) { function knapsackDPComp (line 73) | function knapsackDPComp(wgt, val, cap) { FILE: ru/codes/javascript/chapter_dynamic_programming/min_cost_climbing_stairs_dp.js function minCostClimbingStairsDP (line 8) | function minCostClimbingStairsDP(cost) { function minCostClimbingStairsDPComp (line 26) | function minCostClimbingStairsDPComp(cost) { FILE: ru/codes/javascript/chapter_dynamic_programming/min_path_sum.js function minPathSumDFS (line 8) | function minPathSumDFS(grid, i, j) { function minPathSumDFSMem (line 25) | function minPathSumDFSMem(grid, mem, i, j) { function minPathSumDP (line 47) | function minPathSumDP(grid) { function minPathSumDPComp (line 73) | function minPathSumDPComp(grid) { FILE: ru/codes/javascript/chapter_dynamic_programming/unbounded_knapsack.js function unboundedKnapsackDP (line 8) | function unboundedKnapsackDP(wgt, val, cap) { function unboundedKnapsackDPComp (line 33) | function unboundedKnapsackDPComp(wgt, val, cap) { FILE: ru/codes/javascript/chapter_graph/graph_adjacency_list.js class GraphAdjList (line 10) | class GraphAdjList { method constructor (line 15) | constructor(edges) { method size (line 26) | size() { method addEdge (line 31) | addEdge(vet1, vet2) { method removeEdge (line 45) | removeEdge(vet1, vet2) { method addVertex (line 60) | addVertex(vet) { method removeVertex (line 67) | removeVertex(vet) { method print (line 83) | print() { FILE: ru/codes/javascript/chapter_graph/graph_adjacency_matrix.js class GraphAdjMat (line 8) | class GraphAdjMat { method constructor (line 13) | constructor(vertices, edges) { method size (line 28) | size() { method addVertex (line 33) | addVertex(val) { method removeVertex (line 50) | removeVertex(index) { method addEdge (line 67) | addEdge(i, j) { method removeEdge (line 79) | removeEdge(i, j) { method print (line 89) | print() { FILE: ru/codes/javascript/chapter_graph/graph_bfs.js function graphBFS (line 12) | function graphBFS(graph, startVet) { FILE: ru/codes/javascript/chapter_graph/graph_dfs.js function dfs (line 12) | function dfs(graph, visited, res, vet) { function graphDFS (line 27) | function graphDFS(graph, startVet) { FILE: ru/codes/javascript/chapter_greedy/coin_change_greedy.js function coinChangeGreedy (line 8) | function coinChangeGreedy(coins, amt) { FILE: ru/codes/javascript/chapter_greedy/fractional_knapsack.js class Item (line 8) | class Item { method constructor (line 9) | constructor(w, v) { function fractionalKnapsack (line 16) | function fractionalKnapsack(wgt, val, cap) { FILE: ru/codes/javascript/chapter_greedy/max_capacity.js function maxCapacity (line 8) | function maxCapacity(ht) { FILE: ru/codes/javascript/chapter_greedy/max_product_cutting.js function maxProductCutting (line 8) | function maxProductCutting(n) { FILE: ru/codes/javascript/chapter_hashing/array_hash_map.js class Pair (line 8) | class Pair { method constructor (line 9) | constructor(key, val) { class ArrayHashMap (line 16) | class ArrayHashMap { method constructor (line 18) | constructor() { method #hashFunc (line 24) | #hashFunc(key) { method get (line 29) | get(key) { method set (line 37) | set(key, val) { method delete (line 43) | delete(key) { method entries (line 50) | entries() { method keys (line 61) | keys() { method values (line 72) | values() { method print (line 83) | print() { FILE: ru/codes/javascript/chapter_hashing/hash_map_chaining.js class Pair (line 8) | class Pair { method constructor (line 9) | constructor(key, val) { class HashMapChaining (line 16) | class HashMapChaining { method constructor (line 24) | constructor() { method #hashFunc (line 33) | #hashFunc(key) { method #loadFactor (line 38) | #loadFactor() { method get (line 43) | get(key) { method put (line 57) | put(key, val) { method remove (line 78) | remove(key) { method #extend (line 92) | #extend() { method print (line 108) | print() { FILE: ru/codes/javascript/chapter_hashing/hash_map_open_addressing.js class Pair (line 8) | class Pair { method constructor (line 9) | constructor(key, val) { class HashMapOpenAddressing (line 16) | class HashMapOpenAddressing { method constructor (line 25) | constructor() { method #hashFunc (line 35) | #hashFunc(key) { method #loadFactor (line 40) | #loadFactor() { method #findBucket (line 45) | #findBucket(key) { method get (line 75) | get(key) { method put (line 90) | put(key, val) { method remove (line 111) | remove(key) { method #extend (line 125) | #extend() { method print (line 141) | print() { FILE: ru/codes/javascript/chapter_hashing/simple_hash.js function addHash (line 8) | function addHash(key) { function mulHash (line 18) | function mulHash(key) { function xorHash (line 28) | function xorHash(key) { function rotHash (line 38) | function rotHash(key) { FILE: ru/codes/javascript/chapter_heap/my_heap.js class MaxHeap (line 10) | class MaxHeap { method constructor (line 14) | constructor(nums) { method #left (line 24) | #left(i) { method #right (line 29) | #right(i) { method #parent (line 34) | #parent(i) { method #swap (line 39) | #swap(i, j) { method size (line 46) | size() { method isEmpty (line 51) | isEmpty() { method peek (line 56) | peek() { method push (line 61) | push(val) { method #siftUp (line 69) | #siftUp(i) { method pop (line 83) | pop() { method #siftDown (line 97) | #siftDown(i) { method print (line 115) | print() { method getMaxHeap (line 120) | getMaxHeap() { FILE: ru/codes/javascript/chapter_heap/top_k.js function pushMinHeap (line 10) | function pushMinHeap(maxHeap, val) { function popMinHeap (line 16) | function popMinHeap(maxHeap) { function peekMinHeap (line 22) | function peekMinHeap(maxHeap) { function getMinHeap (line 28) | function getMinHeap(maxHeap) { function topKHeap (line 34) | function topKHeap(nums, k) { FILE: ru/codes/javascript/chapter_searching/binary_search.js function binarySearch (line 8) | function binarySearch(nums, target) { function binarySearchLCRO (line 29) | function binarySearchLCRO(nums, target) { FILE: ru/codes/javascript/chapter_searching/binary_search_edge.js function binarySearchLeftEdge (line 10) | function binarySearchLeftEdge(nums, target) { function binarySearchRightEdge (line 22) | function binarySearchRightEdge(nums, target) { FILE: ru/codes/javascript/chapter_searching/binary_search_insertion.js function binarySearchInsertionSimple (line 8) | function binarySearchInsertionSimple(nums, target) { function binarySearchInsertion (line 26) | function binarySearchInsertion(nums, target) { FILE: ru/codes/javascript/chapter_searching/hashing_search.js function hashingSearchArray (line 10) | function hashingSearchArray(map, target) { function hashingSearchLinkedList (line 17) | function hashingSearchLinkedList(map, target) { FILE: ru/codes/javascript/chapter_searching/linear_search.js function linearSearchArray (line 10) | function linearSearchArray(nums, target) { function linearSearchLinkedList (line 23) | function linearSearchLinkedList(head, target) { FILE: ru/codes/javascript/chapter_searching/two_sum.js function twoSumBruteForce (line 8) | function twoSumBruteForce(nums, target) { function twoSumHashTable (line 22) | function twoSumHashTable(nums, target) { FILE: ru/codes/javascript/chapter_sorting/bubble_sort.js function bubbleSort (line 8) | function bubbleSort(nums) { function bubbleSortWithFlag (line 24) | function bubbleSortWithFlag(nums) { FILE: ru/codes/javascript/chapter_sorting/bucket_sort.js function bucketSort (line 8) | function bucketSort(nums) { FILE: ru/codes/javascript/chapter_sorting/counting_sort.js function countingSortNaive (line 9) | function countingSortNaive(nums) { function countingSort (line 29) | function countingSort(nums) { FILE: ru/codes/javascript/chapter_sorting/heap_sort.js function siftDown (line 8) | function siftDown(nums, n, i) { function heapSort (line 32) | function heapSort(nums) { FILE: ru/codes/javascript/chapter_sorting/insertion_sort.js function insertionSort (line 8) | function insertionSort(nums) { FILE: ru/codes/javascript/chapter_sorting/merge_sort.js function merge (line 8) | function merge(nums, left, mid, right) { function mergeSort (line 38) | function mergeSort(nums, left, right) { FILE: ru/codes/javascript/chapter_sorting/quick_sort.js class QuickSort (line 8) | class QuickSort { method swap (line 10) | swap(nums, i, j) { method partition (line 17) | partition(nums, left, right) { method quickSort (line 36) | quickSort(nums, left, right) { class QuickSortMedian (line 48) | class QuickSortMedian { method swap (line 50) | swap(nums, i, j) { method medianThree (line 57) | medianThree(nums, left, mid, right) { method partition (line 69) | partition(nums, left, right) { method quickSort (line 92) | quickSort(nums, left, right) { class QuickSortTailCall (line 104) | class QuickSortTailCall { method swap (line 106) | swap(nums, i, j) { method partition (line 113) | partition(nums, left, right) { method quickSort (line 127) | quickSort(nums, left, right) { FILE: ru/codes/javascript/chapter_sorting/radix_sort.js function digit (line 8) | function digit(num, exp) { function countingSortDigit (line 14) | function countingSortDigit(nums, exp) { function radixSort (line 42) | function radixSort(nums) { FILE: ru/codes/javascript/chapter_sorting/selection_sort.js function selectionSort (line 8) | function selectionSort(nums) { FILE: ru/codes/javascript/chapter_stack_and_queue/array_deque.js class ArrayDeque (line 8) | class ArrayDeque { method constructor (line 14) | constructor(capacity) { method capacity (line 21) | capacity() { method size (line 26) | size() { method isEmpty (line 31) | isEmpty() { method index (line 36) | index(i) { method pushFirst (line 44) | pushFirst(num) { method pushLast (line 58) | pushLast(num) { method popFirst (line 71) | popFirst() { method popLast (line 80) | popLast() { method peekFirst (line 87) | peekFirst() { method peekLast (line 93) | peekLast() { method toArray (line 101) | toArray() { FILE: ru/codes/javascript/chapter_stack_and_queue/array_queue.js class ArrayQueue (line 8) | class ArrayQueue { method constructor (line 13) | constructor(capacity) { method capacity (line 18) | get capacity() { method size (line 23) | get size() { method isEmpty (line 28) | isEmpty() { method push (line 33) | push(num) { method pop (line 47) | pop() { method peek (line 56) | peek() { method toArray (line 62) | toArray() { FILE: ru/codes/javascript/chapter_stack_and_queue/array_stack.js class ArrayStack (line 8) | class ArrayStack { method constructor (line 10) | constructor() { method size (line 15) | get size() { method isEmpty (line 20) | isEmpty() { method push (line 25) | push(num) { method pop (line 30) | pop() { method top (line 36) | top() { method toArray (line 42) | toArray() { FILE: ru/codes/javascript/chapter_stack_and_queue/linkedlist_deque.js class ListNode (line 8) | class ListNode { method constructor (line 13) | constructor(val) { class LinkedListDeque (line 21) | class LinkedListDeque { method constructor (line 26) | constructor() { method pushLast (line 33) | pushLast(val) { method pushFirst (line 49) | pushFirst(val) { method popLast (line 65) | popLast() { method popFirst (line 82) | popFirst() { method peekLast (line 99) | peekLast() { method peekFirst (line 104) | peekFirst() { method size (line 109) | size() { method isEmpty (line 114) | isEmpty() { method print (line 119) | print() { FILE: ru/codes/javascript/chapter_stack_and_queue/linkedlist_queue.js class LinkedListQueue (line 10) | class LinkedListQueue { method constructor (line 15) | constructor() { method size (line 21) | get size() { method isEmpty (line 26) | isEmpty() { method push (line 31) | push(num) { method pop (line 47) | pop() { method peek (line 56) | peek() { method toArray (line 62) | toArray() { FILE: ru/codes/javascript/chapter_stack_and_queue/linkedlist_stack.js class LinkedListStack (line 10) | class LinkedListStack { method constructor (line 14) | constructor() { method size (line 19) | get size() { method isEmpty (line 24) | isEmpty() { method push (line 29) | push(num) { method pop (line 37) | pop() { method peek (line 45) | peek() { method toArray (line 51) | toArray() { FILE: ru/codes/javascript/chapter_tree/array_binary_tree.js class ArrayBinaryTree (line 11) | class ArrayBinaryTree { method constructor (line 15) | constructor(arr) { method size (line 20) | size() { method val (line 25) | val(i) { method left (line 32) | left(i) { method right (line 37) | right(i) { method parent (line 42) | parent(i) { method levelOrder (line 47) | levelOrder() { method #dfs (line 57) | #dfs(i, order, res) { method preOrder (line 71) | preOrder() { method inOrder (line 78) | inOrder() { method postOrder (line 85) | postOrder() { FILE: ru/codes/javascript/chapter_tree/avl_tree.js class AVLTree (line 11) | class AVLTree { method constructor (line 13) | constructor() { method height (line 18) | height(node) { method #updateHeight (line 24) | #updateHeight(node) { method balanceFactor (line 31) | balanceFactor(node) { method #rightRotate (line 39) | #rightRotate(node) { method #leftRotate (line 53) | #leftRotate(node) { method #rotate (line 67) | #rotate(node) { method insert (line 97) | insert(val) { method #insertHelper (line 102) | #insertHelper(node, val) { method remove (line 117) | remove(val) { method #removeHelper (line 122) | #removeHelper(node, val) { method search (line 153) | search(val) { function testInsert (line 169) | function testInsert(tree, val) { function testRemove (line 175) | function testRemove(tree, val) { FILE: ru/codes/javascript/chapter_tree/binary_search_tree.js class BinarySearchTree (line 11) | class BinarySearchTree { method constructor (line 13) | constructor() { method getRoot (line 19) | getRoot() { method search (line 24) | search(num) { method insert (line 40) | insert(num) { method remove (line 65) | remove(num) { FILE: ru/codes/javascript/chapter_tree/binary_tree_bfs.js function levelOrder (line 11) | function levelOrder(root) { FILE: ru/codes/javascript/chapter_tree/binary_tree_dfs.js function preOrder (line 14) | function preOrder(root) { function inOrder (line 23) | function inOrder(root) { function postOrder (line 32) | function postOrder(root) { FILE: ru/codes/javascript/modules/ListNode.js class ListNode (line 8) | class ListNode { method constructor (line 11) | constructor(val, next) { function arrToLinkedList (line 18) | function arrToLinkedList(arr) { FILE: ru/codes/javascript/modules/PrintUtil.js function printLinkedList (line 10) | function printLinkedList(head) { function Trunk (line 19) | function Trunk(prev, str) { function printTree (line 29) | function printTree(root) { function printTree (line 34) | function printTree(root, prev, isRight) { function showTrunks (line 65) | function showTrunks(p) { function printHeap (line 75) | function printHeap(arr) { FILE: ru/codes/javascript/modules/TreeNode.js class TreeNode (line 8) | class TreeNode { method constructor (line 13) | constructor(val, left, right, height) { function arrToTree (line 22) | function arrToTree(arr, i = 0) { FILE: ru/codes/javascript/modules/Vertex.js class Vertex (line 8) | class Vertex { method constructor (line 10) | constructor(val) { method valsToVets (line 15) | static valsToVets(vals) { method vetsToVals (line 24) | static vetsToVals(vets) { FILE: ru/codes/python/chapter_array_and_linkedlist/array.py function random_access (line 10) | def random_access(nums: list[int]) -> int: function extend (line 21) | def extend(nums: list[int], enlarge: int) -> list[int]: function insert (line 32) | def insert(nums: list[int], num: int, index: int): function remove (line 41) | def remove(nums: list[int], index: int): function traverse (line 48) | def traverse(nums: list[int]): function find (line 63) | def find(nums: list[int], target: int) -> int: FILE: ru/codes/python/chapter_array_and_linkedlist/linked_list.py function insert (line 14) | def insert(n0: ListNode, P: ListNode): function remove (line 21) | def remove(n0: ListNode): function access (line 31) | def access(head: ListNode, index: int) -> ListNode | None: function find (line 40) | def find(head: ListNode, target: int) -> int: FILE: ru/codes/python/chapter_array_and_linkedlist/my_list.py class MyList (line 8) | class MyList: method __init__ (line 11) | def __init__(self): method size (line 18) | def size(self) -> int: method capacity (line 22) | def capacity(self) -> int: method get (line 26) | def get(self, index: int) -> int: method set (line 33) | def set(self, num: int, index: int): method add (line 39) | def add(self, num: int): method insert (line 47) | def insert(self, num: int, index: int): method remove (line 61) | def remove(self, index: int) -> int: method extend_capacity (line 74) | def extend_capacity(self): method to_array (line 81) | def to_array(self) -> list[int]: FILE: ru/codes/python/chapter_backtracking/n_queens.py function backtrack (line 8) | def backtrack( function n_queens (line 39) | def n_queens(n: int) -> list[list[list[str]]]: FILE: ru/codes/python/chapter_backtracking/permutations_i.py function backtrack (line 8) | def backtrack( function permutations_i (line 30) | def permutations_i(nums: list[int]) -> list[list[int]]: FILE: ru/codes/python/chapter_backtracking/permutations_ii.py function backtrack (line 8) | def backtrack( function permutations_ii (line 32) | def permutations_ii(nums: list[int]) -> list[list[int]]: FILE: ru/codes/python/chapter_backtracking/preorder_traversal_i_compact.py function pre_order (line 14) | def pre_order(root: TreeNode): FILE: ru/codes/python/chapter_backtracking/preorder_traversal_ii_compact.py function pre_order (line 14) | def pre_order(root: TreeNode): FILE: ru/codes/python/chapter_backtracking/preorder_traversal_iii_compact.py function pre_order (line 14) | def pre_order(root: TreeNode): FILE: ru/codes/python/chapter_backtracking/preorder_traversal_iii_template.py function is_solution (line 14) | def is_solution(state: list[TreeNode]) -> bool: function record_solution (line 19) | def record_solution(state: list[TreeNode], res: list[list[TreeNode]]): function is_valid (line 24) | def is_valid(state: list[TreeNode], choice: TreeNode) -> bool: function make_choice (line 29) | def make_choice(state: list[TreeNode], choice: TreeNode): function undo_choice (line 34) | def undo_choice(state: list[TreeNode], choice: TreeNode): function backtrack (line 39) | def backtrack( FILE: ru/codes/python/chapter_backtracking/subset_sum_i.py function backtrack (line 8) | def backtrack( function subset_sum_i (line 31) | def subset_sum_i(nums: list[int], target: int) -> list[list[int]]: FILE: ru/codes/python/chapter_backtracking/subset_sum_i_naive.py function backtrack (line 8) | def backtrack( function subset_sum_i_naive (line 33) | def subset_sum_i_naive(nums: list[int], target: int) -> list[list[int]]: FILE: ru/codes/python/chapter_backtracking/subset_sum_ii.py function backtrack (line 8) | def backtrack( function subset_sum_ii (line 35) | def subset_sum_ii(nums: list[int], target: int) -> list[list[int]]: FILE: ru/codes/python/chapter_computational_complexity/iteration.py function for_loop (line 8) | def for_loop(n: int) -> int: function while_loop (line 17) | def while_loop(n: int) -> int: function while_loop_ii (line 28) | def while_loop_ii(n: int) -> int: function nested_for_loop (line 41) | def nested_for_loop(n: int) -> str: FILE: ru/codes/python/chapter_computational_complexity/recursion.py function recur (line 8) | def recur(n: int) -> int: function for_loop_recur (line 19) | def for_loop_recur(n: int) -> int: function tail_recur (line 36) | def tail_recur(n, res): function fib (line 45) | def fib(n: int) -> int: FILE: ru/codes/python/chapter_computational_complexity/space_complexity.py function function (line 14) | def function() -> int: function constant (line 20) | def constant(n: int): function linear (line 34) | def linear(n: int): function linear_recur (line 44) | def linear_recur(n: int): function quadratic (line 52) | def quadratic(n: int): function quadratic_recur (line 58) | def quadratic_recur(n: int) -> int: function build_tree (line 67) | def build_tree(n: int) -> TreeNode | None: FILE: ru/codes/python/chapter_computational_complexity/time_complexity.py function constant (line 8) | def constant(n: int) -> int: function linear (line 17) | def linear(n: int) -> int: function array_traversal (line 25) | def array_traversal(nums: list[int]) -> int: function quadratic (line 34) | def quadratic(n: int) -> int: function bubble_sort (line 44) | def bubble_sort(nums: list[int]) -> int: function exponential (line 60) | def exponential(n: int) -> int: function exp_recur (line 73) | def exp_recur(n: int) -> int: function logarithmic (line 80) | def logarithmic(n: int) -> int: function log_recur (line 89) | def log_recur(n: int) -> int: function linear_log_recur (line 96) | def linear_log_recur(n: int) -> int: function factorial_recur (line 108) | def factorial_recur(n: int) -> int: FILE: ru/codes/python/chapter_computational_complexity/worst_best_time_complexity.py function random_numbers (line 10) | def random_numbers(n: int) -> list[int]: function find_one (line 19) | def find_one(nums: list[int]) -> int: FILE: ru/codes/python/chapter_divide_and_conquer/binary_search_recur.py function dfs (line 8) | def dfs(nums: list[int], target: int, i: int, j: int) -> int: function binary_search (line 26) | def binary_search(nums: list[int], target: int) -> int: FILE: ru/codes/python/chapter_divide_and_conquer/build_tree.py function dfs (line 14) | def dfs( function build_tree (line 37) | def build_tree(preorder: list[int], inorder: list[int]) -> TreeNode | None: FILE: ru/codes/python/chapter_divide_and_conquer/hanota.py function move (line 8) | def move(src: list[int], tar: list[int]): function dfs (line 16) | def dfs(i: int, src: list[int], buf: list[int], tar: list[int]): function solve_hanota (line 30) | def solve_hanota(A: list[int], B: list[int], C: list[int]): FILE: ru/codes/python/chapter_dynamic_programming/climbing_stairs_backtrack.py function backtrack (line 8) | def backtrack(choices: list[int], state: int, n: int, res: list[int]) ->... function climbing_stairs_backtrack (line 23) | def climbing_stairs_backtrack(n: int) -> int: FILE: ru/codes/python/chapter_dynamic_programming/climbing_stairs_constraint_dp.py function climbing_stairs_constraint_dp (line 8) | def climbing_stairs_constraint_dp(n: int) -> int: FILE: ru/codes/python/chapter_dynamic_programming/climbing_stairs_dfs.py function dfs (line 8) | def dfs(i: int) -> int: function climbing_stairs_dfs (line 18) | def climbing_stairs_dfs(n: int) -> int: FILE: ru/codes/python/chapter_dynamic_programming/climbing_stairs_dfs_mem.py function dfs (line 8) | def dfs(i: int, mem: list[int]) -> int: function climbing_stairs_dfs_mem (line 23) | def climbing_stairs_dfs_mem(n: int) -> int: FILE: ru/codes/python/chapter_dynamic_programming/climbing_stairs_dp.py function climbing_stairs_dp (line 8) | def climbing_stairs_dp(n: int) -> int: function climbing_stairs_dp_comp (line 22) | def climbing_stairs_dp_comp(n: int) -> int: FILE: ru/codes/python/chapter_dynamic_programming/coin_change.py function coin_change_dp (line 8) | def coin_change_dp(coins: list[int], amt: int) -> int: function coin_change_dp_comp (line 29) | def coin_change_dp_comp(coins: list[int], amt: int) -> int: FILE: ru/codes/python/chapter_dynamic_programming/coin_change_ii.py function coin_change_ii_dp (line 8) | def coin_change_ii_dp(coins: list[int], amt: int) -> int: function coin_change_ii_dp_comp (line 28) | def coin_change_ii_dp_comp(coins: list[int], amt: int) -> int: FILE: ru/codes/python/chapter_dynamic_programming/edit_distance.py function edit_distance_dfs (line 8) | def edit_distance_dfs(s: str, t: str, i: int, j: int) -> int: function edit_distance_dfs_mem (line 30) | def edit_distance_dfs_mem(s: str, t: str, mem: list[list[int]], i: int, ... function edit_distance_dp (line 56) | def edit_distance_dp(s: str, t: str) -> int: function edit_distance_dp_comp (line 77) | def edit_distance_dp_comp(s: str, t: str) -> int: FILE: ru/codes/python/chapter_dynamic_programming/knapsack.py function knapsack_dfs (line 8) | def knapsack_dfs(wgt: list[int], val: list[int], i: int, c: int) -> int: function knapsack_dfs_mem (line 23) | def knapsack_dfs_mem( function knapsack_dp (line 44) | def knapsack_dp(wgt: list[int], val: list[int], cap: int) -> int: function knapsack_dp_comp (line 61) | def knapsack_dp_comp(wgt: list[int], val: list[int], cap: int) -> int: FILE: ru/codes/python/chapter_dynamic_programming/min_cost_climbing_stairs_dp.py function min_cost_climbing_stairs_dp (line 8) | def min_cost_climbing_stairs_dp(cost: list[int]) -> int: function min_cost_climbing_stairs_dp_comp (line 23) | def min_cost_climbing_stairs_dp_comp(cost: list[int]) -> int: FILE: ru/codes/python/chapter_dynamic_programming/min_path_sum.py function min_path_sum_dfs (line 10) | def min_path_sum_dfs(grid: list[list[int]], i: int, j: int) -> int: function min_path_sum_dfs_mem (line 25) | def min_path_sum_dfs_mem( function min_path_sum_dp (line 46) | def min_path_sum_dp(grid: list[list[int]]) -> int: function min_path_sum_dp_comp (line 65) | def min_path_sum_dp_comp(grid: list[list[int]]) -> int: FILE: ru/codes/python/chapter_dynamic_programming/unbounded_knapsack.py function unbounded_knapsack_dp (line 8) | def unbounded_knapsack_dp(wgt: list[int], val: list[int], cap: int) -> int: function unbounded_knapsack_dp_comp (line 25) | def unbounded_knapsack_dp_comp(wgt: list[int], val: list[int], cap: int)... FILE: ru/codes/python/chapter_graph/graph_adjacency_list.py class GraphAdjList (line 14) | class GraphAdjList: method __init__ (line 17) | def __init__(self, edges: list[list[Vertex]]): method size (line 27) | def size(self) -> int: method add_edge (line 31) | def add_edge(self, vet1: Vertex, vet2: Vertex): method remove_edge (line 39) | def remove_edge(self, vet1: Vertex, vet2: Vertex): method add_vertex (line 47) | def add_vertex(self, vet: Vertex): method remove_vertex (line 54) | def remove_vertex(self, vet: Vertex): method print (line 65) | def print(self): FILE: ru/codes/python/chapter_graph/graph_adjacency_matrix.py class GraphAdjMat (line 14) | class GraphAdjMat: method __init__ (line 17) | def __init__(self, vertices: list[int], edges: list[list[int]]): method size (line 31) | def size(self) -> int: method add_vertex (line 35) | def add_vertex(self, val: int): method remove_vertex (line 47) | def remove_vertex(self, index: int): method add_edge (line 59) | def add_edge(self, i: int, j: int): method remove_edge (line 69) | def remove_edge(self, i: int, j: int): method print (line 78) | def print(self): FILE: ru/codes/python/chapter_graph/graph_bfs.py function graph_bfs (line 16) | def graph_bfs(graph: GraphAdjList, start_vet: Vertex) -> list[Vertex]: FILE: ru/codes/python/chapter_graph/graph_dfs.py function dfs (line 15) | def dfs(graph: GraphAdjList, visited: set[Vertex], res: list[Vertex], ve... function graph_dfs (line 27) | def graph_dfs(graph: GraphAdjList, start_vet: Vertex) -> list[Vertex]: FILE: ru/codes/python/chapter_greedy/coin_change_greedy.py function coin_change_greedy (line 8) | def coin_change_greedy(coins: list[int], amt: int) -> int: FILE: ru/codes/python/chapter_greedy/fractional_knapsack.py class Item (line 8) | class Item: method __init__ (line 11) | def __init__(self, w: int, v: int): function fractional_knapsack (line 16) | def fractional_knapsack(wgt: list[int], val: list[int], cap: int) -> int: FILE: ru/codes/python/chapter_greedy/max_capacity.py function max_capacity (line 8) | def max_capacity(ht: list[int]) -> int: FILE: ru/codes/python/chapter_greedy/max_product_cutting.py function max_product_cutting (line 10) | def max_product_cutting(n: int) -> int: FILE: ru/codes/python/chapter_hashing/array_hash_map.py class Pair (line 8) | class Pair: method __init__ (line 11) | def __init__(self, key: int, val: str): class ArrayHashMap (line 16) | class ArrayHashMap: method __init__ (line 19) | def __init__(self): method hash_func (line 24) | def hash_func(self, key: int) -> int: method get (line 29) | def get(self, key: int) -> str | None: method put (line 37) | def put(self, key: int, val: str): method remove (line 43) | def remove(self, key: int): method entry_set (line 49) | def entry_set(self) -> list[Pair]: method key_set (line 57) | def key_set(self) -> list[int]: method value_set (line 65) | def value_set(self) -> list[str]: method print (line 73) | def print(self): FILE: ru/codes/python/chapter_hashing/hash_map_chaining.py class HashMapChaining (line 14) | class HashMapChaining: method __init__ (line 17) | def __init__(self): method hash_func (line 25) | def hash_func(self, key: int) -> int: method load_factor (line 29) | def load_factor(self) -> float: method get (line 33) | def get(self, key: int) -> str | None: method put (line 44) | def put(self, key: int, val: str): method remove (line 61) | def remove(self, key: int): method extend (line 72) | def extend(self): method print (line 85) | def print(self): FILE: ru/codes/python/chapter_hashing/hash_map_open_addressing.py class HashMapOpenAddressing (line 14) | class HashMapOpenAddressing: method __init__ (line 17) | def __init__(self): method hash_func (line 26) | def hash_func(self, key: int) -> int: method load_factor (line 30) | def load_factor(self) -> float: method find_bucket (line 34) | def find_bucket(self, key: int) -> int: method get (line 56) | def get(self, key: int) -> str: method put (line 66) | def put(self, key: int, val: str): method remove (line 81) | def remove(self, key: int): method extend (line 90) | def extend(self): method print (line 103) | def print(self): FILE: ru/codes/python/chapter_hashing/simple_hash.py function add_hash (line 8) | def add_hash(key: str) -> int: function mul_hash (line 17) | def mul_hash(key: str) -> int: function xor_hash (line 26) | def xor_hash(key: str) -> int: function rot_hash (line 35) | def rot_hash(key: str) -> int: FILE: ru/codes/python/chapter_heap/heap.py function test_push (line 16) | def test_push(heap: list, val: int, flag: int = 1): function test_pop (line 22) | def test_pop(heap: list, flag: int = 1): FILE: ru/codes/python/chapter_heap/my_heap.py class MaxHeap (line 14) | class MaxHeap: method __init__ (line 17) | def __init__(self, nums: list[int]): method left (line 25) | def left(self, i: int) -> int: method right (line 29) | def right(self, i: int) -> int: method parent (line 33) | def parent(self, i: int) -> int: method swap (line 37) | def swap(self, i: int, j: int): method size (line 41) | def size(self) -> int: method is_empty (line 45) | def is_empty(self) -> bool: method peek (line 49) | def peek(self) -> int: method push (line 53) | def push(self, val: int): method sift_up (line 60) | def sift_up(self, i: int): method pop (line 73) | def pop(self) -> int: method sift_down (line 87) | def sift_down(self, i: int): method print (line 104) | def print(self): FILE: ru/codes/python/chapter_heap/top_k.py function top_k_heap (line 16) | def top_k_heap(nums: list[int], k: int) -> list[int]: FILE: ru/codes/python/chapter_searching/binary_search.py function binary_search (line 8) | def binary_search(nums: list[int], target: int) -> int: function binary_search_lcro (line 25) | def binary_search_lcro(nums: list[int], target: int) -> int: FILE: ru/codes/python/chapter_searching/binary_search_edge.py function binary_search_left_edge (line 14) | def binary_search_left_edge(nums: list[int], target: int) -> int: function binary_search_right_edge (line 25) | def binary_search_right_edge(nums: list[int], target: int) -> int: FILE: ru/codes/python/chapter_searching/binary_search_insertion.py function binary_search_insertion_simple (line 8) | def binary_search_insertion_simple(nums: list[int], target: int) -> int: function binary_search_insertion (line 23) | def binary_search_insertion(nums: list[int], target: int) -> int: FILE: ru/codes/python/chapter_searching/hashing_search.py function hashing_search_array (line 14) | def hashing_search_array(hmap: dict[int, int], target: int) -> int: function hashing_search_linkedlist (line 21) | def hashing_search_linkedlist( FILE: ru/codes/python/chapter_searching/linear_search.py function linear_search_array (line 14) | def linear_search_array(nums: list[int], target: int) -> int: function linear_search_linkedlist (line 23) | def linear_search_linkedlist(head: ListNode, target: int) -> ListNode | ... FILE: ru/codes/python/chapter_searching/two_sum.py function two_sum_brute_force (line 8) | def two_sum_brute_force(nums: list[int], target: int) -> list[int]: function two_sum_hash_table (line 18) | def two_sum_hash_table(nums: list[int], target: int) -> list[int]: FILE: ru/codes/python/chapter_sorting/bubble_sort.py function bubble_sort (line 8) | def bubble_sort(nums: list[int]): function bubble_sort_with_flag (line 20) | def bubble_sort_with_flag(nums: list[int]): FILE: ru/codes/python/chapter_sorting/bucket_sort.py function bucket_sort (line 8) | def bucket_sort(nums: list[float]): FILE: ru/codes/python/chapter_sorting/counting_sort.py function counting_sort_naive (line 8) | def counting_sort_naive(nums: list[int]): function counting_sort (line 26) | def counting_sort(nums: list[int]): FILE: ru/codes/python/chapter_sorting/heap_sort.py function sift_down (line 8) | def sift_down(nums: list[int], n: int, i: int): function heap_sort (line 28) | def heap_sort(nums: list[int]): FILE: ru/codes/python/chapter_sorting/insertion_sort.py function insertion_sort (line 8) | def insertion_sort(nums: list[int]): FILE: ru/codes/python/chapter_sorting/merge_sort.py function merge (line 8) | def merge(nums: list[int], left: int, mid: int, right: int): function merge_sort (line 38) | def merge_sort(nums: list[int], left: int, right: int): FILE: ru/codes/python/chapter_sorting/quick_sort.py class QuickSort (line 8) | class QuickSort: method partition (line 11) | def partition(self, nums: list[int], left: int, right: int) -> int: method quick_sort (line 26) | def quick_sort(self, nums: list[int], left: int, right: int): class QuickSortMedian (line 38) | class QuickSortMedian: method median_three (line 41) | def median_three(self, nums: list[int], left: int, mid: int, right: in... method partition (line 50) | def partition(self, nums: list[int], left: int, right: int) -> int: method quick_sort (line 69) | def quick_sort(self, nums: list[int], left: int, right: int): class QuickSortTailCall (line 81) | class QuickSortTailCall: method partition (line 84) | def partition(self, nums: list[int], left: int, right: int) -> int: method quick_sort (line 99) | def quick_sort(self, nums: list[int], left: int, right: int): FILE: ru/codes/python/chapter_sorting/radix_sort.py function digit (line 8) | def digit(num: int, exp: int) -> int: function counting_sort_digit (line 14) | def counting_sort_digit(nums: list[int], exp: int): function radix_sort (line 38) | def radix_sort(nums: list[int]): FILE: ru/codes/python/chapter_sorting/selection_sort.py function selection_sort (line 8) | def selection_sort(nums: list[int]): FILE: ru/codes/python/chapter_stack_and_queue/array_deque.py class ArrayDeque (line 8) | class ArrayDeque: method __init__ (line 11) | def __init__(self, capacity: int): method capacity (line 17) | def capacity(self) -> int: method size (line 21) | def size(self) -> int: method is_empty (line 25) | def is_empty(self) -> bool: method index (line 29) | def index(self, i: int) -> int: method push_first (line 36) | def push_first(self, num: int): method push_last (line 48) | def push_last(self, num: int): method pop_first (line 59) | def pop_first(self) -> int: method pop_last (line 67) | def pop_last(self) -> int: method peek_first (line 73) | def peek_first(self) -> int: method peek_last (line 79) | def peek_last(self) -> int: method to_array (line 87) | def to_array(self) -> list[int]: FILE: ru/codes/python/chapter_stack_and_queue/array_queue.py class ArrayQueue (line 8) | class ArrayQueue: method __init__ (line 11) | def __init__(self, size: int): method capacity (line 17) | def capacity(self) -> int: method size (line 21) | def size(self) -> int: method is_empty (line 25) | def is_empty(self) -> bool: method push (line 29) | def push(self, num: int): method pop (line 40) | def pop(self) -> int: method peek (line 48) | def peek(self) -> int: method to_list (line 54) | def to_list(self) -> list[int]: FILE: ru/codes/python/chapter_stack_and_queue/array_stack.py class ArrayStack (line 8) | class ArrayStack: method __init__ (line 11) | def __init__(self): method size (line 15) | def size(self) -> int: method is_empty (line 19) | def is_empty(self) -> bool: method push (line 23) | def push(self, item: int): method pop (line 27) | def pop(self) -> int: method peek (line 33) | def peek(self) -> int: method to_list (line 39) | def to_list(self) -> list[int]: FILE: ru/codes/python/chapter_stack_and_queue/linkedlist_deque.py class ListNode (line 8) | class ListNode: method __init__ (line 11) | def __init__(self, val: int): class LinkedListDeque (line 18) | class LinkedListDeque: method __init__ (line 21) | def __init__(self): method size (line 27) | def size(self) -> int: method is_empty (line 31) | def is_empty(self) -> bool: method push (line 35) | def push(self, num: int, is_front: bool): method push_first (line 55) | def push_first(self, num: int): method push_last (line 59) | def push_last(self, num: int): method pop (line 63) | def pop(self, is_front: bool) -> int: method pop_first (line 88) | def pop_first(self) -> int: method pop_last (line 92) | def pop_last(self) -> int: method peek_first (line 96) | def peek_first(self) -> int: method peek_last (line 102) | def peek_last(self) -> int: method to_array (line 108) | def to_array(self) -> list[int]: FILE: ru/codes/python/chapter_stack_and_queue/linkedlist_queue.py class LinkedListQueue (line 14) | class LinkedListQueue: method __init__ (line 17) | def __init__(self): method size (line 23) | def size(self) -> int: method is_empty (line 27) | def is_empty(self) -> bool: method push (line 31) | def push(self, num: int): method pop (line 45) | def pop(self) -> int: method peek (line 53) | def peek(self) -> int: method to_list (line 59) | def to_list(self) -> list[int]: FILE: ru/codes/python/chapter_stack_and_queue/linkedlist_stack.py class LinkedListStack (line 14) | class LinkedListStack: method __init__ (line 17) | def __init__(self): method size (line 22) | def size(self) -> int: method is_empty (line 26) | def is_empty(self) -> bool: method push (line 30) | def push(self, val: int): method pop (line 37) | def pop(self) -> int: method peek (line 44) | def peek(self) -> int: method to_list (line 50) | def to_list(self) -> list[int]: FILE: ru/codes/python/chapter_tree/array_binary_tree.py class ArrayBinaryTree (line 14) | class ArrayBinaryTree: method __init__ (line 17) | def __init__(self, arr: list[int | None]): method size (line 21) | def size(self): method val (line 25) | def val(self, i: int) -> int | None: method left (line 32) | def left(self, i: int) -> int | None: method right (line 36) | def right(self, i: int) -> int | None: method parent (line 40) | def parent(self, i: int) -> int | None: method level_order (line 44) | def level_order(self) -> list[int]: method dfs (line 53) | def dfs(self, i: int, order: str): method pre_order (line 69) | def pre_order(self) -> list[int]: method in_order (line 75) | def in_order(self) -> list[int]: method post_order (line 81) | def post_order(self) -> list[int]: FILE: ru/codes/python/chapter_tree/avl_tree.py class AVLTree (line 14) | class AVLTree: method __init__ (line 17) | def __init__(self): method get_root (line 21) | def get_root(self) -> TreeNode | None: method height (line 25) | def height(self, node: TreeNode | None) -> int: method update_height (line 32) | def update_height(self, node: TreeNode | None): method balance_factor (line 37) | def balance_factor(self, node: TreeNode | None) -> int: method right_rotate (line 45) | def right_rotate(self, node: TreeNode | None) -> TreeNode | None: method left_rotate (line 58) | def left_rotate(self, node: TreeNode | None) -> TreeNode | None: method rotate (line 71) | def rotate(self, node: TreeNode | None) -> TreeNode | None: method insert (line 96) | def insert(self, val): method insert_helper (line 100) | def insert_helper(self, node: TreeNode | None, val: int) -> TreeNode: method remove (line 117) | def remove(self, val: int): method remove_helper (line 121) | def remove_helper(self, node: TreeNode | None, val: int) -> TreeNode |... method search (line 151) | def search(self, val: int) -> TreeNode | None: function test_insert (line 172) | def test_insert(tree: AVLTree, val: int): function test_remove (line 177) | def test_remove(tree: AVLTree, val: int): FILE: ru/codes/python/chapter_tree/binary_search_tree.py class BinarySearchTree (line 14) | class BinarySearchTree: method __init__ (line 17) | def __init__(self): method get_root (line 22) | def get_root(self) -> TreeNode | None: method search (line 26) | def search(self, num: int) -> TreeNode | None: method insert (line 42) | def insert(self, num: int): method remove (line 68) | def remove(self, num: int): FILE: ru/codes/python/chapter_tree/binary_tree_bfs.py function level_order (line 15) | def level_order(root: TreeNode | None) -> list[int]: FILE: ru/codes/python/chapter_tree/binary_tree_dfs.py function pre_order (line 14) | def pre_order(root: TreeNode | None): function in_order (line 24) | def in_order(root: TreeNode | None): function post_order (line 34) | def post_order(root: TreeNode | None): FILE: ru/codes/python/modules/list_node.py class ListNode (line 8) | class ListNode: method __init__ (line 11) | def __init__(self, val: int): function list_to_linked_list (line 16) | def list_to_linked_list(arr: list[int]) -> ListNode | None: function linked_list_to_list (line 26) | def linked_list_to_list(head: ListNode | None) -> list[int]: FILE: ru/codes/python/modules/print_util.py function print_matrix (line 11) | def print_matrix(mat: list[list[int]]): function print_linked_list (line 19) | def print_linked_list(head: ListNode | None): class Trunk (line 25) | class Trunk: method __init__ (line 26) | def __init__(self, prev, string: str | None = None): function show_trunks (line 31) | def show_trunks(p: Trunk | None): function print_tree (line 38) | def print_tree( function print_dict (line 70) | def print_dict(hmap: dict): function print_heap (line 76) | def print_heap(heap: list[int]): FILE: ru/codes/python/modules/tree_node.py class TreeNode (line 10) | class TreeNode: method __init__ (line 13) | def __init__(self, val: int = 0): function list_to_tree_dfs (line 36) | def list_to_tree_dfs(arr: list[int], i: int) -> TreeNode | None: function list_to_tree (line 49) | def list_to_tree(arr: list[int]) -> TreeNode | None: function tree_to_list_dfs (line 54) | def tree_to_list_dfs(root: TreeNode, i: int, res: list[int]) -> list[int]: function tree_to_list (line 65) | def tree_to_list(root: TreeNode | None) -> list[int]: FILE: ru/codes/python/modules/vertex.py class Vertex (line 6) | class Vertex: method __init__ (line 9) | def __init__(self, val: int): function vals_to_vets (line 13) | def vals_to_vets(vals: list[int]) -> list["Vertex"]: function vets_to_vals (line 18) | def vets_to_vals(vets: list["Vertex"]) -> list[int]: FILE: ru/codes/ruby/chapter_array_and_linkedlist/array.rb function random_access (line 8) | def random_access(nums) function extend (line 20) | def extend(nums, enlarge) function insert (line 34) | def insert(nums, num, index) function remove (line 46) | def remove(nums, index) function traverse (line 54) | def traverse(nums) function find (line 69) | def find(nums, target) FILE: ru/codes/ruby/chapter_array_and_linkedlist/linked_list.rb function insert (line 12) | def insert(n0, _p) function remove (line 19) | def remove(n0) function access (line 29) | def access(head, index) function find (line 39) | def find(head, target) FILE: ru/codes/ruby/chapter_array_and_linkedlist/my_list.rb class MyList (line 8) | class MyList method initialize (line 13) | def initialize method get (line 21) | def get(index) method set (line 28) | def set(index, num) method add (line 34) | def add(num) method insert (line 44) | def insert(index, num) method remove (line 61) | def remove(index) method extend_capacity (line 78) | def extend_capacity method to_array (line 86) | def to_array FILE: ru/codes/ruby/chapter_backtracking/n_queens.rb function backtrack (line 8) | def backtrack(row, n, state, res, cols, diags1, diags2) function n_queens (line 35) | def n_queens(n) FILE: ru/codes/ruby/chapter_backtracking/permutations_i.rb function backtrack (line 8) | def backtrack(state, choices, selected, res) function permutations_i (line 32) | def permutations_i(nums) FILE: ru/codes/ruby/chapter_backtracking/permutations_ii.rb function backtrack (line 8) | def backtrack(state, choices, selected, res) function permutations_ii (line 34) | def permutations_ii(nums) FILE: ru/codes/ruby/chapter_backtracking/preorder_traversal_i_compact.rb function pre_order (line 11) | def pre_order(root) FILE: ru/codes/ruby/chapter_backtracking/preorder_traversal_ii_compact.rb function pre_order (line 11) | def pre_order(root) FILE: ru/codes/ruby/chapter_backtracking/preorder_traversal_iii_compact.rb function pre_order (line 11) | def pre_order(root) FILE: ru/codes/ruby/chapter_backtracking/preorder_traversal_iii_template.rb function is_solution? (line 11) | def is_solution?(state) function record_solution (line 16) | def record_solution(state, res) function is_valid? (line 21) | def is_valid?(state, choice) function make_choice (line 26) | def make_choice(state, choice) function undo_choice (line 31) | def undo_choice(state, choice) function backtrack (line 36) | def backtrack(state, choices, res) FILE: ru/codes/ruby/chapter_backtracking/subset_sum_i.rb function backtrack (line 8) | def backtrack(state, target, choices, start, res) function subset_sum_i (line 30) | def subset_sum_i(nums, target) FILE: ru/codes/ruby/chapter_backtracking/subset_sum_i_naive.rb function backtrack (line 8) | def backtrack(state, target, total, choices, res) function subset_sum_i_naive (line 29) | def subset_sum_i_naive(nums, target) FILE: ru/codes/ruby/chapter_backtracking/subset_sum_ii.rb function backtrack (line 8) | def backtrack(state, target, choices, start, res) function subset_sum_ii (line 34) | def subset_sum_ii(nums, target) FILE: ru/codes/ruby/chapter_computational_complexity/iteration.rb function for_loop (line 8) | def for_loop(n) function while_loop (line 20) | def while_loop(n) function while_loop_ii (line 34) | def while_loop_ii(n) function nested_for_loop (line 50) | def nested_for_loop(n) FILE: ru/codes/ruby/chapter_computational_complexity/recursion.rb function recur (line 8) | def recur(n) function for_loop_recur (line 18) | def for_loop_recur(n) function tail_recur (line 38) | def tail_recur(n, res) function fib (line 46) | def fib(n) FILE: ru/codes/ruby/chapter_computational_complexity/space_complexity.rb function function (line 12) | def function function constant (line 18) | def constant(n) function linear (line 31) | def linear(n) function linear_recur (line 43) | def linear_recur(n) function quadratic (line 50) | def quadratic(n) function quadratic_recur (line 56) | def quadratic_recur(n) function build_tree (line 65) | def build_tree(n) FILE: ru/codes/ruby/chapter_computational_complexity/time_complexity.rb function constant (line 8) | def constant(n) function linear (line 18) | def linear(n) function array_traversal (line 25) | def array_traversal(nums) function quadratic (line 37) | def quadratic(n) function bubble_sort (line 51) | def bubble_sort(nums) function exponential (line 72) | def exponential(n) function exp_recur (line 86) | def exp_recur(n) function logarithmic (line 92) | def logarithmic(n) function log_recur (line 104) | def log_recur(n) function linear_log_recur (line 110) | def linear_log_recur(n) function factorial_recur (line 120) | def factorial_recur(n) FILE: ru/codes/ruby/chapter_computational_complexity/worst_best_time_complexity.rb function random_numbers (line 8) | def random_numbers(n) function find_one (line 16) | def find_one(nums) FILE: ru/codes/ruby/chapter_divide_and_conquer/binary_search_recur.rb function dfs (line 8) | def dfs(nums, target, i, j) function binary_search (line 28) | def binary_search(nums, target) FILE: ru/codes/ruby/chapter_divide_and_conquer/build_tree.rb function dfs (line 11) | def dfs(preorder, inorder_map, i, l, r) function build_tree (line 29) | def build_tree(preorder, inorder) FILE: ru/codes/ruby/chapter_divide_and_conquer/hanota.rb function move (line 8) | def move(src, tar) function dfs (line 16) | def dfs(i, src, buf, tar) function solve_hanota (line 32) | def solve_hanota(_A, _B, _C) FILE: ru/codes/ruby/chapter_dynamic_programming/climbing_stairs_backtrack.rb function backtrack (line 8) | def backtrack(choices, state, n, res) function climbing_stairs_backtrack (line 23) | def climbing_stairs_backtrack(n) FILE: ru/codes/ruby/chapter_dynamic_programming/climbing_stairs_constraint_dp.rb function climbing_stairs_constraint_dp (line 8) | def climbing_stairs_constraint_dp(n) FILE: ru/codes/ruby/chapter_dynamic_programming/climbing_stairs_dfs.rb function dfs (line 8) | def dfs(i) function climbing_stairs_dfs (line 16) | def climbing_stairs_dfs(n) FILE: ru/codes/ruby/chapter_dynamic_programming/climbing_stairs_dfs_mem.rb function dfs (line 8) | def dfs(i, mem) function climbing_stairs_dfs_mem (line 21) | def climbing_stairs_dfs_mem(n) FILE: ru/codes/ruby/chapter_dynamic_programming/climbing_stairs_dp.rb function climbing_stairs_dp (line 8) | def climbing_stairs_dp(n) function climbing_stairs_dp_comp (line 22) | def climbing_stairs_dp_comp(n) FILE: ru/codes/ruby/chapter_dynamic_programming/coin_change.rb function coin_change_dp (line 8) | def coin_change_dp(coins, amt) function coin_change_dp_comp (line 31) | def coin_change_dp_comp(coins, amt) FILE: ru/codes/ruby/chapter_dynamic_programming/coin_change_ii.rb function coin_change_ii_dp (line 8) | def coin_change_ii_dp(coins, amt) function coin_change_ii_dp_comp (line 30) | def coin_change_ii_dp_comp(coins, amt) FILE: ru/codes/ruby/chapter_dynamic_programming/edit_distance.rb function edit_distance_dfs (line 8) | def edit_distance_dfs(s, t, i, j) function edit_distance_dfs_mem (line 25) | def edit_distance_dfs_mem(s, t, mem, i, j) function edit_distance_dp (line 45) | def edit_distance_dp(s, t) function edit_distance_dp_comp (line 67) | def edit_distance_dp_comp(s, t) FILE: ru/codes/ruby/chapter_dynamic_programming/knapsack.rb function knapsack_dfs (line 8) | def knapsack_dfs(wgt, val, i, c) function knapsack_dfs_mem (line 21) | def knapsack_dfs_mem(wgt, val, mem, i, c) function knapsack_dp (line 36) | def knapsack_dp(wgt, val, cap) function knapsack_dp_comp (line 56) | def knapsack_dp_comp(wgt, val, cap) FILE: ru/codes/ruby/chapter_dynamic_programming/min_cost_climbing_stairs_dp.rb function min_cost_climbing_stairs_dp (line 8) | def min_cost_climbing_stairs_dp(cost) function min_cost_climbing_stairs_dp_comp (line 21) | def min_cost_climbing_stairs_dp_comp(cost) FILE: ru/codes/ruby/chapter_dynamic_programming/min_path_sum.rb function min_path_sum_dfs (line 8) | def min_path_sum_dfs(grid, i, j) function min_path_sum_dfs_mem (line 21) | def min_path_sum_dfs_mem(grid, mem, i, j) function min_path_sum_dp (line 36) | def min_path_sum_dp(grid) function min_path_sum_dp_comp (line 55) | def min_path_sum_dp_comp(grid) FILE: ru/codes/ruby/chapter_dynamic_programming/unbounded_knapsack.rb function unbounded_knapsack_dp (line 8) | def unbounded_knapsack_dp(wgt, val, cap) function unbounded_knapsack_dp_comp (line 28) | def unbounded_knapsack_dp_comp(wgt, val, cap) FILE: ru/codes/ruby/chapter_graph/graph_adjacency_list.rb class GraphAdjList (line 10) | class GraphAdjList method initialize (line 14) | def initialize(edges) method size (line 26) | def size method add_edge (line 31) | def add_edge(vet1, vet2) method remove_edge (line 39) | def remove_edge(vet1, vet2) method add_vertex (line 48) | def add_vertex(vet) method remove_vertex (line 56) | def remove_vertex(vet) method __print__ (line 68) | def __print__ FILE: ru/codes/ruby/chapter_graph/graph_adjacency_matrix.rb class GraphAdjMat (line 10) | class GraphAdjMat method initialize (line 11) | def initialize(vertices, edges) method size (line 25) | def size method add_vertex (line 30) | def add_vertex(val) method remove_vertex (line 42) | def remove_vertex(index) method add_edge (line 54) | def add_edge(i, j) method remove_edge (line 66) | def remove_edge(i, j) method __print__ (line 77) | def __print__ FILE: ru/codes/ruby/chapter_graph/graph_bfs.rb function graph_bfs (line 12) | def graph_bfs(graph, start_vet) FILE: ru/codes/ruby/chapter_graph/graph_dfs.rb function dfs (line 12) | def dfs(graph, visited, res, vet) function graph_dfs (line 24) | def graph_dfs(graph, start_vet) FILE: ru/codes/ruby/chapter_greedy/coin_change_greedy.rb function coin_change_greedy (line 8) | def coin_change_greedy(coins, amt) FILE: ru/codes/ruby/chapter_greedy/fractional_knapsack.rb class Item (line 8) | class Item method initialize (line 12) | def initialize(w, v) function fractional_knapsack (line 19) | def fractional_knapsack(wgt, val, cap) FILE: ru/codes/ruby/chapter_greedy/max_capacity.rb function max_capacity (line 8) | def max_capacity(ht) FILE: ru/codes/ruby/chapter_greedy/max_product_cutting.rb function max_product_cutting (line 8) | def max_product_cutting(n) FILE: ru/codes/ruby/chapter_hashing/array_hash_map.rb class Pair (line 8) | class Pair method initialize (line 11) | def initialize(key, val) class ArrayHashMap (line 18) | class ArrayHashMap method initialize (line 20) | def initialize method hash_func (line 26) | def hash_func(key) method get (line 31) | def get(key) method put (line 40) | def put(key, val) method remove (line 47) | def remove(key) method entry_set (line 54) | def entry_set method key_set (line 61) | def key_set method value_set (line 68) | def value_set method print (line 75) | def print FILE: ru/codes/ruby/chapter_hashing/hash_map_chaining.rb class HashMapChaining (line 10) | class HashMapChaining method initialize (line 12) | def initialize method hash_func (line 21) | def hash_func(key) method load_factor (line 26) | def load_factor method get (line 31) | def get(key) method put (line 43) | def put(key, val) method remove (line 62) | def remove(key) method extend (line 76) | def extend method print (line 92) | def print FILE: ru/codes/ruby/chapter_hashing/hash_map_open_addressing.rb class HashMapOpenAddressing (line 10) | class HashMapOpenAddressing method initialize (line 14) | def initialize method hash_func (line 23) | def hash_func(key) method load_factor (line 28) | def load_factor method find_bucket (line 33) | def find_bucket(key) method get (line 58) | def get(key) method put (line 68) | def put(key, val) method remove (line 84) | def remove(key) method extend (line 95) | def extend method print (line 109) | def print FILE: ru/codes/ruby/chapter_hashing/simple_hash.rb function add_hash (line 8) | def add_hash(key) function mul_hash (line 18) | def mul_hash(key) function xor_hash (line 28) | def xor_hash(key) function rot_hash (line 38) | def rot_hash(key) FILE: ru/codes/ruby/chapter_heap/my_heap.rb class MaxHeap (line 10) | class MaxHeap method initialize (line 14) | def initialize(nums) method left (line 24) | def left(i) method right (line 29) | def right(i) method parent (line 34) | def parent(i) method swap (line 39) | def swap(i, j) method size (line 44) | def size method is_empty? (line 49) | def is_empty? method peek (line 54) | def peek method push (line 59) | def push(val) method sift_up (line 67) | def sift_up(i) method pop (line 81) | def pop method sift_down (line 95) | def sift_down(i) method __print__ (line 113) | def __print__ FILE: ru/codes/ruby/chapter_heap/top_k.rb function push_min_heap (line 10) | def push_min_heap(heap, val) function pop_min_heap (line 16) | def pop_min_heap(heap) function peek_min_heap (line 22) | def peek_min_heap(heap) function get_min_heap (line 28) | def get_min_heap(heap) function top_k_heap (line 34) | def top_k_heap(nums, k) FILE: ru/codes/ruby/chapter_searching/binary_search.rb function binary_search (line 8) | def binary_search(nums, target) function binary_search_lcro (line 30) | def binary_search_lcro(nums, target) FILE: ru/codes/ruby/chapter_searching/binary_search_edge.rb function binary_search_left_edge (line 10) | def binary_search_left_edge(nums, target) function binary_search_right_edge (line 21) | def binary_search_right_edge(nums, target) FILE: ru/codes/ruby/chapter_searching/binary_search_insertion.rb function binary_search_insertion_simple (line 8) | def binary_search_insertion_simple(nums, target) function binary_search_insertion (line 29) | def binary_search_insertion(nums, target) FILE: ru/codes/ruby/chapter_searching/hashing_search.rb function hashing_search_array (line 10) | def hashing_search_array(hmap, target) function hashing_search_linkedlist (line 17) | def hashing_search_linkedlist(hmap, target) FILE: ru/codes/ruby/chapter_searching/linear_search.rb function linear_search_array (line 10) | def linear_search_array(nums, target) function linear_search_linkedlist (line 20) | def linear_search_linkedlist(head, target) FILE: ru/codes/ruby/chapter_searching/two_sum.rb function two_sum_brute_force (line 8) | def two_sum_brute_force(nums, target) function two_sum_hash_table (line 20) | def two_sum_hash_table(nums, target) FILE: ru/codes/ruby/chapter_sorting/bubble_sort.rb function bubble_sort (line 8) | def bubble_sort(nums) function bubble_sort_with_flag (line 23) | def bubble_sort_with_flag(nums) FILE: ru/codes/ruby/chapter_sorting/bucket_sort.rb function bucket_sort (line 8) | def bucket_sort(nums) FILE: ru/codes/ruby/chapter_sorting/counting_sort.rb function counting_sort_naive (line 8) | def counting_sort_naive(nums) function counting_sort (line 28) | def counting_sort(nums) FILE: ru/codes/ruby/chapter_sorting/heap_sort.rb function sift_down (line 8) | def sift_down(nums, n, i) function heap_sort (line 26) | def heap_sort(nums) FILE: ru/codes/ruby/chapter_sorting/insertion_sort.rb function insertion_sort (line 8) | def insertion_sort(nums) FILE: ru/codes/ruby/chapter_sorting/merge_sort.rb function merge (line 8) | def merge(nums, left, mid, right) function merge_sort (line 43) | def merge_sort(nums, left, right) FILE: ru/codes/ruby/chapter_sorting/quick_sort.rb class QuickSort (line 8) | class QuickSort method partition (line 11) | def partition(nums, left, right) method quick_sort (line 30) | def quick_sort(nums, left, right) class QuickSortMedian (line 45) | class QuickSortMedian method median_three (line 48) | def median_three(nums, left, mid, right) method partition (line 59) | def partition(nums, left, right) method quick_sort (line 81) | def quick_sort(nums, left, right) class QuickSortTailCall (line 96) | class QuickSortTailCall method partition (line 99) | def partition(nums, left, right) method quick_sort (line 119) | def quick_sort(nums, left, right) FILE: ru/codes/ruby/chapter_sorting/radix_sort.rb function digit (line 8) | def digit(num, exp) function counting_sort_digit (line 14) | def counting_sort_digit(nums, exp) function radix_sort (line 38) | def radix_sort(nums) FILE: ru/codes/ruby/chapter_sorting/selection_sort.rb function selection_sort (line 8) | def selection_sort(nums) FILE: ru/codes/ruby/chapter_stack_and_queue/array_deque.rb class ArrayDeque (line 8) | class ArrayDeque method initialize (line 13) | def initialize(capacity) method capacity (line 20) | def capacity method is_empty? (line 25) | def is_empty? method push_first (line 30) | def push_first(num) method push_last (line 45) | def push_last(num) method pop_first (line 59) | def pop_first method pop_last (line 68) | def pop_last method peek_first (line 75) | def peek_first method peek_last (line 82) | def peek_last method to_array (line 91) | def to_array method index (line 103) | def index(i) FILE: ru/codes/ruby/chapter_stack_and_queue/array_queue.rb class ArrayQueue (line 8) | class ArrayQueue method initialize (line 13) | def initialize(size) method capacity (line 20) | def capacity method is_empty? (line 25) | def is_empty? method push (line 30) | def push(num) method pop (line 42) | def pop method peek (line 51) | def peek method to_array (line 58) | def to_array FILE: ru/codes/ruby/chapter_stack_and_queue/array_stack.rb class ArrayStack (line 8) | class ArrayStack method initialize (line 10) | def initialize method size (line 15) | def size method is_empty? (line 20) | def is_empty? method push (line 25) | def push(item) method pop (line 30) | def pop method peek (line 37) | def peek method to_array (line 44) | def to_array FILE: ru/codes/ruby/chapter_stack_and_queue/linkedlist_deque.rb class ListNode (line 8) | class ListNode method initialize (line 14) | def initialize(val) class LinkedListDeque (line 20) | class LinkedListDeque method initialize (line 25) | def initialize method is_empty? (line 32) | def is_empty? method push (line 37) | def push(num, is_front) method push_first (line 59) | def push_first(num) method push_last (line 64) | def push_last(num) method pop (line 69) | def pop(is_front) method pop_first (line 99) | def pop_first method pop_last (line 104) | def pop_last method peek_first (line 109) | def peek_first method peek_last (line 116) | def peek_last method to_array (line 123) | def to_array FILE: ru/codes/ruby/chapter_stack_and_queue/linkedlist_queue.rb class LinkedListQueue (line 10) | class LinkedListQueue method initialize (line 15) | def initialize method is_empty? (line 22) | def is_empty? method push (line 27) | def push(num) method pop (line 45) | def pop method peek (line 54) | def peek method to_array (line 61) | def to_array FILE: ru/codes/ruby/chapter_stack_and_queue/linkedlist_stack.rb class LinkedListStack (line 10) | class LinkedListStack method initialize (line 14) | def initialize method is_empty? (line 19) | def is_empty? method push (line 24) | def push(val) method pop (line 32) | def pop method peek (line 40) | def peek method to_array (line 47) | def to_array FILE: ru/codes/ruby/chapter_tree/array_binary_tree.rb class ArrayBinaryTree (line 11) | class ArrayBinaryTree method initialize (line 13) | def initialize(arr) method size (line 18) | def size method val (line 23) | def val(i) method left (line 31) | def left(i) method right (line 36) | def right(i) method parent (line 41) | def parent(i) method level_order (line 46) | def level_order method dfs (line 58) | def dfs(i, order) method pre_order (line 71) | def pre_order method in_order (line 78) | def in_order method post_order (line 85) | def post_order FILE: ru/codes/ruby/chapter_tree/avl_tree.rb class AVLTree (line 11) | class AVLTree method initialize (line 13) | def initialize method get_root (line 18) | def get_root method height (line 23) | def height(node) method update_height (line 31) | def update_height(node) method balance_factor (line 37) | def balance_factor(node) method right_rotate (line 46) | def right_rotate(node) method left_rotate (line 60) | def left_rotate(node) method rotate (line 74) | def rotate(node) method insert (line 103) | def insert(val) method insert_helper (line 108) | def insert_helper(node, val) method remove (line 126) | def remove(val) method remove_helper (line 131) | def remove_helper(node, val) method search (line 162) | def search(val) function test_insert (line 184) | def test_insert(tree, val) function test_remove (line 190) | def test_remove(tree, val) FILE: ru/codes/ruby/chapter_tree/binary_search_tree.rb class BinarySearchTree (line 11) | class BinarySearchTree method initialize (line 13) | def initialize method get_root (line 19) | def get_root method search (line 24) | def search(num) method insert (line 45) | def insert(num) method remove (line 78) | def remove(num) FILE: ru/codes/ruby/chapter_tree/binary_tree_bfs.rb function level_order (line 11) | def level_order(root) FILE: ru/codes/ruby/chapter_tree/binary_tree_dfs.rb function pre_order (line 11) | def pre_order(root) function in_order (line 21) | def in_order(root) function post_order (line 31) | def post_order(root) FILE: ru/codes/ruby/utils/list_node.rb class ListNode (line 8) | class ListNode method initialize (line 12) | def initialize(val=0, next_node=nil) function arr_to_linked_list (line 19) | def arr_to_linked_list(arr) function linked_list_to_arr (line 31) | def linked_list_to_arr(head) FILE: ru/codes/ruby/utils/print_util.rb function print_matrix (line 10) | def print_matrix(mat) function print_linked_list (line 17) | def print_linked_list(head) class Trunk (line 26) | class Trunk method initialize (line 29) | def initialize(prev, str) function show_trunk (line 35) | def show_trunk(p) function print_tree (line 45) | def print_tree(root, prev=nil, is_right=false) function print_hash_map (line 70) | def print_hash_map(hmap) function print_heap (line 75) | def print_heap(heap) FILE: ru/codes/ruby/utils/tree_node.rb class TreeNode (line 8) | class TreeNode method initialize (line 14) | def initialize(val=0) function arr_to_tree_dfs (line 21) | def arr_to_tree_dfs(arr, i) function arr_to_tree (line 33) | def arr_to_tree(arr) function tree_to_arr_dfs (line 38) | def tree_to_arr_dfs(root, i, res) function tree_to_arr (line 49) | def tree_to_arr(root) FILE: ru/codes/ruby/utils/vertex.rb class Vertex (line 8) | class Vertex method initialize (line 11) | def initialize(val) function vals_to_vets (line 17) | def vals_to_vets(vals) function vets_to_vals (line 22) | def vets_to_vals(vets) FILE: ru/codes/rust/chapter_array_and_linkedlist/array.rs function random_access (line 11) | fn random_access(nums: &[i32]) -> i32 { function extend (line 20) | fn extend(nums: &[i32], enlarge: usize) -> Vec { function insert (line 31) | fn insert(nums: &mut [i32], num: i32, index: usize) { function remove (line 41) | fn remove(nums: &mut [i32], index: usize) { function traverse (line 49) | fn traverse(nums: &[i32]) { function find (line 63) | fn find(nums: &[i32], target: i32) -> Option { function main (line 73) | fn main() { FILE: ru/codes/rust/chapter_array_and_linkedlist/linked_list.rs function insert (line 13) | pub fn insert(n0: &Rc>>, P: Rc(n0: &Rc>>) { function access (line 31) | pub fn access(head: Rc>>, index: i32) -> Option(head: Rc>>, target: T) -> ... function main (line 67) | fn main() { FILE: ru/codes/rust/chapter_array_and_linkedlist/list.rs function main (line 9) | fn main() { FILE: ru/codes/rust/chapter_array_and_linkedlist/my_list.rs type MyList (line 11) | struct MyList { method new (line 21) | pub fn new(capacity: usize) -> Self { method size (line 32) | pub fn size(&self) -> usize { method capacity (line 37) | pub fn capacity(&self) -> usize { method get (line 42) | pub fn get(&self, index: usize) -> i32 { method set (line 51) | pub fn set(&mut self, index: usize, num: i32) { method add (line 59) | pub fn add(&mut self, num: i32) { method insert (line 70) | pub fn insert(&mut self, index: usize, num: i32) { method remove (line 88) | pub fn remove(&mut self, index: usize) -> i32 { method extend_capacity (line 104) | pub fn extend_capacity(&mut self) { method to_array (line 113) | pub fn to_array(&self) -> Vec { function main (line 124) | fn main() { FILE: ru/codes/rust/chapter_backtracking/n_queens.rs function backtrack (line 8) | fn backtrack( function n_queens (line 42) | fn n_queens(n: usize) -> Vec>> { function main (line 64) | pub fn main() { FILE: ru/codes/rust/chapter_backtracking/permutations_i.rs function backtrack (line 8) | fn backtrack(mut state: Vec, choices: &[i32], selected: &mut [bool]... function permutations_i (line 32) | fn permutations_i(nums: &mut [i32]) -> Vec> { function main (line 39) | pub fn main() { FILE: ru/codes/rust/chapter_backtracking/permutations_ii.rs function backtrack (line 10) | fn backtrack(mut state: Vec, choices: &[i32], selected: &mut [bool]... function permutations_ii (line 36) | fn permutations_ii(nums: &mut [i32]) -> Vec> { function main (line 43) | pub fn main() { FILE: ru/codes/rust/chapter_backtracking/preorder_traversal_i_compact.rs function pre_order (line 11) | fn pre_order(res: &mut Vec>>, root: Option<&Rc>>) -> bool { function record_solution (line 16) | fn record_solution( function is_valid (line 24) | fn is_valid(_: &mut Vec>>, choice: Option<&Rc>>, choice: Rc>>, _: Rc Vec> { function main (line 48) | pub fn main() { FILE: ru/codes/rust/chapter_backtracking/subset_sum_i_naive.rs function backtrack (line 8) | fn backtrack( function subset_sum_i_naive (line 36) | fn subset_sum_i_naive(nums: &[i32], target: i32) -> Vec> { function main (line 45) | pub fn main() { FILE: ru/codes/rust/chapter_backtracking/subset_sum_ii.rs function backtrack (line 8) | fn backtrack( function subset_sum_ii (line 43) | fn subset_sum_ii(nums: &mut [i32], target: i32) -> Vec> { function main (line 53) | pub fn main() { FILE: ru/codes/rust/chapter_computational_complexity/iteration.rs function for_loop (line 8) | fn for_loop(n: i32) -> i32 { function while_loop (line 18) | fn while_loop(n: i32) -> i32 { function while_loop_ii (line 31) | fn while_loop_ii(n: i32) -> i32 { function nested_for_loop (line 46) | fn nested_for_loop(n: i32) -> String { function main (line 59) | fn main() { FILE: ru/codes/rust/chapter_computational_complexity/recursion.rs function recur (line 8) | fn recur(n: i32) -> i32 { function for_loop_recur (line 20) | fn for_loop_recur(n: i32) -> i32 { function tail_recur (line 39) | fn tail_recur(n: i32, res: i32) -> i32 { function fib (line 49) | fn fib(n: i32) -> i32 { function main (line 61) | fn main() { FILE: ru/codes/rust/chapter_computational_complexity/space_complexity.rs function function (line 13) | fn function() -> i32 { function constant (line 20) | fn constant(n: i32) { function linear (line 38) | fn linear(n: i32) { function linear_recur (line 54) | fn linear_recur(n: i32) { function quadratic (line 64) | fn quadratic(n: i32) { function quadratic_recur (line 79) | fn quadratic_recur(n: i32) -> i32 { function build_tree (line 90) | fn build_tree(n: i32) -> Option>> { function main (line 101) | fn main() { FILE: ru/codes/rust/chapter_computational_complexity/time_complexity.rs function constant (line 8) | fn constant(n: i32) -> i32 { function linear (line 19) | fn linear(n: i32) -> i32 { function array_traversal (line 28) | fn array_traversal(nums: &[i32]) -> i32 { function quadratic (line 38) | fn quadratic(n: i32) -> i32 { function bubble_sort (line 50) | fn bubble_sort(nums: &mut [i32]) -> i32 { function exponential (line 70) | fn exponential(n: i32) -> i32 { function exp_recur (line 85) | fn exp_recur(n: i32) -> i32 { function logarithmic (line 93) | fn logarithmic(mut n: i32) -> i32 { function log_recur (line 103) | fn log_recur(n: i32) -> i32 { function linear_log_recur (line 111) | fn linear_log_recur(n: i32) -> i32 { function factorial_recur (line 123) | fn factorial_recur(n: i32) -> i32 { function main (line 136) | fn main() { FILE: ru/codes/rust/chapter_computational_complexity/worst_best_time_complexity.rs function random_numbers (line 12) | fn random_numbers(n: i32) -> Vec { function find_one (line 21) | fn find_one(nums: &[i32]) -> Option { function main (line 33) | fn main() { FILE: ru/codes/rust/chapter_divide_and_conquer/binary_search_recur.rs function dfs (line 8) | fn dfs(nums: &[i32], target: i32, i: i32, j: i32) -> i32 { function binary_search (line 27) | fn binary_search(nums: &[i32], target: i32) -> i32 { function main (line 34) | pub fn main() { FILE: ru/codes/rust/chapter_divide_and_conquer/build_tree.rs function dfs (line 12) | fn dfs( function build_tree (line 36) | fn build_tree(preorder: &[i32], inorder: &[i32]) -> Option, tar: &mut Vec) { function dfs (line 18) | fn dfs(i: i32, src: &mut Vec, buf: &mut Vec, tar: &mut Vec, B: &mut Vec, C: &mut Vec) { function main (line 40) | pub fn main() { FILE: ru/codes/rust/chapter_dynamic_programming/climbing_stairs_backtrack.rs function backtrack (line 8) | fn backtrack(choices: &[i32], state: i32, n: i32, res: &mut [i32]) { function climbing_stairs_backtrack (line 26) | fn climbing_stairs_backtrack(n: usize) -> i32 { function main (line 36) | pub fn main() { FILE: ru/codes/rust/chapter_dynamic_programming/climbing_stairs_constraint_dp.rs function climbing_stairs_constraint_dp (line 8) | fn climbing_stairs_constraint_dp(n: usize) -> i32 { function main (line 28) | pub fn main() { FILE: ru/codes/rust/chapter_dynamic_programming/climbing_stairs_dfs.rs function dfs (line 8) | fn dfs(i: usize) -> i32 { function climbing_stairs_dfs (line 19) | fn climbing_stairs_dfs(n: usize) -> i32 { function main (line 24) | pub fn main() { FILE: ru/codes/rust/chapter_dynamic_programming/climbing_stairs_dfs_mem.rs function dfs (line 8) | fn dfs(i: usize, mem: &mut [i32]) -> i32 { function climbing_stairs_dfs_mem (line 25) | fn climbing_stairs_dfs_mem(n: usize) -> i32 { function main (line 32) | pub fn main() { FILE: ru/codes/rust/chapter_dynamic_programming/climbing_stairs_dp.rs function climbing_stairs_dp (line 8) | fn climbing_stairs_dp(n: usize) -> i32 { function climbing_stairs_dp_comp (line 26) | fn climbing_stairs_dp_comp(n: usize) -> i32 { function main (line 40) | pub fn main() { FILE: ru/codes/rust/chapter_dynamic_programming/coin_change.rs function coin_change_dp (line 8) | fn coin_change_dp(coins: &[i32], amt: usize) -> i32 { function coin_change_dp_comp (line 37) | fn coin_change_dp_comp(coins: &[i32], amt: usize) -> i32 { function main (line 64) | pub fn main() { FILE: ru/codes/rust/chapter_dynamic_programming/coin_change_ii.rs function coin_change_ii_dp (line 8) | fn coin_change_ii_dp(coins: &[i32], amt: usize) -> i32 { function coin_change_ii_dp_comp (line 32) | fn coin_change_ii_dp_comp(coins: &[i32], amt: usize) -> i32 { function main (line 53) | pub fn main() { FILE: ru/codes/rust/chapter_dynamic_programming/edit_distance.rs function edit_distance_dfs (line 8) | fn edit_distance_dfs(s: &str, t: &str, i: usize, j: usize) -> i32 { function edit_distance_dfs_mem (line 34) | fn edit_distance_dfs_mem(s: &str, t: &str, mem: &mut Vec>, i: u... function edit_distance_dp (line 65) | fn edit_distance_dp(s: &str, t: &str) -> i32 { function edit_distance_dp_comp (line 92) | fn edit_distance_dp_comp(s: &str, t: &str) -> i32 { function main (line 121) | pub fn main() { FILE: ru/codes/rust/chapter_dynamic_programming/knapsack.rs function knapsack_dfs (line 8) | fn knapsack_dfs(wgt: &[i32], val: &[i32], i: usize, c: usize) -> i32 { function knapsack_dfs_mem (line 25) | fn knapsack_dfs_mem(wgt: &[i32], val: &[i32], mem: &mut Vec>, i... function knapsack_dp (line 47) | fn knapsack_dp(wgt: &[i32], val: &[i32], cap: usize) -> i32 { function knapsack_dp_comp (line 70) | fn knapsack_dp_comp(wgt: &[i32], val: &[i32], cap: usize) -> i32 { function main (line 88) | pub fn main() { FILE: ru/codes/rust/chapter_dynamic_programming/min_cost_climbing_stairs_dp.rs function min_cost_climbing_stairs_dp (line 10) | fn min_cost_climbing_stairs_dp(cost: &[i32]) -> i32 { function min_cost_climbing_stairs_dp_comp (line 28) | fn min_cost_climbing_stairs_dp_comp(cost: &[i32]) -> i32 { function main (line 43) | pub fn main() { FILE: ru/codes/rust/chapter_dynamic_programming/min_path_sum.rs function min_path_sum_dfs (line 8) | fn min_path_sum_dfs(grid: &Vec>, i: i32, j: i32) -> i32 { function min_path_sum_dfs_mem (line 25) | fn min_path_sum_dfs_mem(grid: &Vec>, mem: &mut Vec>, i... function min_path_sum_dp (line 47) | fn min_path_sum_dp(grid: &Vec>) -> i32 { function min_path_sum_dp_comp (line 70) | fn min_path_sum_dp_comp(grid: &Vec>) -> i32 { function main (line 92) | pub fn main() { FILE: ru/codes/rust/chapter_dynamic_programming/unbounded_knapsack.rs function unbounded_knapsack_dp (line 8) | fn unbounded_knapsack_dp(wgt: &[i32], val: &[i32], cap: usize) -> i32 { function unbounded_knapsack_dp_comp (line 28) | fn unbounded_knapsack_dp_comp(wgt: &[i32], val: &[i32], cap: usize) -> i... function main (line 48) | pub fn main() { FILE: ru/codes/rust/chapter_graph/graph_adjacency_list.rs type GraphAdjList (line 12) | pub struct GraphAdjList { method new (line 19) | pub fn new(edges: Vec<[Vertex; 2]>) -> Self { method size (line 35) | pub fn size(&self) -> usize { method add_edge (line 40) | pub fn add_edge(&mut self, vet1: Vertex, vet2: Vertex) { method remove_edge (line 51) | pub fn remove_edge(&mut self, vet1: Vertex, vet2: Vertex) { method add_vertex (line 65) | pub fn add_vertex(&mut self, vet: Vertex) { method remove_vertex (line 75) | pub fn remove_vertex(&mut self, vet: Vertex) { method print (line 85) | pub fn print(&self) { function main (line 96) | fn main() { FILE: ru/codes/rust/chapter_graph/graph_adjacency_matrix.rs type GraphAdjMat (line 8) | pub struct GraphAdjMat { method new (line 17) | pub fn new(vertices: Vec, edges: Vec<[usize; 2]>) -> Self { method size (line 36) | pub fn size(&self) -> usize { method add_vertex (line 41) | pub fn add_vertex(&mut self, val: i32) { method remove_vertex (line 54) | pub fn remove_vertex(&mut self, index: usize) { method add_edge (line 69) | pub fn add_edge(&mut self, i: usize, j: usize) { method remove_edge (line 82) | pub fn remove_edge(&mut self, i: usize, j: usize) { method print (line 93) | pub fn print(&self) { function main (line 105) | fn main() { FILE: ru/codes/rust/chapter_graph/graph_bfs.rs function graph_bfs (line 15) | fn graph_bfs(graph: GraphAdjList, start_vet: Vertex) -> Vec { function main (line 44) | fn main() { FILE: ru/codes/rust/chapter_graph/graph_dfs.rs function dfs (line 14) | fn dfs(graph: &GraphAdjList, visited: &mut HashSet, res: &mut Ve... function graph_dfs (line 31) | fn graph_dfs(graph: GraphAdjList, start_vet: Vertex) -> Vec { function main (line 42) | fn main() { FILE: ru/codes/rust/chapter_greedy/coin_change_greedy.rs function coin_change_greedy (line 8) | fn coin_change_greedy(coins: &[i32], mut amt: i32) -> i32 { function main (line 31) | fn main() { FILE: ru/codes/rust/chapter_greedy/fractional_knapsack.rs type Item (line 8) | struct Item { method new (line 14) | fn new(w: i32, v: i32) -> Self { function fractional_knapsack (line 20) | fn fractional_knapsack(wgt: &[i32], val: &[i32], mut cap: i32) -> f64 { function main (line 51) | fn main() { FILE: ru/codes/rust/chapter_greedy/max_capacity.rs function max_capacity (line 8) | fn max_capacity(ht: &[i32]) -> i32 { function main (line 30) | fn main() { FILE: ru/codes/rust/chapter_greedy/max_product_cutting.rs function max_product_cutting (line 8) | fn max_product_cutting(n: i32) -> i32 { function main (line 29) | fn main() { FILE: ru/codes/rust/chapter_hashing/array_hash_map.rs type Pair (line 9) | pub struct Pair { type ArrayHashMap (line 14) | pub struct ArrayHashMap { method new (line 19) | pub fn new() -> ArrayHashMap { method hash_func (line 27) | fn hash_func(&self, key: i32) -> usize { method get (line 32) | pub fn get(&self, key: i32) -> Option<&String> { method put (line 38) | pub fn put(&mut self, key: i32, val: &str) { method remove (line 47) | pub fn remove(&mut self, key: i32) { method entry_set (line 54) | pub fn entry_set(&self) -> Vec<&Pair> { method key_set (line 62) | pub fn key_set(&self) -> Vec<&i32> { method value_set (line 70) | pub fn value_set(&self) -> Vec<&String> { method print (line 78) | pub fn print(&self) { function main (line 85) | fn main() { FILE: ru/codes/rust/chapter_hashing/build_in_hash.rs function main (line 13) | fn main() { FILE: ru/codes/rust/chapter_hashing/hash_map.rs function main (line 12) | pub fn main() { FILE: ru/codes/rust/chapter_hashing/hash_map_chaining.rs type Pair (line 9) | struct Pair { type HashMapChaining (line 15) | struct HashMapChaining { method new (line 25) | fn new() -> Self { method hash_func (line 36) | fn hash_func(&self, key: i32) -> usize { method load_factor (line 41) | fn load_factor(&self) -> f32 { method remove (line 46) | fn remove(&mut self, key: i32) -> Option { method extend (line 63) | fn extend(&mut self) { method print (line 81) | fn print(&self) { method put (line 92) | fn put(&mut self, key: i32, val: String) { method get (line 115) | fn get(&self, key: i32) -> Option<&str> { function main (line 131) | pub fn main() { FILE: ru/codes/rust/chapter_hashing/hash_map_open_addressing.rs type HashMapOpenAddressing (line 14) | struct HashMapOpenAddressing { method new (line 25) | fn new() -> Self { method hash_func (line 40) | fn hash_func(&self, key: i32) -> usize { method load_factor (line 45) | fn load_factor(&self) -> f64 { method find_bucket (line 50) | fn find_bucket(&mut self, key: i32) -> usize { method get (line 81) | fn get(&mut self, key: i32) -> Option<&str> { method put (line 93) | fn put(&mut self, key: i32, val: String) { method remove (line 111) | fn remove(&mut self, key: i32) { method extend (line 122) | fn extend(&mut self) { method print (line 141) | fn print(&self) { function main (line 156) | fn main() { FILE: ru/codes/rust/chapter_hashing/simple_hash.rs function add_hash (line 8) | fn add_hash(key: &str) -> i32 { function mul_hash (line 20) | fn mul_hash(key: &str) -> i32 { function xor_hash (line 32) | fn xor_hash(key: &str) -> i32 { function rot_hash (line 44) | fn rot_hash(key: &str) -> i32 { function main (line 56) | fn main() { FILE: ru/codes/rust/chapter_heap/heap.rs function test_push_max (line 11) | fn test_push_max(heap: &mut BinaryHeap, val: i32) { function test_pop_max (line 17) | fn test_pop_max(heap: &mut BinaryHeap) { function main (line 24) | fn main() { FILE: ru/codes/rust/chapter_heap/my_heap.rs type MaxHeap (line 10) | struct MaxHeap { method new (line 17) | fn new(nums: Vec) -> Self { method left (line 28) | fn left(i: usize) -> usize { method right (line 33) | fn right(i: usize) -> usize { method parent (line 38) | fn parent(i: usize) -> usize { method swap (line 43) | fn swap(&mut self, i: usize, j: usize) { method size (line 48) | fn size(&self) -> usize { method is_empty (line 53) | fn is_empty(&self) -> bool { method peek (line 58) | fn peek(&self) -> Option { method push (line 63) | fn push(&mut self, val: i32) { method sift_up (line 71) | fn sift_up(&mut self, mut i: usize) { method pop (line 91) | fn pop(&mut self) -> i32 { method sift_down (line 107) | fn sift_down(&mut self, mut i: usize) { method print (line 129) | fn print(&self) { function main (line 135) | fn main() { FILE: ru/codes/rust/chapter_heap/top_k.rs function top_k_heap (line 13) | fn top_k_heap(nums: Vec, k: usize) -> BinaryHeap> { function main (line 32) | fn main() { FILE: ru/codes/rust/chapter_searching/binary_search.rs function binary_search (line 8) | fn binary_search(nums: &[i32], target: i32) -> i32 { function binary_search_lcro (line 31) | fn binary_search_lcro(nums: &[i32], target: i32) -> i32 { function main (line 54) | pub fn main() { FILE: ru/codes/rust/chapter_searching/binary_search_edge.rs function binary_search_left_edge (line 12) | fn binary_search_left_edge(nums: &[i32], target: i32) -> i32 { function binary_search_right_edge (line 24) | fn binary_search_right_edge(nums: &[i32], target: i32) -> i32 { function main (line 38) | fn main() { FILE: ru/codes/rust/chapter_searching/binary_search_insertion.rs function binary_search_insertion_simple (line 9) | fn binary_search_insertion_simple(nums: &[i32], target: i32) -> i32 { function binary_search_insertion (line 26) | pub fn binary_search_insertion(nums: &[i32], target: i32) -> i32 { function main (line 43) | fn main() { FILE: ru/codes/rust/chapter_searching/hashing_search.rs function hashing_search_array (line 13) | fn hashing_search_array<'a>(map: &'a HashMap, target: i32) -... function hashing_search_linked_list (line 20) | fn hashing_search_linked_list( function main (line 30) | pub fn main() { FILE: ru/codes/rust/chapter_searching/linear_search.rs function linear_search_array (line 12) | fn linear_search_array(nums: &[i32], target: i32) -> i32 { function linear_search_linked_list (line 25) | fn linear_search_linked_list( function main (line 42) | pub fn main() { FILE: ru/codes/rust/chapter_searching/two_sum.rs function two_sum_brute_force (line 11) | pub fn two_sum_brute_force(nums: &Vec, target: i32) -> Option, target: i32) -> Option usize { method quick_sort (line 29) | pub fn quick_sort(left: i32, right: i32, nums: &mut [i32]) { type QuickSortMedian (line 43) | struct QuickSortMedian; method median_three (line 47) | fn median_three(nums: &mut [i32], left: usize, mid: usize, right: usiz... method partition (line 59) | fn partition(nums: &mut [i32], left: usize, right: usize) -> usize { method quick_sort (line 80) | pub fn quick_sort(left: i32, right: i32, nums: &mut [i32]) { type QuickSortTailCall (line 94) | struct QuickSortTailCall; method partition (line 98) | fn partition(nums: &mut [i32], left: usize, right: usize) -> usize { method quick_sort (line 115) | pub fn quick_sort(mut left: i32, mut right: i32, nums: &mut [i32]) { function main (line 133) | fn main() { FILE: ru/codes/rust/chapter_sorting/radix_sort.rs function digit (line 10) | fn digit(num: i32, exp: i32) -> usize { function counting_sort_digit (line 16) | fn counting_sort_digit(nums: &mut [i32], exp: i32) { function radix_sort (line 42) | fn radix_sort(nums: &mut [i32]) { function main (line 54) | fn main() { FILE: ru/codes/rust/chapter_sorting/selection_sort.rs function selection_sort (line 10) | fn selection_sort(nums: &mut [i32]) { function main (line 30) | pub fn main() { FILE: ru/codes/rust/chapter_stack_and_queue/array_deque.rs type ArrayDeque (line 8) | struct ArrayDeque { function new (line 16) | pub fn new(capacity: usize) -> Self { function capacity (line 25) | pub fn capacity(&self) -> usize { function size (line 30) | pub fn size(&self) -> usize { function is_empty (line 35) | pub fn is_empty(&self) -> bool { function index (line 40) | fn index(&self, i: i32) -> usize { function push_first (line 48) | pub fn push_first(&mut self, num: T) { function push_last (line 62) | pub fn push_last(&mut self, num: T) { function pop_first (line 75) | fn pop_first(&mut self) -> T { function pop_last (line 84) | fn pop_last(&mut self) -> T { function peek_first (line 91) | fn peek_first(&self) -> T { function peek_last (line 99) | fn peek_last(&self) -> T { function to_array (line 109) | fn to_array(&self) -> Vec { function main (line 122) | fn main() { FILE: ru/codes/rust/chapter_stack_and_queue/array_queue.rs type ArrayQueue (line 8) | struct ArrayQueue { function new (line 17) | fn new(capacity: i32) -> ArrayQueue { function capacity (line 27) | fn capacity(&self) -> i32 { function size (line 32) | fn size(&self) -> i32 { function is_empty (line 37) | fn is_empty(&self) -> bool { function push (line 42) | fn push(&mut self, num: T) { function pop (line 56) | fn pop(&mut self) -> T { function peek (line 65) | fn peek(&self) -> T { function to_vector (line 73) | fn to_vector(&self) -> Vec { function main (line 86) | fn main() { FILE: ru/codes/rust/chapter_stack_and_queue/array_stack.rs type ArrayStack (line 10) | struct ArrayStack { function new (line 16) | fn new() -> ArrayStack { function size (line 23) | fn size(&self) -> usize { function is_empty (line 28) | fn is_empty(&self) -> bool { function push (line 33) | fn push(&mut self, num: T) { function pop (line 38) | fn pop(&mut self) -> Option { function peek (line 43) | fn peek(&self) -> Option<&T> { function to_array (line 51) | fn to_array(&self) -> &Vec { function main (line 57) | fn main() { FILE: ru/codes/rust/chapter_stack_and_queue/deque.rs function main (line 11) | pub fn main() { FILE: ru/codes/rust/chapter_stack_and_queue/linkedlist_deque.rs type ListNode (line 13) | pub struct ListNode { function new (line 20) | pub fn new(val: T) -> Rc>> { type LinkedListDeque (line 31) | pub struct LinkedListDeque { function new (line 38) | pub fn new() -> Self { function size (line 47) | pub fn size(&self) -> usize { function is_empty (line 52) | pub fn is_empty(&self) -> bool { function push (line 57) | fn push(&mut self, num: T, is_front: bool) { function push_first (line 95) | pub fn push_first(&mut self, num: T) { function push_last (line 100) | pub fn push_last(&mut self, num: T) { function pop (line 105) | fn pop(&mut self, is_front: bool) -> Option { function pop_first (line 145) | pub fn pop_first(&mut self) -> Option { function pop_last (line 150) | pub fn pop_last(&mut self) -> Option { function peek_first (line 155) | pub fn peek_first(&self) -> Option<&Rc>>> { function peek_last (line 160) | pub fn peek_last(&self) -> Option<&Rc>>> { function to_array (line 165) | pub fn to_array(&self, head: Option<&Rc>>>) -> Vec { function main (line 180) | fn main() { FILE: ru/codes/rust/chapter_stack_and_queue/linkedlist_queue.rs type LinkedListQueue (line 14) | pub struct LinkedListQueue { function new (line 21) | pub fn new() -> Self { function size (line 30) | pub fn size(&self) -> usize { function is_empty (line 35) | pub fn is_empty(&self) -> bool { function push (line 40) | pub fn push(&mut self, num: T) { function pop (line 59) | pub fn pop(&mut self) -> Option { function peek (line 75) | pub fn peek(&self) -> Option<&Rc>>> { function to_array (line 80) | pub fn to_array(&self, head: Option<&Rc>>>) -> Vec { function main (line 97) | fn main() { FILE: ru/codes/rust/chapter_stack_and_queue/linkedlist_stack.rs type LinkedListStack (line 14) | pub struct LinkedListStack { function new (line 20) | pub fn new() -> Self { function size (line 28) | pub fn size(&self) -> usize { function is_empty (line 33) | pub fn is_empty(&self) -> bool { function push (line 38) | pub fn push(&mut self, num: T) { function pop (line 46) | pub fn pop(&mut self) -> Option { function peek (line 56) | pub fn peek(&self) -> Option<&Rc>>> { function to_array (line 61) | pub fn to_array(&self) -> Vec { function main (line 76) | fn main() { FILE: ru/codes/rust/chapter_stack_and_queue/queue.rs function main (line 12) | pub fn main() { FILE: ru/codes/rust/chapter_stack_and_queue/stack.rs function main (line 10) | pub fn main() { FILE: ru/codes/rust/chapter_tree/array_binary_tree.rs type ArrayBinaryTree (line 10) | struct ArrayBinaryTree { method new (line 16) | fn new(arr: Vec>) -> Self { method size (line 21) | fn size(&self) -> i32 { method val (line 26) | fn val(&self, i: i32) -> Option { method left (line 36) | fn left(&self, i: i32) -> i32 { method right (line 41) | fn right(&self, i: i32) -> i32 { method parent (line 46) | fn parent(&self, i: i32) -> i32 { method level_order (line 51) | fn level_order(&self) -> Vec { method dfs (line 56) | fn dfs(&self, i: i32, order: &'static str, res: &mut Vec) { method pre_order (line 78) | fn pre_order(&self) -> Vec { method in_order (line 85) | fn in_order(&self) -> Vec { method post_order (line 92) | fn post_order(&self) -> Vec { function main (line 100) | fn main() { FILE: ru/codes/rust/chapter_tree/avl_tree.rs type OptionTreeNodeRc (line 13) | type OptionTreeNodeRc = Option>>; type AVLTree (line 16) | struct AVLTree { method new (line 22) | fn new() -> Self { method height (line 27) | fn height(node: OptionTreeNodeRc) -> i32 { method update_height (line 36) | fn update_height(node: OptionTreeNodeRc) { method balance_factor (line 46) | fn balance_factor(node: OptionTreeNodeRc) -> i32 { method right_rotate (line 58) | fn right_rotate(node: OptionTreeNodeRc) -> OptionTreeNodeRc { method left_rotate (line 77) | fn left_rotate(node: OptionTreeNodeRc) -> OptionTreeNodeRc { method rotate (line 96) | fn rotate(node: OptionTreeNodeRc) -> OptionTreeNodeRc { method insert (line 131) | fn insert(&mut self, val: i32) { method insert_helper (line 136) | fn insert_helper(node: OptionTreeNodeRc, val: i32) -> OptionTreeNodeRc { method remove (line 170) | fn remove(&self, val: i32) { method remove_helper (line 175) | fn remove_helper(node: OptionTreeNodeRc, val: i32) -> OptionTreeNodeRc { method search (line 225) | fn search(&self, val: i32) -> OptionTreeNodeRc { function main (line 250) | fn main() { FILE: ru/codes/rust/chapter_tree/binary_search_tree.rs type OptionTreeNodeRc (line 15) | type OptionTreeNodeRc = Option>>; type BinarySearchTree (line 18) | pub struct BinarySearchTree { method new (line 24) | pub fn new() -> Self { method get_root (line 30) | pub fn get_root(&self) -> OptionTreeNodeRc { method search (line 35) | pub fn search(&self, num: i32) -> OptionTreeNodeRc { method insert (line 54) | pub fn insert(&mut self, num: i32) { method remove (line 90) | pub fn remove(&mut self, num: i32) { function main (line 161) | fn main() { FILE: ru/codes/rust/chapter_tree/binary_tree.rs function main (line 10) | fn main() { FILE: ru/codes/rust/chapter_tree/binary_tree_bfs.rs function level_order (line 14) | fn level_order(root: &Rc>) -> Vec { function main (line 35) | fn main() { FILE: ru/codes/rust/chapter_tree/binary_tree_dfs.rs function pre_order (line 14) | fn pre_order(root: Option<&Rc>>) -> Vec { function in_order (line 32) | fn in_order(root: Option<&Rc>>) -> Vec { function post_order (line 50) | fn post_order(root: Option<&Rc>>) -> Vec { function main (line 69) | fn main() { FILE: ru/codes/rust/src/include/list_node.rs type ListNode (line 12) | pub struct ListNode { function new (line 18) | pub fn new(val: T) -> Rc>> { function arr_to_linked_list (line 23) | pub fn arr_to_linked_list(array: &[T]) -> Option>>> function linked_list_to_hashmap (line 40) | pub fn linked_list_to_hashmap( FILE: ru/codes/rust/src/include/print_util.rs type Trunk (line 15) | struct Trunk<'a, 'b> { function print_array (line 21) | pub fn print_array(nums: &[T]) { function print_hash_map (line 33) | pub fn print_hash_map(map: &HashMap(queue: &VecDeque) { function print_linked_list (line 49) | pub fn print_linked_list(head: &Rc>>) { function print_tree (line 57) | pub fn print_tree(root: &Rc>) { function _print_tree (line 62) | fn _print_tree(root: Option<&Rc>>, prev: Option<&Trunk... function show_trunks (line 89) | fn show_trunks(trunk: Option<&Trunk>) { function print_heap (line 97) | pub fn print_heap(heap: Vec) { FILE: ru/codes/rust/src/include/tree_node.rs type TreeNode (line 12) | pub struct TreeNode { method new (line 22) | pub fn new(val: i32) -> Rc> { function vec_to_tree_dfs (line 59) | fn vec_to_tree_dfs(arr: &[Option], i: usize) -> Option>) -> Option... function tree_to_vec_dfs (line 75) | fn tree_to_vec_dfs(root: Option<&Rc>>, i: usize, res: ... function tree_to_vec (line 88) | pub fn tree_to_vec(root: Option>>) -> Vec Self { function vals_to_vets (line 20) | pub fn vals_to_vets(vals: Vec) -> Vec { function vets_to_vals (line 25) | pub fn vets_to_vals(vets: Vec) -> Vec { FILE: ru/codes/typescript/chapter_array_and_linkedlist/array.ts function randomAccess (line 8) | function randomAccess(nums: number[]): number { function extend (line 19) | function extend(nums: number[], enlarge: number): number[] { function insert (line 31) | function insert(nums: number[], num: number, index: number): void { function remove (line 41) | function remove(nums: number[], index: number): void { function traverse (line 49) | function traverse(nums: number[]): void { function find (line 62) | function find(nums: number[], target: number): number { FILE: ru/codes/typescript/chapter_array_and_linkedlist/linked_list.ts function insert (line 11) | function insert(n0: ListNode, P: ListNode): void { function remove (line 18) | function remove(n0: ListNode): void { function access (line 29) | function access(head: ListNode | null, index: number): ListNode | null { function find (line 40) | function find(head: ListNode | null, target: number): number { FILE: ru/codes/typescript/chapter_array_and_linkedlist/my_list.ts class MyList (line 8) | class MyList { method constructor (line 15) | constructor() { method size (line 20) | public size(): number { method capacity (line 25) | public capacity(): number { method get (line 30) | public get(index: number): number { method set (line 37) | public set(index: number, num: number): void { method add (line 43) | public add(num: number): void { method insert (line 52) | public insert(index: number, num: number): void { method remove (line 68) | public remove(index: number): number { method extendCapacity (line 82) | public extendCapacity(): void { method toArray (line 92) | public toArray(): number[] { FILE: ru/codes/typescript/chapter_backtracking/n_queens.ts function backtrack (line 8) | function backtrack( function nQueens (line 42) | function nQueens(n: number): string[][][] { FILE: ru/codes/typescript/chapter_backtracking/permutations_i.ts function backtrack (line 8) | function backtrack( function permutationsI (line 36) | function permutationsI(nums: number[]): number[][] { FILE: ru/codes/typescript/chapter_backtracking/permutations_ii.ts function backtrack (line 8) | function backtrack( function permutationsII (line 38) | function permutationsII(nums: number[]): number[][] { FILE: ru/codes/typescript/chapter_backtracking/preorder_traversal_i_compact.ts function preOrder (line 12) | function preOrder(root: TreeNode | null, res: TreeNode[]): void { FILE: ru/codes/typescript/chapter_backtracking/preorder_traversal_ii_compact.ts function preOrder (line 12) | function preOrder( FILE: ru/codes/typescript/chapter_backtracking/preorder_traversal_iii_compact.ts function preOrder (line 12) | function preOrder( FILE: ru/codes/typescript/chapter_backtracking/preorder_traversal_iii_template.ts function isSolution (line 12) | function isSolution(state: TreeNode[]): boolean { function recordSolution (line 17) | function recordSolution(state: TreeNode[], res: TreeNode[][]): void { function isValid (line 22) | function isValid(state: TreeNode[], choice: TreeNode): boolean { function makeChoice (line 27) | function makeChoice(state: TreeNode[], choice: TreeNode): void { function undoChoice (line 32) | function undoChoice(state: TreeNode[]): void { function backtrack (line 37) | function backtrack( FILE: ru/codes/typescript/chapter_backtracking/subset_sum_i.ts function backtrack (line 8) | function backtrack( function subsetSumI (line 38) | function subsetSumI(nums: number[], target: number): number[][] { FILE: ru/codes/typescript/chapter_backtracking/subset_sum_i_naive.ts function backtrack (line 8) | function backtrack( function subsetSumINaive (line 36) | function subsetSumINaive(nums: number[], target: number): number[][] { FILE: ru/codes/typescript/chapter_backtracking/subset_sum_ii.ts function backtrack (line 8) | function backtrack( function subsetSumII (line 43) | function subsetSumII(nums: number[], target: number): number[][] { FILE: ru/codes/typescript/chapter_computational_complexity/iteration.ts function forLoop (line 8) | function forLoop(n: number): number { function whileLoop (line 18) | function whileLoop(n: number): number { function whileLoopII (line 30) | function whileLoopII(n: number): number { function nestedForLoop (line 44) | function nestedForLoop(n: number): string { FILE: ru/codes/typescript/chapter_computational_complexity/recursion.ts function recur (line 8) | function recur(n: number): number { function forLoopRecur (line 18) | function forLoopRecur(n: number): number { function tailRecur (line 37) | function tailRecur(n: number, res: number): number { function fib (line 45) | function fib(n: number): number { FILE: ru/codes/typescript/chapter_computational_complexity/space_complexity.ts function constFunc (line 12) | function constFunc(): number { function constant (line 18) | function constant(n: number): void { function linear (line 35) | function linear(n: number): void { function linearRecur (line 51) | function linearRecur(n: number): void { function quadratic (line 58) | function quadratic(n: number): void { function quadraticRecur (line 75) | function quadraticRecur(n: number): number { function buildTree (line 83) | function buildTree(n: number): TreeNode | null { FILE: ru/codes/typescript/chapter_computational_complexity/time_complexity.ts function constant (line 8) | function constant(n: number): number { function linear (line 16) | function linear(n: number): number { function arrayTraversal (line 23) | function arrayTraversal(nums: number[]): number { function quadratic (line 33) | function quadratic(n: number): number { function bubbleSort (line 45) | function bubbleSort(nums: number[]): number { function exponential (line 64) | function exponential(n: number): number { function expRecur (line 79) | function expRecur(n: number): number { function logarithmic (line 85) | function logarithmic(n: number): number { function logRecur (line 95) | function logRecur(n: number): number { function linearLogRecur (line 101) | function linearLogRecur(n: number): number { function factorialRecur (line 111) | function factorialRecur(n: number): number { FILE: ru/codes/typescript/chapter_computational_complexity/worst_best_time_complexity.ts function randomNumbers (line 8) | function randomNumbers(n: number): number[] { function findOne (line 25) | function findOne(nums: number[]): number { FILE: ru/codes/typescript/chapter_divide_and_conquer/binary_search_recur.ts function dfs (line 8) | function dfs(nums: number[], target: number, i: number, j: number): numb... function binarySearch (line 28) | function binarySearch(nums: number[], target: number): number { FILE: ru/codes/typescript/chapter_divide_and_conquer/build_tree.ts function dfs (line 11) | function dfs( function buildTree (line 33) | function buildTree(preorder: number[], inorder: number[]): TreeNode | nu... FILE: ru/codes/typescript/chapter_divide_and_conquer/hanota.ts function move (line 8) | function move(src: number[], tar: number[]): void { function dfs (line 16) | function dfs(i: number, src: number[], buf: number[], tar: number[]): vo... function solveHanota (line 31) | function solveHanota(A: number[], B: number[], C: number[]): void { FILE: ru/codes/typescript/chapter_dynamic_programming/climbing_stairs_backtrack.ts function backtrack (line 8) | function backtrack( function climbingStairsBacktrack (line 27) | function climbingStairsBacktrack(n: number): number { FILE: ru/codes/typescript/chapter_dynamic_programming/climbing_stairs_constraint_dp.ts function climbingStairsConstraintDP (line 8) | function climbingStairsConstraintDP(n: number): number { FILE: ru/codes/typescript/chapter_dynamic_programming/climbing_stairs_dfs.ts function dfs (line 8) | function dfs(i: number): number { function climbingStairsDFS (line 17) | function climbingStairsDFS(n: number): number { FILE: ru/codes/typescript/chapter_dynamic_programming/climbing_stairs_dfs_mem.ts function dfs (line 8) | function dfs(i: number, mem: number[]): number { function climbingStairsDFSMem (line 21) | function climbingStairsDFSMem(n: number): number { FILE: ru/codes/typescript/chapter_dynamic_programming/climbing_stairs_dp.ts function climbingStairsDP (line 8) | function climbingStairsDP(n: number): number { function climbingStairsDPComp (line 23) | function climbingStairsDPComp(n: number): number { FILE: ru/codes/typescript/chapter_dynamic_programming/coin_change.ts function coinChangeDP (line 8) | function coinChangeDP(coins: Array, amt: number): number { function coinChangeDPComp (line 35) | function coinChangeDPComp(coins: Array, amt: number): number { FILE: ru/codes/typescript/chapter_dynamic_programming/coin_change_ii.ts function coinChangeIIDP (line 8) | function coinChangeIIDP(coins: Array, amt: number): number { function coinChangeIIDPComp (line 34) | function coinChangeIIDPComp(coins: Array, amt: number): number { FILE: ru/codes/typescript/chapter_dynamic_programming/edit_distance.ts function editDistanceDFS (line 8) | function editDistanceDFS(s: string, t: string, i: number, j: number): nu... function editDistanceDFSMem (line 31) | function editDistanceDFSMem( function editDistanceDP (line 64) | function editDistanceDP(s: string, t: string): number { function editDistanceDPComp (line 94) | function editDistanceDPComp(s: string, t: string): number { FILE: ru/codes/typescript/chapter_dynamic_programming/knapsack.ts function knapsackDFS (line 8) | function knapsackDFS( function knapsackDFSMem (line 30) | function knapsackDFSMem( function knapsackDP (line 59) | function knapsackDP( function knapsackDPComp (line 88) | function knapsackDPComp( FILE: ru/codes/typescript/chapter_dynamic_programming/min_cost_climbing_stairs_dp.ts function minCostClimbingStairsDP (line 8) | function minCostClimbingStairsDP(cost: Array): number { function minCostClimbingStairsDPComp (line 26) | function minCostClimbingStairsDPComp(cost: Array): number { FILE: ru/codes/typescript/chapter_dynamic_programming/min_path_sum.ts function minPathSumDFS (line 8) | function minPathSumDFS( function minPathSumDFSMem (line 29) | function minPathSumDFSMem( function minPathSumDP (line 56) | function minPathSumDP(grid: Array>): number { function minPathSumDPComp (line 82) | function minPathSumDPComp(grid: Array>): number { FILE: ru/codes/typescript/chapter_dynamic_programming/unbounded_knapsack.ts function unboundedKnapsackDP (line 8) | function unboundedKnapsackDP( function unboundedKnapsackDPComp (line 37) | function unboundedKnapsackDPComp( FILE: ru/codes/typescript/chapter_graph/graph_adjacency_list.ts class GraphAdjList (line 10) | class GraphAdjList { method constructor (line 15) | constructor(edges: Vertex[][]) { method size (line 26) | size(): number { method addEdge (line 31) | addEdge(vet1: Vertex, vet2: Vertex): void { method removeEdge (line 45) | removeEdge(vet1: Vertex, vet2: Vertex): void { method addVertex (line 60) | addVertex(vet: Vertex): void { method removeVertex (line 67) | removeVertex(vet: Vertex): void { method print (line 83) | print(): void { FILE: ru/codes/typescript/chapter_graph/graph_adjacency_matrix.ts class GraphAdjMat (line 8) | class GraphAdjMat { method constructor (line 13) | constructor(vertices: number[], edges: number[][]) { method size (line 28) | size(): number { method addVertex (line 33) | addVertex(val: number): void { method removeVertex (line 50) | removeVertex(index: number): void { method addEdge (line 67) | addEdge(i: number, j: number): void { method removeEdge (line 79) | removeEdge(i: number, j: number): void { method print (line 89) | print(): void { FILE: ru/codes/typescript/chapter_graph/graph_bfs.ts function graphBFS (line 12) | function graphBFS(graph: GraphAdjList, startVet: Vertex): Vertex[] { FILE: ru/codes/typescript/chapter_graph/graph_dfs.ts function dfs (line 11) | function dfs( function graphDFS (line 31) | function graphDFS(graph: GraphAdjList, startVet: Vertex): Vertex[] { FILE: ru/codes/typescript/chapter_greedy/coin_change_greedy.ts function coinChangeGreedy (line 8) | function coinChangeGreedy(coins: number[], amt: number): number { FILE: ru/codes/typescript/chapter_greedy/fractional_knapsack.ts class Item (line 8) | class Item { method constructor (line 12) | constructor(w: number, v: number) { function fractionalKnapsack (line 19) | function fractionalKnapsack(wgt: number[], val: number[], cap: number): ... FILE: ru/codes/typescript/chapter_greedy/max_capacity.ts function maxCapacity (line 8) | function maxCapacity(ht: number[]): number { FILE: ru/codes/typescript/chapter_greedy/max_product_cutting.ts function maxProductCutting (line 8) | function maxProductCutting(n: number): number { FILE: ru/codes/typescript/chapter_hashing/array_hash_map.ts class Pair (line 8) | class Pair { method constructor (line 12) | constructor(key: number, val: string) { class ArrayHashMap (line 19) | class ArrayHashMap { method constructor (line 22) | constructor() { method hashFunc (line 28) | private hashFunc(key: number): number { method get (line 33) | public get(key: number): string | null { method set (line 41) | public set(key: number, val: string) { method delete (line 47) | public delete(key: number) { method entries (line 54) | public entries(): (Pair | null)[] { method keys (line 65) | public keys(): (number | undefined)[] { method values (line 76) | public values(): (string | undefined)[] { method print (line 87) | public print() { FILE: ru/codes/typescript/chapter_hashing/hash_map_chaining.ts class Pair (line 8) | class Pair { method constructor (line 11) | constructor(key: number, val: string) { class HashMapChaining (line 18) | class HashMapChaining { method constructor (line 26) | constructor() { method #hashFunc (line 35) | #hashFunc(key: number): number { method #loadFactor (line 40) | #loadFactor(): number { method get (line 45) | get(key: number): string | null { method put (line 59) | put(key: number, val: string): void { method remove (line 80) | remove(key: number): void { method #extend (line 94) | #extend(): void { method print (line 110) | print(): void { FILE: ru/codes/typescript/chapter_hashing/hash_map_open_addressing.ts class Pair (line 8) | class Pair { method constructor (line 12) | constructor(key: number, val: string) { class HashMapOpenAddressing (line 19) | class HashMapOpenAddressing { method constructor (line 28) | constructor() { method hashFunc (line 38) | private hashFunc(key: number): number { method loadFactor (line 43) | private loadFactor(): number { method findBucket (line 48) | private findBucket(key: number): number { method get (line 78) | get(key: number): string | null { method put (line 93) | put(key: number, val: string): void { method remove (line 114) | remove(key: number): void { method extend (line 128) | private extend(): void { method print (line 144) | print(): void { FILE: ru/codes/typescript/chapter_hashing/simple_hash.ts function addHash (line 8) | function addHash(key: string): number { function mulHash (line 18) | function mulHash(key: string): number { function xorHash (line 28) | function xorHash(key: string): number { function rotHash (line 38) | function rotHash(key: string): number { FILE: ru/codes/typescript/chapter_heap/my_heap.ts class MaxHeap (line 10) | class MaxHeap { method constructor (line 13) | constructor(nums?: number[]) { method left (line 23) | private left(i: number): number { method right (line 28) | private right(i: number): number { method parent (line 33) | private parent(i: number): number { method swap (line 38) | private swap(i: number, j: number): void { method size (line 45) | public size(): number { method isEmpty (line 50) | public isEmpty(): boolean { method peek (line 55) | public peek(): number { method push (line 60) | public push(val: number): void { method siftUp (line 68) | private siftUp(i: number): void { method pop (line 82) | public pop(): number { method siftDown (line 96) | private siftDown(i: number): void { method print (line 114) | public print(): void { method getMaxHeap (line 119) | public getMaxHeap(): number[] { FILE: ru/codes/typescript/chapter_heap/top_k.ts function pushMinHeap (line 10) | function pushMinHeap(maxHeap: MaxHeap, val: number): void { function popMinHeap (line 16) | function popMinHeap(maxHeap: MaxHeap): number { function peekMinHeap (line 22) | function peekMinHeap(maxHeap: MaxHeap): number { function getMinHeap (line 28) | function getMinHeap(maxHeap: MaxHeap): number[] { function topKHeap (line 34) | function topKHeap(nums: number[], k: number): number[] { FILE: ru/codes/typescript/chapter_searching/binary_search.ts function binarySearch (line 8) | function binarySearch(nums: number[], target: number): number { function binarySearchLCRO (line 31) | function binarySearchLCRO(nums: number[], target: number): number { FILE: ru/codes/typescript/chapter_searching/binary_search_edge.ts function binarySearchLeftEdge (line 9) | function binarySearchLeftEdge(nums: Array, target: number): numb... function binarySearchRightEdge (line 21) | function binarySearchRightEdge(nums: Array, target: number): num... FILE: ru/codes/typescript/chapter_searching/binary_search_insertion.ts function binarySearchInsertionSimple (line 8) | function binarySearchInsertionSimple( function binarySearchInsertion (line 29) | function binarySearchInsertion(nums: Array, target: number): num... FILE: ru/codes/typescript/chapter_searching/hashing_search.ts function hashingSearchArray (line 10) | function hashingSearchArray(map: Map, target: number): n... function hashingSearchLinkedList (line 17) | function hashingSearchLinkedList( FILE: ru/codes/typescript/chapter_searching/linear_search.ts function linearSearchArray (line 10) | function linearSearchArray(nums: number[], target: number): number { function linearSearchLinkedList (line 23) | function linearSearchLinkedList( FILE: ru/codes/typescript/chapter_searching/two_sum.ts function twoSumBruteForce (line 8) | function twoSumBruteForce(nums: number[], target: number): number[] { function twoSumHashTable (line 22) | function twoSumHashTable(nums: number[], target: number): number[] { FILE: ru/codes/typescript/chapter_sorting/bubble_sort.ts function bubbleSort (line 8) | function bubbleSort(nums: number[]): void { function bubbleSortWithFlag (line 24) | function bubbleSortWithFlag(nums: number[]): void { FILE: ru/codes/typescript/chapter_sorting/bucket_sort.ts function bucketSort (line 8) | function bucketSort(nums: number[]): void { FILE: ru/codes/typescript/chapter_sorting/counting_sort.ts function countingSortNaive (line 9) | function countingSortNaive(nums: number[]): void { function countingSort (line 29) | function countingSort(nums: number[]): void { FILE: ru/codes/typescript/chapter_sorting/heap_sort.ts function siftDown (line 8) | function siftDown(nums: number[], n: number, i: number): void { function heapSort (line 32) | function heapSort(nums: number[]): void { FILE: ru/codes/typescript/chapter_sorting/insertion_sort.ts function insertionSort (line 8) | function insertionSort(nums: number[]): void { FILE: ru/codes/typescript/chapter_sorting/merge_sort.ts function merge (line 8) | function merge(nums: number[], left: number, mid: number, right: number)... function mergeSort (line 38) | function mergeSort(nums: number[], left: number, right: number): void { FILE: ru/codes/typescript/chapter_sorting/quick_sort.ts class QuickSort (line 8) | class QuickSort { method swap (line 10) | swap(nums: number[], i: number, j: number): void { method partition (line 17) | partition(nums: number[], left: number, right: number): number { method quickSort (line 36) | quickSort(nums: number[], left: number, right: number): void { class QuickSortMedian (line 50) | class QuickSortMedian { method swap (line 52) | swap(nums: number[], i: number, j: number): void { method medianThree (line 59) | medianThree( method partition (line 76) | partition(nums: number[], left: number, right: number): number { method quickSort (line 103) | quickSort(nums: number[], left: number, right: number): void { class QuickSortTailCall (line 117) | class QuickSortTailCall { method swap (line 119) | swap(nums: number[], i: number, j: number): void { method partition (line 126) | partition(nums: number[], left: number, right: number): number { method quickSort (line 144) | quickSort(nums: number[], left: number, right: number): void { FILE: ru/codes/typescript/chapter_sorting/radix_sort.ts function digit (line 8) | function digit(num: number, exp: number): number { function countingSortDigit (line 14) | function countingSortDigit(nums: number[], exp: number): void { function radixSort (line 42) | function radixSort(nums: number[]): void { FILE: ru/codes/typescript/chapter_sorting/selection_sort.ts function selectionSort (line 8) | function selectionSort(nums: number[]): void { FILE: ru/codes/typescript/chapter_stack_and_queue/array_deque.ts class ArrayDeque (line 8) | class ArrayDeque { method constructor (line 14) | constructor(capacity: number) { method capacity (line 21) | capacity(): number { method size (line 26) | size(): number { method isEmpty (line 31) | isEmpty(): boolean { method index (line 36) | index(i: number): number { method pushFirst (line 44) | pushFirst(num: number): void { method pushLast (line 58) | pushLast(num: number): void { method popFirst (line 71) | popFirst(): number { method popLast (line 80) | popLast(): number { method peekFirst (line 87) | peekFirst(): number { method peekLast (line 93) | peekLast(): number { method toArray (line 101) | toArray(): number[] { FILE: ru/codes/typescript/chapter_stack_and_queue/array_queue.ts class ArrayQueue (line 8) | class ArrayQueue { method constructor (line 13) | constructor(capacity: number) { method capacity (line 19) | get capacity(): number { method size (line 24) | get size(): number { method isEmpty (line 29) | isEmpty(): boolean { method push (line 34) | push(num: number): void { method pop (line 48) | pop(): number { method peek (line 57) | peek(): number { method toArray (line 63) | toArray(): number[] { FILE: ru/codes/typescript/chapter_stack_and_queue/array_stack.ts class ArrayStack (line 8) | class ArrayStack { method constructor (line 10) | constructor() { method size (line 15) | get size(): number { method isEmpty (line 20) | isEmpty(): boolean { method push (line 25) | push(num: number): void { method pop (line 30) | pop(): number | undefined { method top (line 36) | top(): number | undefined { method toArray (line 42) | toArray() { FILE: ru/codes/typescript/chapter_stack_and_queue/linkedlist_deque.ts class ListNode (line 8) | class ListNode { method constructor (line 13) | constructor(val: number) { class LinkedListDeque (line 21) | class LinkedListDeque { method constructor (line 26) | constructor() { method pushLast (line 33) | pushLast(val: number): void { method pushFirst (line 49) | pushFirst(val: number): void { method popLast (line 65) | popLast(): number { method popFirst (line 82) | popFirst(): number { method peekLast (line 99) | peekLast(): number { method peekFirst (line 104) | peekFirst(): number { method size (line 109) | size(): number { method isEmpty (line 114) | isEmpty(): boolean { method print (line 119) | print(): void { FILE: ru/codes/typescript/chapter_stack_and_queue/linkedlist_queue.ts class LinkedListQueue (line 10) | class LinkedListQueue { method constructor (line 15) | constructor() { method size (line 21) | get size(): number { method isEmpty (line 26) | isEmpty(): boolean { method push (line 31) | push(num: number): void { method pop (line 47) | pop(): number { method peek (line 57) | peek(): number { method toArray (line 63) | toArray(): number[] { FILE: ru/codes/typescript/chapter_stack_and_queue/linkedlist_stack.ts class LinkedListStack (line 10) | class LinkedListStack { method constructor (line 14) | constructor() { method size (line 19) | get size(): number { method isEmpty (line 24) | isEmpty(): boolean { method push (line 29) | push(num: number): void { method pop (line 37) | pop(): number { method peek (line 46) | peek(): number { method toArray (line 52) | toArray(): number[] { FILE: ru/codes/typescript/chapter_tree/array_binary_tree.ts type Order (line 10) | type Order = 'pre' | 'in' | 'post'; class ArrayBinaryTree (line 13) | class ArrayBinaryTree { method constructor (line 17) | constructor(arr: (number | null)[]) { method size (line 22) | size(): number { method val (line 27) | val(i: number): number | null { method left (line 34) | left(i: number): number { method right (line 39) | right(i: number): number { method parent (line 44) | parent(i: number): number { method levelOrder (line 49) | levelOrder(): number[] { method #dfs (line 59) | #dfs(i: number, order: Order, res: (number | null)[]): void { method preOrder (line 73) | preOrder(): (number | null)[] { method inOrder (line 80) | inOrder(): (number | null)[] { method postOrder (line 87) | postOrder(): (number | null)[] { FILE: ru/codes/typescript/chapter_tree/avl_tree.ts class AVLTree (line 11) | class AVLTree { method constructor (line 14) | constructor() { method height (line 19) | height(node: TreeNode): number { method updateHeight (line 25) | private updateHeight(node: TreeNode): void { method balanceFactor (line 32) | balanceFactor(node: TreeNode): number { method rightRotate (line 40) | private rightRotate(node: TreeNode): TreeNode { method leftRotate (line 54) | private leftRotate(node: TreeNode): TreeNode { method rotate (line 68) | private rotate(node: TreeNode): TreeNode { method insert (line 98) | insert(val: number): void { method insertHelper (line 103) | private insertHelper(node: TreeNode, val: number): TreeNode { method remove (line 121) | remove(val: number): void { method removeHelper (line 126) | private removeHelper(node: TreeNode, val: number): TreeNode { method search (line 161) | search(val: number): TreeNode { function testInsert (line 181) | function testInsert(tree: AVLTree, val: number): void { function testRemove (line 187) | function testRemove(tree: AVLTree, val: number): void { FILE: ru/codes/typescript/chapter_tree/binary_search_tree.ts class BinarySearchTree (line 11) | class BinarySearchTree { method constructor (line 15) | constructor() { method getRoot (line 21) | getRoot(): TreeNode | null { method search (line 26) | search(num: number): TreeNode | null { method insert (line 42) | insert(num: number): void { method remove (line 67) | remove(num: number): void { FILE: ru/codes/typescript/chapter_tree/binary_tree_bfs.ts function levelOrder (line 12) | function levelOrder(root: TreeNode | null): number[] { FILE: ru/codes/typescript/chapter_tree/binary_tree_dfs.ts function preOrder (line 15) | function preOrder(root: TreeNode | null): void { function inOrder (line 26) | function inOrder(root: TreeNode | null): void { function postOrder (line 37) | function postOrder(root: TreeNode | null): void { FILE: ru/codes/typescript/modules/ListNode.ts class ListNode (line 8) | class ListNode { method constructor (line 11) | constructor(val?: number, next?: ListNode | null) { function arrToLinkedList (line 18) | function arrToLinkedList(arr: number[]): ListNode | null { FILE: ru/codes/typescript/modules/PrintUtil.ts function printLinkedList (line 11) | function printLinkedList(head: ListNode | null): void { class Trunk (line 20) | class Trunk { method constructor (line 24) | constructor(prev: Trunk | null, str: string) { function printTree (line 35) | function printTree(root: TreeNode | null) { function printTreeHelper (line 40) | function printTreeHelper( function showTrunks (line 75) | function showTrunks(p: Trunk | null) { function printHeap (line 85) | function printHeap(arr: number[]): void { FILE: ru/codes/typescript/modules/TreeNode.ts class TreeNode (line 8) | class TreeNode { method constructor (line 13) | constructor( function arrToTree (line 27) | function arrToTree(arr: (number | null)[], i: number = 0): TreeNode | nu... FILE: ru/codes/typescript/modules/Vertex.ts class Vertex (line 8) | class Vertex { method constructor (line 10) | constructor(val: number) { method valsToVets (line 15) | public static valsToVets(vals: number[]): Vertex[] { method vetsToVals (line 24) | public static vetsToVals(vets: Vertex[]): number[] { FILE: zh-hant/codes/c/chapter_array_and_linkedlist/array.c function randomAccess (line 10) | int randomAccess(int *nums, int size) { function insert (line 35) | void insert(int *nums, int size, int num, int index) { function removeItem (line 46) | void removeItem(int *nums, int size, int index) { function traverse (line 54) | void traverse(int *nums, int size) { function find (line 63) | int find(int *nums, int size, int target) { function main (line 72) | int main() { FILE: zh-hant/codes/c/chapter_array_and_linkedlist/linked_list.c function insert (line 10) | void insert(ListNode *n0, ListNode *P) { function removeItem (line 18) | void removeItem(ListNode *n0) { function ListNode (line 30) | ListNode *access(ListNode *head, int index) { function find (line 40) | int find(ListNode *head, int target) { function main (line 52) | int main() { FILE: zh-hant/codes/c/chapter_array_and_linkedlist/my_list.c type MyList (line 10) | typedef struct { function MyList (line 20) | MyList *newMyList() { function delMyList (line 30) | void delMyList(MyList *nums) { function size (line 36) | int size(MyList *nums) { function capacity (line 41) | int capacity(MyList *nums) { function get (line 46) | int get(MyList *nums, int index) { function set (line 52) | void set(MyList *nums, int index, int num) { function add (line 58) | void add(MyList *nums, int num) { function insert (line 67) | void insert(MyList *nums, int index, int num) { function removeItem (line 82) | int removeItem(MyList *nums, int index) { function extendCapacity (line 93) | void extendCapacity(MyList *nums) { function main (line 117) | int main() { FILE: zh-hant/codes/c/chapter_backtracking/n_queens.c function backtrack (line 12) | void backtrack(int row, int n, char state[MAX_SIZE][MAX_SIZE], char ***r... function main (line 64) | int main() { FILE: zh-hant/codes/c/chapter_backtracking/permutations_i.c function backtrack (line 13) | void backtrack(int *state, int stateSize, int *choices, int choicesSize,... function main (line 58) | int main() { FILE: zh-hant/codes/c/chapter_backtracking/permutations_ii.c function backtrack (line 13) | void backtrack(int *state, int stateSize, int *choices, int choicesSize,... function main (line 60) | int main() { FILE: zh-hant/codes/c/chapter_backtracking/preorder_traversal_i_compact.c function preOrder (line 16) | void preOrder(TreeNode *root) { function main (line 29) | int main() { FILE: zh-hant/codes/c/chapter_backtracking/preorder_traversal_ii_compact.c function preOrder (line 18) | void preOrder(TreeNode *root) { function main (line 38) | int main() { FILE: zh-hant/codes/c/chapter_backtracking/preorder_traversal_iii_compact.c function preOrder (line 18) | void preOrder(TreeNode *root) { function main (line 39) | int main() { FILE: zh-hant/codes/c/chapter_backtracking/preorder_traversal_iii_template.c function isSolution (line 18) | bool isSolution(void) { function recordSolution (line 23) | void recordSolution(void) { function isValid (line 31) | bool isValid(TreeNode *choice) { function makeChoice (line 36) | void makeChoice(TreeNode *choice) { function undoChoice (line 41) | void undoChoice(void) { function backtrack (line 46) | void backtrack(TreeNode *choices[2]) { function main (line 69) | int main() { FILE: zh-hant/codes/c/chapter_backtracking/subset_sum_i.c function backtrack (line 22) | void backtrack(int target, int *choices, int choicesSize, int start) { function cmp (line 50) | int cmp(const void *a, const void *b) { function subsetSumI (line 55) | void subsetSumI(int *nums, int numsSize, int target) { function main (line 62) | int main() { FILE: zh-hant/codes/c/chapter_backtracking/subset_sum_i_naive.c function backtrack (line 22) | void backtrack(int target, int total, int *choices, int choicesSize) { function subsetSumINaive (line 47) | void subsetSumINaive(int *nums, int numsSize, int target) { function main (line 53) | int main() { FILE: zh-hant/codes/c/chapter_backtracking/subset_sum_ii.c function backtrack (line 22) | void backtrack(int target, int *choices, int choicesSize, int start) { function cmp (line 54) | int cmp(const void *a, const void *b) { function subsetSumII (line 59) | void subsetSumII(int *nums, int numsSize, int target) { function main (line 67) | int main() { FILE: zh-hant/codes/c/chapter_computational_complexity/iteration.c function forLoop (line 10) | int forLoop(int n) { function whileLoop (line 20) | int whileLoop(int n) { function whileLoopII (line 32) | int whileLoopII(int n) { function main (line 63) | int main() { FILE: zh-hant/codes/c/chapter_computational_complexity/recursion.c function recur (line 10) | int recur(int n) { function forLoopRecur (line 21) | int forLoopRecur(int n) { function tailRecur (line 40) | int tailRecur(int n, int res) { function fib (line 49) | int fib(int n) { function main (line 60) | int main() { FILE: zh-hant/codes/c/chapter_computational_complexity/space_complexity.c function func (line 10) | int func() { function constant (line 16) | void constant(int n) { type HashTable (line 34) | typedef struct { function linear (line 41) | void linear(int n) { function linearRecur (line 75) | void linearRecur(int n) { function quadratic (line 83) | void quadratic(int n) { function quadraticRecur (line 102) | int quadraticRecur(int n) { function TreeNode (line 113) | TreeNode *buildTree(int n) { function main (line 123) | int main() { FILE: zh-hant/codes/c/chapter_computational_complexity/time_complexity.c function constant (line 10) | int constant(int n) { function linear (line 21) | int linear(int n) { function arrayTraversal (line 30) | int arrayTraversal(int *nums, int n) { function quadratic (line 40) | int quadratic(int n) { function bubbleSort (line 52) | int bubbleSort(int *nums, int n) { function exponential (line 71) | int exponential(int n) { function expRecur (line 86) | int expRecur(int n) { function logarithmic (line 93) | int logarithmic(int n) { function logRecur (line 103) | int logRecur(int n) { function linearLogRecur (line 110) | int linearLogRecur(int n) { function factorialRecur (line 121) | int factorialRecur(int n) { function main (line 132) | int main(int argc, char *argv[]) { FILE: zh-hant/codes/c/chapter_computational_complexity/worst_best_time_complexity.c function findOne (line 28) | int findOne(int *nums, int n) { function main (line 39) | int main(int argc, char *argv[]) { FILE: zh-hant/codes/c/chapter_divide_and_conquer/binary_search_recur.c function dfs (line 10) | int dfs(int nums[], int target, int i, int j) { function binarySearch (line 30) | int binarySearch(int nums[], int target, int numsSize) { function main (line 37) | int main() { FILE: zh-hant/codes/c/chapter_divide_and_conquer/build_tree.c function TreeNode (line 13) | TreeNode *dfs(int *preorder, int *inorderMap, int i, int l, int r, int s... function TreeNode (line 33) | TreeNode *buildTree(int *preorder, int preorderSize, int *inorder, int i... function main (line 45) | int main() { FILE: zh-hant/codes/c/chapter_divide_and_conquer/hanota.c function move (line 13) | void move(int *src, int *srcSize, int *tar, int *tarSize) { function dfs (line 24) | void dfs(int i, int *src, int *srcSize, int *buf, int *bufSize, int *tar... function solveHanota (line 39) | void solveHanota(int *A, int *ASize, int *B, int *BSize, int *C, int *CS... function main (line 45) | int main() { FILE: zh-hant/codes/c/chapter_dynamic_programming/climbing_stairs_backtrack.c function backtrack (line 10) | void backtrack(int *choices, int state, int n, int *res, int len) { function climbingStairsBacktrack (line 27) | int climbingStairsBacktrack(int n) { function main (line 40) | int main() { FILE: zh-hant/codes/c/chapter_dynamic_programming/climbing_stairs_constraint_dp.c function climbingStairsConstraintDP (line 10) | int climbingStairsConstraintDP(int n) { function main (line 39) | int main() { FILE: zh-hant/codes/c/chapter_dynamic_programming/climbing_stairs_dfs.c function dfs (line 10) | int dfs(int i) { function climbingStairsDFS (line 20) | int climbingStairsDFS(int n) { function main (line 25) | int main() { FILE: zh-hant/codes/c/chapter_dynamic_programming/climbing_stairs_dfs_mem.c function dfs (line 10) | int dfs(int i, int *mem) { function climbingStairsDFSMem (line 25) | int climbingStairsDFSMem(int n) { function main (line 37) | int main() { FILE: zh-hant/codes/c/chapter_dynamic_programming/climbing_stairs_dp.c function climbingStairsDP (line 10) | int climbingStairsDP(int n) { function climbingStairsDPComp (line 28) | int climbingStairsDPComp(int n) { function main (line 41) | int main() { FILE: zh-hant/codes/c/chapter_dynamic_programming/coin_change.c function myMin (line 10) | int myMin(int a, int b) { function coinChangeDP (line 15) | int coinChangeDP(int coins[], int amt, int coinsSize) { function coinChangeDPComp (line 49) | int coinChangeDPComp(int coins[], int amt, int coinsSize) { function main (line 78) | int main() { FILE: zh-hant/codes/c/chapter_dynamic_programming/coin_change_ii.c function coinChangeIIDP (line 10) | int coinChangeIIDP(int coins[], int amt, int coinsSize) { function coinChangeIIDPComp (line 43) | int coinChangeIIDPComp(int coins[], int amt, int coinsSize) { function main (line 67) | int main() { FILE: zh-hant/codes/c/chapter_dynamic_programming/edit_distance.c function myMin (line 10) | int myMin(int a, int b) { function editDistanceDFS (line 15) | int editDistanceDFS(char *s, char *t, int i, int j) { function editDistanceDFSMem (line 37) | int editDistanceDFSMem(char *s, char *t, int memCols, int **mem, int i, ... function editDistanceDP (line 63) | int editDistanceDP(char *s, char *t, int n, int m) { function editDistanceDPComp (line 96) | int editDistanceDPComp(char *s, char *t, int n, int m) { function main (line 127) | int main() { FILE: zh-hant/codes/c/chapter_dynamic_programming/knapsack.c function myMax (line 10) | int myMax(int a, int b) { function knapsackDFS (line 15) | int knapsackDFS(int wgt[], int val[], int i, int c) { function knapsackDFSMem (line 32) | int knapsackDFSMem(int wgt[], int val[], int memCols, int **mem, int i, ... function knapsackDP (line 54) | int knapsackDP(int wgt[], int val[], int cap, int wgtSize) { function knapsackDPComp (line 82) | int knapsackDPComp(int wgt[], int val[], int cap, int wgtSize) { function main (line 103) | int main() { FILE: zh-hant/codes/c/chapter_dynamic_programming/min_cost_climbing_stairs_dp.c function myMin (line 10) | int myMin(int a, int b) { function minCostClimbingStairsDP (line 15) | int minCostClimbingStairsDP(int cost[], int costSize) { function minCostClimbingStairsDPComp (line 35) | int minCostClimbingStairsDPComp(int cost[], int costSize) { function main (line 49) | int main() { FILE: zh-hant/codes/c/chapter_dynamic_programming/min_path_sum.c function myMin (line 13) | int myMin(int a, int b) { function minPathSumDFS (line 18) | int minPathSumDFS(int grid[MAX_SIZE][MAX_SIZE], int i, int j) { function minPathSumDFSMem (line 35) | int minPathSumDFSMem(int grid[MAX_SIZE][MAX_SIZE], int mem[MAX_SIZE][MAX... function minPathSumDP (line 57) | int minPathSumDP(int grid[MAX_SIZE][MAX_SIZE], int n, int m) { function minPathSumDPComp (line 87) | int minPathSumDPComp(int grid[MAX_SIZE][MAX_SIZE], int n, int m) { function main (line 111) | int main() { FILE: zh-hant/codes/c/chapter_dynamic_programming/unbounded_knapsack.c function myMax (line 10) | int myMax(int a, int b) { function unboundedKnapsackDP (line 15) | int unboundedKnapsackDP(int wgt[], int val[], int cap, int wgtSize) { function unboundedKnapsackDPComp (line 43) | int unboundedKnapsackDPComp(int wgt[], int val[], int cap, int wgtSize) { function main (line 66) | int main() { FILE: zh-hant/codes/c/chapter_graph/graph_adjacency_list.c type AdjListNode (line 13) | typedef struct AdjListNode { type GraphAdjList (line 19) | typedef struct { function GraphAdjList (line 25) | GraphAdjList *newGraphAdjList() { function delGraphAdjList (line 38) | void delGraphAdjList(GraphAdjList *graph) { function AdjListNode (line 55) | AdjListNode *findNode(GraphAdjList *graph, Vertex *vet) { function addEdgeHelper (line 65) | void addEdgeHelper(AdjListNode *head, Vertex *vet) { function addEdge (line 74) | void addEdge(GraphAdjList *graph, Vertex *vet1, Vertex *vet2) { function removeEdgeHelper (line 84) | void removeEdgeHelper(AdjListNode *head, Vertex *vet) { function removeEdge (line 101) | void removeEdge(GraphAdjList *graph, Vertex *vet1, Vertex *vet2) { function addVertex (line 111) | void addVertex(GraphAdjList *graph, Vertex *vet) { function removeVertex (line 121) | void removeVertex(GraphAdjList *graph, Vertex *vet) { function printGraph (line 159) | void printGraph(const GraphAdjList *graph) { FILE: zh-hant/codes/c/chapter_graph/graph_adjacency_list_test.c function main (line 10) | int main() { FILE: zh-hant/codes/c/chapter_graph/graph_adjacency_matrix.c type GraphAdjMat (line 13) | typedef struct { function GraphAdjMat (line 20) | GraphAdjMat *newGraphAdjMat() { function delGraphAdjMat (line 32) | void delGraphAdjMat(GraphAdjMat *graph) { function addVertex (line 37) | void addVertex(GraphAdjMat *graph, int val) { function removeVertex (line 52) | void removeVertex(GraphAdjMat *graph, int index) { function addEdge (line 78) | void addEdge(GraphAdjMat *graph, int i, int j) { function removeEdge (line 89) | void removeEdge(GraphAdjMat *graph, int i, int j) { function printGraphAdjMat (line 99) | void printGraphAdjMat(GraphAdjMat *graph) { function main (line 109) | int main() { FILE: zh-hant/codes/c/chapter_graph/graph_bfs.c type Queue (line 13) | typedef struct { function Queue (line 19) | Queue *newQueue() { function isEmpty (line 26) | int isEmpty(Queue *q) { function enqueue (line 31) | void enqueue(Queue *q, Vertex *vet) { function Vertex (line 38) | Vertex *dequeue(Queue *q) { function isVisited (line 46) | int isVisited(Vertex **visited, int size, Vertex *vet) { function graphBFS (line 57) | void graphBFS(GraphAdjList *graph, Vertex *startVet, Vertex **res, int *... function main (line 82) | int main() { FILE: zh-hant/codes/c/chapter_graph/graph_dfs.c function isVisited (line 13) | int isVisited(Vertex **res, int size, Vertex *vet) { function dfs (line 24) | void dfs(GraphAdjList *graph, Vertex **res, int *resSize, Vertex *vet) { function graphDFS (line 41) | void graphDFS(GraphAdjList *graph, Vertex *startVet, Vertex **res, int *... function main (line 46) | int main() { FILE: zh-hant/codes/c/chapter_greedy/coin_change_greedy.c function coinChangeGreedy (line 10) | int coinChangeGreedy(int *coins, int size, int amt) { function main (line 29) | int main() { FILE: zh-hant/codes/c/chapter_greedy/fractional_knapsack.c type Item (line 10) | typedef struct { function sortByValueDensity (line 16) | int sortByValueDensity(const void *a, const void *b) { function fractionalKnapsack (line 23) | float fractionalKnapsack(int wgt[], int val[], int itemCount, int cap) { function main (line 50) | int main(void) { FILE: zh-hant/codes/c/chapter_greedy/max_capacity.c function myMin (line 10) | int myMin(int a, int b) { function myMax (line 14) | int myMax(int a, int b) { function maxCapacity (line 19) | int maxCapacity(int ht[], int htLength) { function main (line 41) | int main(void) { FILE: zh-hant/codes/c/chapter_greedy/max_product_cutting.c function maxProductCutting (line 10) | int maxProductCutting(int n) { function main (line 31) | int main(void) { FILE: zh-hant/codes/c/chapter_hashing/array_hash_map.c type Pair (line 13) | typedef struct { type MapSet (line 19) | typedef struct { type ArrayHashMap (line 25) | typedef struct { function ArrayHashMap (line 30) | ArrayHashMap *newArrayHashMap() { function delArrayHashMap (line 39) | void delArrayHashMap(ArrayHashMap *hmap) { function hashFunc (line 50) | int hashFunc(int key) { function put (line 65) | void put(ArrayHashMap *hmap, const int key, const char *val) { function removeItem (line 76) | void removeItem(ArrayHashMap *hmap, const int key) { function pairSet (line 84) | void pairSet(ArrayHashMap *hmap, MapSet *set) { function keySet (line 108) | void keySet(ArrayHashMap *hmap, MapSet *set) { function valueSet (line 130) | void valueSet(ArrayHashMap *hmap, MapSet *set) { function print (line 152) | void print(ArrayHashMap *hmap) { function main (line 164) | int main() { FILE: zh-hant/codes/c/chapter_hashing/hash_map_chaining.c type Pair (line 15) | typedef struct { type Node (line 21) | typedef struct Node { type HashMapChaining (line 27) | typedef struct { function HashMapChaining (line 36) | HashMapChaining *newHashMapChaining() { function delHashMapChaining (line 50) | void delHashMapChaining(HashMapChaining *hashMap) { function hashFunc (line 65) | int hashFunc(HashMapChaining *hashMap, int key) { function loadFactor (line 70) | double loadFactor(HashMapChaining *hashMap) { function extend (line 92) | void extend(HashMapChaining *hashMap) { function put (line 120) | void put(HashMapChaining *hashMap, int key, const char *val) { function removeItem (line 147) | void removeItem(HashMapChaining *hashMap, int key) { function print (line 171) | void print(HashMapChaining *hashMap) { function main (line 184) | int main() { FILE: zh-hant/codes/c/chapter_hashing/hash_map_open_addressing.c type Pair (line 10) | typedef struct { type HashMapOpenAddressing (line 16) | typedef struct { function HashMapOpenAddressing (line 29) | HashMapOpenAddressing *newHashMapOpenAddressing() { function delHashMapOpenAddressing (line 44) | void delHashMapOpenAddressing(HashMapOpenAddressing *hashMap) { function hashFunc (line 58) | int hashFunc(HashMapOpenAddressing *hashMap, int key) { function loadFactor (line 63) | double loadFactor(HashMapOpenAddressing *hashMap) { function findBucket (line 68) | int findBucket(HashMapOpenAddressing *hashMap, int key) { function put (line 107) | void put(HashMapOpenAddressing *hashMap, int key, char *val) { function removeItem (line 134) | void removeItem(HashMapOpenAddressing *hashMap, int key) { function extend (line 148) | void extend(HashMapOpenAddressing *hashMap) { function print (line 169) | void print(HashMapOpenAddressing *hashMap) { function main (line 183) | int main() { FILE: zh-hant/codes/c/chapter_hashing/simple_hash.c function addHash (line 10) | int addHash(char *key) { function mulHash (line 20) | int mulHash(char *key) { function xorHash (line 30) | int xorHash(char *key) { function rotHash (line 41) | int rotHash(char *key) { function main (line 52) | int main() { FILE: zh-hant/codes/c/chapter_heap/my_heap.c type MaxHeap (line 12) | typedef struct { function MaxHeap (line 25) | MaxHeap *newMaxHeap(int nums[], int size) { function delMaxHeap (line 38) | void delMaxHeap(MaxHeap *maxHeap) { function left (line 44) | int left(MaxHeap *maxHeap, int i) { function right (line 49) | int right(MaxHeap *maxHeap, int i) { function parent (line 54) | int parent(MaxHeap *maxHeap, int i) { function swap (line 59) | void swap(MaxHeap *maxHeap, int i, int j) { function size (line 66) | int size(MaxHeap *maxHeap) { function isEmpty (line 71) | int isEmpty(MaxHeap *maxHeap) { function peek (line 76) | int peek(MaxHeap *maxHeap) { function push (line 81) | void push(MaxHeap *maxHeap, int val) { function pop (line 96) | int pop(MaxHeap *maxHeap) { function siftDown (line 115) | void siftDown(MaxHeap *maxHeap, int i) { function siftUp (line 139) | void siftUp(MaxHeap *maxHeap, int i) { FILE: zh-hant/codes/c/chapter_heap/my_heap_test.c function main (line 10) | int main() { FILE: zh-hant/codes/c/chapter_heap/top_k.c function pushMinHeap (line 10) | void pushMinHeap(MaxHeap *maxHeap, int val) { function popMinHeap (line 16) | int popMinHeap(MaxHeap *maxHeap) { function peekMinHeap (line 22) | int peekMinHeap(MaxHeap *maxHeap) { function main (line 62) | int main() { FILE: zh-hant/codes/c/chapter_searching/binary_search.c function binarySearch (line 10) | int binarySearch(int *nums, int len, int target) { function binarySearchLCRO (line 28) | int binarySearchLCRO(int *nums, int len, int target) { function main (line 46) | int main() { FILE: zh-hant/codes/c/chapter_searching/binary_search_edge.c function binarySearchInsertion (line 10) | int binarySearchInsertion(int *nums, int numSize, int target) { function binarySearchLeftEdge (line 25) | int binarySearchLeftEdge(int *nums, int numSize, int target) { function binarySearchRightEdge (line 37) | int binarySearchRightEdge(int *nums, int numSize, int target) { function main (line 51) | int main() { FILE: zh-hant/codes/c/chapter_searching/binary_search_insertion.c function binarySearchInsertionSimple (line 10) | int binarySearchInsertionSimple(int *nums, int numSize, int target) { function binarySearchInsertion (line 27) | int binarySearchInsertion(int *nums, int numSize, int target) { function main (line 44) | int main() { FILE: zh-hant/codes/c/chapter_searching/two_sum.c type HashTable (line 26) | typedef struct { function HashTable (line 33) | HashTable *find(HashTable *h, int key) { function insert (line 40) | void insert(HashTable **h, int key, int val) { function main (line 69) | int main() { FILE: zh-hant/codes/c/chapter_sorting/bubble_sort.c function bubbleSort (line 10) | void bubbleSort(int nums[], int size) { function bubbleSortWithFlag (line 25) | void bubbleSortWithFlag(int nums[], int size) { function main (line 44) | int main() { FILE: zh-hant/codes/c/chapter_sorting/bucket_sort.c function compare (line 12) | int compare(const void *a, const void *b) { function bucketSort (line 19) | void bucketSort(float nums[], int n) { function main (line 49) | int main() { FILE: zh-hant/codes/c/chapter_sorting/counting_sort.c function countingSortNaive (line 11) | void countingSortNaive(int nums[], int size) { function countingSort (line 38) | void countingSort(int nums[], int size) { function main (line 73) | int main() { FILE: zh-hant/codes/c/chapter_sorting/heap_sort.c function siftDown (line 10) | void siftDown(int nums[], int n, int i) { function heapSort (line 34) | void heapSort(int nums[], int n) { function main (line 51) | int main() { FILE: zh-hant/codes/c/chapter_sorting/insertion_sort.c function insertionSort (line 10) | void insertionSort(int nums[], int size) { function main (line 26) | int main() { FILE: zh-hant/codes/c/chapter_sorting/merge_sort.c function merge (line 10) | void merge(int *nums, int left, int mid, int right) { function mergeSort (line 41) | void mergeSort(int *nums, int left, int right) { function main (line 54) | int main() { FILE: zh-hant/codes/c/chapter_sorting/quick_sort.c function swap (line 10) | void swap(int nums[], int i, int j) { function partition (line 17) | int partition(int nums[], int left, int right) { function quickSort (line 37) | void quickSort(int nums[], int left, int right) { function medianThree (line 52) | int medianThree(int nums[], int left, int mid, int right) { function partitionMedian (line 62) | int partitionMedian(int nums[], int left, int right) { function quickSortMedian (line 81) | void quickSortMedian(int nums[], int left, int right) { function quickSortTailCall (line 95) | void quickSortTailCall(int nums[], int left, int right) { function main (line 116) | int main() { FILE: zh-hant/codes/c/chapter_sorting/radix_sort.c function digit (line 10) | int digit(int num, int exp) { function countingSortDigit (line 16) | void countingSortDigit(int nums[], int size, int exp) { function radixSort (line 49) | void radixSort(int nums[], int size) { function main (line 67) | int main() { FILE: zh-hant/codes/c/chapter_sorting/selection_sort.c function selectionSort (line 10) | void selectionSort(int nums[], int n) { function main (line 27) | int main() { FILE: zh-hant/codes/c/chapter_stack_and_queue/array_deque.c type ArrayDeque (line 10) | typedef struct { function ArrayDeque (line 18) | ArrayDeque *newArrayDeque(int capacity) { function delArrayDeque (line 28) | void delArrayDeque(ArrayDeque *deque) { function capacity (line 34) | int capacity(ArrayDeque *deque) { function size (line 39) | int size(ArrayDeque *deque) { function empty (line 44) | bool empty(ArrayDeque *deque) { function dequeIndex (line 49) | int dequeIndex(ArrayDeque *deque, int i) { function pushFirst (line 57) | void pushFirst(ArrayDeque *deque, int num) { function pushLast (line 71) | void pushLast(ArrayDeque *deque, int num) { function peekFirst (line 84) | int peekFirst(ArrayDeque *deque) { function peekLast (line 91) | int peekLast(ArrayDeque *deque) { function popFirst (line 99) | int popFirst(ArrayDeque *deque) { function popLast (line 108) | int popLast(ArrayDeque *deque) { function main (line 127) | int main() { FILE: zh-hant/codes/c/chapter_stack_and_queue/array_queue.c type ArrayQueue (line 10) | typedef struct { function ArrayQueue (line 18) | ArrayQueue *newArrayQueue(int capacity) { function delArrayQueue (line 28) | void delArrayQueue(ArrayQueue *queue) { function capacity (line 34) | int capacity(ArrayQueue *queue) { function size (line 39) | int size(ArrayQueue *queue) { function empty (line 44) | bool empty(ArrayQueue *queue) { function peek (line 49) | int peek(ArrayQueue *queue) { function push (line 55) | void push(ArrayQueue *queue, int num) { function pop (line 69) | int pop(ArrayQueue *queue) { function main (line 90) | int main() { FILE: zh-hant/codes/c/chapter_stack_and_queue/array_stack.c type ArrayStack (line 12) | typedef struct { function ArrayStack (line 18) | ArrayStack *newArrayStack() { function delArrayStack (line 27) | void delArrayStack(ArrayStack *stack) { function size (line 33) | int size(ArrayStack *stack) { function isEmpty (line 38) | bool isEmpty(ArrayStack *stack) { function push (line 43) | void push(ArrayStack *stack, int num) { function peek (line 53) | int peek(ArrayStack *stack) { function pop (line 62) | int pop(ArrayStack *stack) { function main (line 69) | int main() { FILE: zh-hant/codes/c/chapter_stack_and_queue/linkedlist_deque.c type DoublyListNode (line 10) | typedef struct DoublyListNode { function DoublyListNode (line 17) | DoublyListNode *newDoublyListNode(int num) { function delDoublyListNode (line 26) | void delDoublyListNode(DoublyListNode *node) { type LinkedListDeque (line 31) | typedef struct { function LinkedListDeque (line 37) | LinkedListDeque *newLinkedListDeque() { function delLinkedListdeque (line 46) | void delLinkedListdeque(LinkedListDeque *deque) { function size (line 58) | int size(LinkedListDeque *deque) { function empty (line 63) | bool empty(LinkedListDeque *deque) { function push (line 68) | void push(LinkedListDeque *deque, int num, bool isFront) { function pushFirst (line 92) | void pushFirst(LinkedListDeque *deque, int num) { function pushLast (line 97) | void pushLast(LinkedListDeque *deque, int num) { function peekFirst (line 102) | int peekFirst(LinkedListDeque *deque) { function peekLast (line 108) | int peekLast(LinkedListDeque *deque) { function pop (line 114) | int pop(LinkedListDeque *deque, bool isFront) { function popFirst (line 145) | int popFirst(LinkedListDeque *deque) { function popLast (line 150) | int popLast(LinkedListDeque *deque) { function printLinkedListDeque (line 155) | void printLinkedListDeque(LinkedListDeque *deque) { function main (line 169) | int main() { FILE: zh-hant/codes/c/chapter_stack_and_queue/linkedlist_queue.c type LinkedListQueue (line 10) | typedef struct { function LinkedListQueue (line 16) | LinkedListQueue *newLinkedListQueue() { function delLinkedListQueue (line 25) | void delLinkedListQueue(LinkedListQueue *queue) { function size (line 37) | int size(LinkedListQueue *queue) { function empty (line 42) | bool empty(LinkedListQueue *queue) { function push (line 47) | void push(LinkedListQueue *queue, int num) { function peek (line 64) | int peek(LinkedListQueue *queue) { function pop (line 70) | int pop(LinkedListQueue *queue) { function printLinkedListQueue (line 80) | void printLinkedListQueue(LinkedListQueue *queue) { function main (line 94) | int main() { FILE: zh-hant/codes/c/chapter_stack_and_queue/linkedlist_stack.c type LinkedListStack (line 10) | typedef struct { function LinkedListStack (line 16) | LinkedListStack *newLinkedListStack() { function delLinkedListStack (line 24) | void delLinkedListStack(LinkedListStack *s) { function size (line 34) | int size(LinkedListStack *s) { function isEmpty (line 39) | bool isEmpty(LinkedListStack *s) { function push (line 44) | void push(LinkedListStack *s, int num) { function peek (line 53) | int peek(LinkedListStack *s) { function pop (line 62) | int pop(LinkedListStack *s) { function main (line 73) | int main() { FILE: zh-hant/codes/c/chapter_tree/array_binary_tree.c type ArrayBinaryTree (line 10) | typedef struct { function ArrayBinaryTree (line 16) | ArrayBinaryTree *newArrayBinaryTree(int *arr, int arrSize) { function delArrayBinaryTree (line 25) | void delArrayBinaryTree(ArrayBinaryTree *abt) { function size (line 31) | int size(ArrayBinaryTree *abt) { function val (line 36) | int val(ArrayBinaryTree *abt, int i) { function left (line 44) | int left(int i) { function right (line 49) | int right(int i) { function parent (line 54) | int parent(int i) { function dfs (line 72) | void dfs(ArrayBinaryTree *abt, int i, char *order, int *res, int *index) { function main (line 117) | int main() { FILE: zh-hant/codes/c/chapter_tree/avl_tree.c type AVLTree (line 10) | typedef struct { function AVLTree (line 15) | AVLTree *newAVLTree() { function delAVLTree (line 22) | void delAVLTree(AVLTree *tree) { function height (line 28) | int height(TreeNode *node) { function updateHeight (line 37) | void updateHeight(TreeNode *node) { function balanceFactor (line 49) | int balanceFactor(TreeNode *node) { function TreeNode (line 59) | TreeNode *rightRotate(TreeNode *node) { function TreeNode (line 74) | TreeNode *leftRotate(TreeNode *node) { function TreeNode (line 89) | TreeNode *rotate(TreeNode *node) { function TreeNode (line 119) | TreeNode *insertHelper(TreeNode *node, int val) { function insert (line 141) | void insert(AVLTree *tree, int val) { function TreeNode (line 146) | TreeNode *removeHelper(TreeNode *node, int val) { function removeItem (line 190) | void removeItem(AVLTree *tree, int val) { function TreeNode (line 195) | TreeNode *search(AVLTree *tree, int val) { function testInsert (line 214) | void testInsert(AVLTree *tree, int val) { function testRemove (line 220) | void testRemove(AVLTree *tree, int val) { function main (line 227) | int main() { FILE: zh-hant/codes/c/chapter_tree/binary_search_tree.c type BinarySearchTree (line 10) | typedef struct { function BinarySearchTree (line 15) | BinarySearchTree *newBinarySearchTree() { function delBinarySearchTree (line 23) | void delBinarySearchTree(BinarySearchTree *bst) { function TreeNode (line 29) | TreeNode *getRoot(BinarySearchTree *bst) { function TreeNode (line 34) | TreeNode *search(BinarySearchTree *bst, int num) { function insert (line 54) | void insert(BinarySearchTree *bst, int num) { function removeItem (line 87) | void removeItem(BinarySearchTree *bst, int num) { function main (line 138) | int main() { FILE: zh-hant/codes/c/chapter_tree/binary_tree.c function main (line 10) | int main() { FILE: zh-hant/codes/c/chapter_tree/binary_tree_bfs.c function main (line 54) | int main() { FILE: zh-hant/codes/c/chapter_tree/binary_tree_dfs.c function preOrder (line 15) | void preOrder(TreeNode *root, int *size) { function inOrder (line 25) | void inOrder(TreeNode *root, int *size) { function postOrder (line 35) | void postOrder(TreeNode *root, int *size) { function main (line 45) | int main() { FILE: zh-hant/codes/c/utils/common_test.c function testListNode (line 9) | void testListNode() { function testTreeNode (line 16) | void testTreeNode() { function main (line 29) | int main(int argc, char *argv[]) { FILE: zh-hant/codes/c/utils/list_node.h type ListNode (line 15) | typedef struct ListNode { function ListNode (line 21) | ListNode *newListNode(int val) { function ListNode (line 30) | ListNode *arrToLinkedList(const int *arr, size_t size) { function freeMemoryLinkedList (line 45) | void freeMemoryLinkedList(ListNode *cur) { FILE: zh-hant/codes/c/utils/print_util.h function printArray (line 22) | void printArray(int arr[], int size) { function printArrayFloat (line 35) | void printArrayFloat(float arr[], int size) { function printLinkedList (line 48) | void printLinkedList(ListNode *node) { type Trunk (line 59) | typedef struct Trunk { function Trunk (line 64) | Trunk *newTrunk(Trunk *prev, char *str) { function showTrunks (line 72) | void showTrunks(Trunk *trunk) { function printTreeHelper (line 85) | void printTreeHelper(TreeNode *node, Trunk *prev, bool isRight) { function printTree (line 113) | void printTree(TreeNode *root) { function printHeap (line 118) | void printHeap(int arr[], int size) { FILE: zh-hant/codes/c/utils/tree_node.h type TreeNode (line 19) | typedef struct TreeNode { function TreeNode (line 27) | TreeNode *newTreeNode(int val) { function TreeNode (line 55) | TreeNode *arrayToTreeDFS(int *arr, int size, int i) { function TreeNode (line 67) | TreeNode *arrayToTree(int *arr, int size) { function treeToArrayDFS (line 72) | void treeToArrayDFS(TreeNode *root, int i, int *res, int *size) { function freeMemoryTree (line 95) | void freeMemoryTree(TreeNode *root) { FILE: zh-hant/codes/c/utils/uthash.h type UT_hash_bucket (line 1072) | typedef struct UT_hash_bucket { type UT_hash_table (line 1096) | typedef struct UT_hash_table { type UT_hash_handle (line 1129) | typedef struct UT_hash_handle { FILE: zh-hant/codes/c/utils/vector.h type vector (line 15) | typedef struct vector { function vector (line 23) | vector *newVector() { function vector (line 33) | vector *_newVector(int size, void *elem, int elemSize) { function delVector (line 48) | void delVector(vector *v) { function vectorPushback (line 67) | void vectorPushback(vector *v, void *elem, int elemSize) { function vectorPopback (line 78) | void vectorPopback(vector *v) { function vectorClear (line 86) | void vectorClear(vector *v) { function vectorSize (line 95) | int vectorSize(vector *v) { function vectorSet (line 120) | void vectorSet(vector *v, int pos, void *elem, int elemSize) { function vectorExpand (line 132) | void vectorExpand(vector *v) { function vectorShrink (line 138) | void vectorShrink(vector *v) { function vectorInsert (line 144) | void vectorInsert(vector *v, int pos, void *elem, int elemSize) { function vectorErase (line 158) | void vectorErase(vector *v, int pos) { function vectorSwap (line 169) | void vectorSwap(vector *v, int i, int j) { function vectorEmpty (line 176) | bool vectorEmpty(vector *v) { function vectorFull (line 181) | bool vectorFull(vector *v) { function vectorEqual (line 186) | bool vectorEqual(vector *v1, vector *v2) { function vectorSort (line 203) | void vectorSort(vector *v, int (*cmp)(const void *, const void *)) { function printVector (line 209) | void printVector(vector *v, void (*printFunc)(vector *v, void *p)) { function printVectorMatrix (line 239) | void printVectorMatrix(vector *vv, void (*printFunc)(vector *v, void *p)) { FILE: zh-hant/codes/c/utils/vertex.h type Vertex (line 15) | typedef struct { function Vertex (line 20) | Vertex *newVertex(int val) { function Vertex (line 28) | Vertex **valsToVets(int *vals, int size) { FILE: zh-hant/codes/cpp/chapter_array_and_linkedlist/array.cpp function randomAccess (line 10) | int randomAccess(int *nums, int size) { function insert (line 33) | void insert(int *nums, int size, int num, int index) { function remove (line 43) | void remove(int *nums, int size, int index) { function traverse (line 51) | void traverse(int *nums, int size) { function find (line 60) | int find(int *nums, int size, int target) { function main (line 69) | int main() { FILE: zh-hant/codes/cpp/chapter_array_and_linkedlist/linked_list.cpp function insert (line 10) | void insert(ListNode *n0, ListNode *P) { function remove (line 17) | void remove(ListNode *n0) { function ListNode (line 29) | ListNode *access(ListNode *head, int index) { function find (line 39) | int find(ListNode *head, int target) { function main (line 51) | int main() { FILE: zh-hant/codes/cpp/chapter_array_and_linkedlist/list.cpp function main (line 10) | int main() { FILE: zh-hant/codes/cpp/chapter_array_and_linkedlist/my_list.cpp class MyList (line 10) | class MyList { method MyList (line 19) | MyList() { method size (line 29) | int size() { method capacity (line 34) | int capacity() { method get (line 39) | int get(int index) { method set (line 47) | void set(int index, int num) { method add (line 54) | void add(int num) { method insert (line 64) | void insert(int index, int num) { method remove (line 80) | int remove(int index) { method extendCapacity (line 95) | void extendCapacity() { method toVector (line 110) | vector toVector() { function main (line 121) | int main() { FILE: zh-hant/codes/cpp/chapter_backtracking/n_queens.cpp function backtrack (line 10) | void backtrack(int row, int n, vector> &state, vector>> nQueens(int n) { function main (line 51) | int main() { FILE: zh-hant/codes/cpp/chapter_backtracking/permutations_i.cpp function backtrack (line 10) | void backtrack(vector &state, const vector &choices, vector> permutationsI(vector nums) { function main (line 43) | int main() { FILE: zh-hant/codes/cpp/chapter_backtracking/permutations_ii.cpp function backtrack (line 10) | void backtrack(vector &state, const vector &choices, vector> permutationsII(vector nums) { function main (line 45) | int main() { FILE: zh-hant/codes/cpp/chapter_backtracking/preorder_traversal_i_compact.cpp function preOrder (line 12) | void preOrder(TreeNode *root) { function main (line 25) | int main() { FILE: zh-hant/codes/cpp/chapter_backtracking/preorder_traversal_ii_compact.cpp function preOrder (line 13) | void preOrder(TreeNode *root) { function main (line 30) | int main() { FILE: zh-hant/codes/cpp/chapter_backtracking/preorder_traversal_iii_compact.cpp function preOrder (line 13) | void preOrder(TreeNode *root) { function main (line 31) | int main() { FILE: zh-hant/codes/cpp/chapter_backtracking/preorder_traversal_iii_template.cpp function isSolution (line 10) | bool isSolution(vector &state) { function recordSolution (line 15) | void recordSolution(vector &state, vector... function isValid (line 20) | bool isValid(vector &state, TreeNode *choice) { function makeChoice (line 25) | void makeChoice(vector &state, TreeNode *choice) { function undoChoice (line 30) | void undoChoice(vector &state, TreeNode *choice) { function backtrack (line 35) | void backtrack(vector &state, vector &choices, v... function main (line 57) | int main() { FILE: zh-hant/codes/cpp/chapter_backtracking/subset_sum_i.cpp function backtrack (line 10) | void backtrack(vector &state, int target, vector &choices, int... function subsetSumI (line 34) | vector> subsetSumI(vector &nums, int target) { function main (line 44) | int main() { FILE: zh-hant/codes/cpp/chapter_backtracking/subset_sum_i_naive.cpp function backtrack (line 10) | void backtrack(vector &state, int target, int total, vector &c... function subsetSumINaive (line 32) | vector> subsetSumINaive(vector &nums, int target) { function main (line 41) | int main() { FILE: zh-hant/codes/cpp/chapter_backtracking/subset_sum_ii.cpp function backtrack (line 10) | void backtrack(vector &state, int target, vector &choices, int... function subsetSumII (line 39) | vector> subsetSumII(vector &nums, int target) { function main (line 49) | int main() { FILE: zh-hant/codes/cpp/chapter_computational_complexity/iteration.cpp function forLoop (line 10) | int forLoop(int n) { function whileLoop (line 20) | int whileLoop(int n) { function whileLoopII (line 32) | int whileLoopII(int n) { function string (line 46) | string nestedForLoop(int n) { function main (line 59) | int main() { FILE: zh-hant/codes/cpp/chapter_computational_complexity/recursion.cpp function recur (line 10) | int recur(int n) { function forLoopRecur (line 21) | int forLoopRecur(int n) { function tailRecur (line 41) | int tailRecur(int n, int res) { function fib (line 50) | int fib(int n) { function main (line 61) | int main() { FILE: zh-hant/codes/cpp/chapter_computational_complexity/space_complexity.cpp function func (line 10) | int func() { function constant (line 16) | void constant(int n) { function linear (line 33) | void linear(int n) { function linearRecur (line 49) | void linearRecur(int n) { function quadratic (line 57) | void quadratic(int n) { function quadraticRecur (line 70) | int quadraticRecur(int n) { function TreeNode (line 79) | TreeNode *buildTree(int n) { function main (line 89) | int main() { FILE: zh-hant/codes/cpp/chapter_computational_complexity/time_complexity.cpp function constant (line 10) | int constant(int n) { function linear (line 19) | int linear(int n) { function arrayTraversal (line 27) | int arrayTraversal(vector &nums) { function quadratic (line 37) | int quadratic(int n) { function bubbleSort (line 49) | int bubbleSort(vector &nums) { function exponential (line 68) | int exponential(int n) { function expRecur (line 82) | int expRecur(int n) { function logarithmic (line 89) | int logarithmic(int n) { function logRecur (line 99) | int logRecur(int n) { function linearLogRecur (line 106) | int linearLogRecur(int n) { function factorialRecur (line 117) | int factorialRecur(int n) { function main (line 129) | int main() { FILE: zh-hant/codes/cpp/chapter_computational_complexity/worst_best_time_complexity.cpp function randomNumbers (line 10) | vector randomNumbers(int n) { function findOne (line 24) | int findOne(vector &nums) { function main (line 35) | int main() { FILE: zh-hant/codes/cpp/chapter_divide_and_conquer/binary_search_recur.cpp function dfs (line 10) | int dfs(vector &nums, int target, int i, int j) { function binarySearch (line 30) | int binarySearch(vector &nums, int target) { function main (line 37) | int main() { FILE: zh-hant/codes/cpp/chapter_divide_and_conquer/build_tree.cpp function TreeNode (line 10) | TreeNode *dfs(vector &preorder, unordered_map &inorderMap... function TreeNode (line 27) | TreeNode *buildTree(vector &preorder, vector &inorder) { function main (line 38) | int main() { FILE: zh-hant/codes/cpp/chapter_divide_and_conquer/hanota.cpp function move (line 10) | void move(vector &src, vector &tar) { function dfs (line 19) | void dfs(int i, vector &src, vector &buf, vector &tar) { function solveHanota (line 34) | void solveHanota(vector &A, vector &B, vector &C) { function main (line 41) | int main() { FILE: zh-hant/codes/cpp/chapter_dynamic_programming/climbing_stairs_backtrack.cpp function backtrack (line 11) | void backtrack(vector &choices, int state, int n, vector &res) { function climbingStairsBacktrack (line 27) | int climbingStairsBacktrack(int n) { function main (line 36) | int main() { FILE: zh-hant/codes/cpp/chapter_dynamic_programming/climbing_stairs_constraint_dp.cpp function climbingStairsConstraintDP (line 10) | int climbingStairsConstraintDP(int n) { function main (line 30) | int main() { FILE: zh-hant/codes/cpp/chapter_dynamic_programming/climbing_stairs_dfs.cpp function dfs (line 10) | int dfs(int i) { function climbingStairsDFS (line 20) | int climbingStairsDFS(int n) { function main (line 25) | int main() { FILE: zh-hant/codes/cpp/chapter_dynamic_programming/climbing_stairs_dfs_mem.cpp function dfs (line 10) | int dfs(int i, vector &mem) { function climbingStairsDFSMem (line 25) | int climbingStairsDFSMem(int n) { function main (line 32) | int main() { FILE: zh-hant/codes/cpp/chapter_dynamic_programming/climbing_stairs_dp.cpp function climbingStairsDP (line 10) | int climbingStairsDP(int n) { function climbingStairsDPComp (line 26) | int climbingStairsDPComp(int n) { function main (line 39) | int main() { FILE: zh-hant/codes/cpp/chapter_dynamic_programming/coin_change.cpp function coinChangeDP (line 10) | int coinChangeDP(vector &coins, int amt) { function coinChangeDPComp (line 35) | int coinChangeDPComp(vector &coins, int amt) { function main (line 57) | int main() { FILE: zh-hant/codes/cpp/chapter_dynamic_programming/coin_change_ii.cpp function coinChangeIIDP (line 10) | int coinChangeIIDP(vector &coins, int amt) { function coinChangeIIDPComp (line 34) | int coinChangeIIDPComp(vector &coins, int amt) { function main (line 55) | int main() { FILE: zh-hant/codes/cpp/chapter_dynamic_programming/edit_distance.cpp function editDistanceDFS (line 10) | int editDistanceDFS(string s, string t, int i, int j) { function editDistanceDFSMem (line 32) | int editDistanceDFSMem(string s, string t, vector> &mem, int... function editDistanceDP (line 58) | int editDistanceDP(string s, string t) { function editDistanceDPComp (line 84) | int editDistanceDPComp(string s, string t) { function main (line 113) | int main() { FILE: zh-hant/codes/cpp/chapter_dynamic_programming/knapsack.cpp function knapsackDFS (line 8) | int knapsackDFS(vector &wgt, vector &val, int i, int c) { function knapsackDFSMem (line 25) | int knapsackDFSMem(vector &wgt, vector &val, vector &wgt, vector &val, int cap) { function knapsackDPComp (line 67) | int knapsackDPComp(vector &wgt, vector &val, int cap) { function main (line 85) | int main() { FILE: zh-hant/codes/cpp/chapter_dynamic_programming/min_cost_climbing_stairs_dp.cpp function minCostClimbingStairsDP (line 10) | int minCostClimbingStairsDP(vector &cost) { function minCostClimbingStairsDPComp (line 27) | int minCostClimbingStairsDPComp(vector &cost) { function main (line 41) | int main() { FILE: zh-hant/codes/cpp/chapter_dynamic_programming/min_path_sum.cpp function minPathSumDFS (line 10) | int minPathSumDFS(vector> &grid, int i, int j) { function minPathSumDFSMem (line 27) | int minPathSumDFSMem(vector> &grid, vector> &mem... function minPathSumDP (line 49) | int minPathSumDP(vector> &grid) { function minPathSumDPComp (line 72) | int minPathSumDPComp(vector> &grid) { function main (line 94) | int main() { FILE: zh-hant/codes/cpp/chapter_dynamic_programming/unbounded_knapsack.cpp function unboundedKnapsackDP (line 10) | int unboundedKnapsackDP(vector &wgt, vector &val, int cap) { function unboundedKnapsackDPComp (line 30) | int unboundedKnapsackDPComp(vector &wgt, vector &val, int cap) { function main (line 50) | int main() { FILE: zh-hant/codes/cpp/chapter_graph/graph_adjacency_list.cpp class GraphAdjList (line 10) | class GraphAdjList { method remove (line 16) | void remove(vector &vec, Vertex *vet) { method GraphAdjList (line 26) | GraphAdjList(const vector> &edges) { method size (line 36) | int size() { method addEdge (line 41) | void addEdge(Vertex *vet1, Vertex *vet2) { method removeEdge (line 50) | void removeEdge(Vertex *vet1, Vertex *vet2) { method addVertex (line 59) | void addVertex(Vertex *vet) { method removeVertex (line 67) | void removeVertex(Vertex *vet) { method print (line 79) | void print() { FILE: zh-hant/codes/cpp/chapter_graph/graph_adjacency_list_test.cpp function main (line 10) | int main() { FILE: zh-hant/codes/cpp/chapter_graph/graph_adjacency_matrix.cpp class GraphAdjMat (line 10) | class GraphAdjMat { method GraphAdjMat (line 16) | GraphAdjMat(const vector &vertices, const vector> &ed... method size (line 29) | int size() const { method addVertex (line 34) | void addVertex(int val) { method removeVertex (line 47) | void removeVertex(int index) { method addEdge (line 63) | void addEdge(int i, int j) { method removeEdge (line 75) | void removeEdge(int i, int j) { method print (line 85) | void print() { function main (line 94) | int main() { FILE: zh-hant/codes/cpp/chapter_graph/graph_bfs.cpp function graphBFS (line 12) | vector graphBFS(GraphAdjList &graph, Vertex *startVet) { function main (line 38) | int main() { FILE: zh-hant/codes/cpp/chapter_graph/graph_dfs.cpp function dfs (line 11) | void dfs(GraphAdjList &graph, unordered_set &visited, vector graphDFS(GraphAdjList &graph, Vertex *startVet) { function main (line 35) | int main() { FILE: zh-hant/codes/cpp/chapter_greedy/coin_change_greedy.cpp function coinChangeGreedy (line 10) | int coinChangeGreedy(vector &coins, int amt) { function main (line 29) | int main() { FILE: zh-hant/codes/cpp/chapter_greedy/fractional_knapsack.cpp class Item (line 10) | class Item { method Item (line 15) | Item(int w, int v) : w(w), v(v) { function fractionalKnapsack (line 20) | double fractionalKnapsack(vector &wgt, vector &val, int cap) { function main (line 46) | int main() { FILE: zh-hant/codes/cpp/chapter_greedy/max_capacity.cpp function maxCapacity (line 10) | int maxCapacity(vector &ht) { function main (line 31) | int main() { FILE: zh-hant/codes/cpp/chapter_greedy/max_product_cutting.cpp function maxProductCutting (line 10) | int maxProductCutting(int n) { function main (line 31) | int main() { FILE: zh-hant/codes/cpp/chapter_hashing/array_hash_map.cpp type Pair (line 10) | struct Pair { method Pair (line 14) | Pair(int key, string val) { class ArrayHashMap (line 21) | class ArrayHashMap { method ArrayHashMap (line 26) | ArrayHashMap() { method hashFunc (line 40) | int hashFunc(int key) { method string (line 46) | string get(int key) { method put (line 55) | void put(int key, string val) { method remove (line 62) | void remove(int key) { method pairSet (line 70) | vector pairSet() { method keySet (line 81) | vector keySet() { method valueSet (line 92) | vector valueSet() { method print (line 103) | void print() { FILE: zh-hant/codes/cpp/chapter_hashing/array_hash_map_test.cpp function main (line 10) | int main() { FILE: zh-hant/codes/cpp/chapter_hashing/built_in_hash.cpp function main (line 10) | int main() { FILE: zh-hant/codes/cpp/chapter_hashing/hash_map.cpp function main (line 10) | int main() { FILE: zh-hant/codes/cpp/chapter_hashing/hash_map_chaining.cpp class HashMapChaining (line 10) | class HashMapChaining { method HashMapChaining (line 20) | HashMapChaining() : size(0), capacity(4), loadThres(2.0 / 3.0), extend... method hashFunc (line 35) | int hashFunc(int key) { method loadFactor (line 40) | double loadFactor() { method string (line 45) | string get(int key) { method put (line 58) | void put(int key, string val) { method remove (line 77) | void remove(int key) { method extend (line 93) | void extend() { method print (line 112) | void print() { function main (line 124) | int main() { FILE: zh-hant/codes/cpp/chapter_hashing/hash_map_open_addressing.cpp class HashMapOpenAddressing (line 10) | class HashMapOpenAddressing { method HashMapOpenAddressing (line 21) | HashMapOpenAddressing() : size(0), buckets(capacity, nullptr) { method hashFunc (line 35) | int hashFunc(int key) { method loadFactor (line 40) | double loadFactor() { method findBucket (line 45) | int findBucket(int key) { method string (line 72) | string get(int key) { method put (line 84) | void put(int key, string val) { method remove (line 102) | void remove(int key) { method extend (line 114) | void extend() { method print (line 131) | void print() { function main (line 145) | int main() { FILE: zh-hant/codes/cpp/chapter_hashing/simple_hash.cpp function addHash (line 10) | int addHash(string key) { function mulHash (line 20) | int mulHash(string key) { function xorHash (line 30) | int xorHash(string key) { function rotHash (line 40) | int rotHash(string key) { function main (line 50) | int main() { FILE: zh-hant/codes/cpp/chapter_heap/heap.cpp function testPush (line 9) | void testPush(priority_queue &heap, int val) { function testPop (line 15) | void testPop(priority_queue &heap) { function main (line 23) | int main() { FILE: zh-hant/codes/cpp/chapter_heap/my_heap.cpp class MaxHeap (line 10) | class MaxHeap { method left (line 16) | int left(int i) { method right (line 21) | int right(int i) { method parent (line 26) | int parent(int i) { method siftUp (line 31) | void siftUp(int i) { method siftDown (line 46) | void siftDown(int i) { method MaxHeap (line 65) | MaxHeap(vector nums) { method size (line 75) | int size() { method isEmpty (line 80) | bool isEmpty() { method peek (line 85) | int peek() { method push (line 90) | void push(int val) { method pop (line 98) | void pop() { method print (line 112) | void print() { function main (line 123) | int main() { FILE: zh-hant/codes/cpp/chapter_heap/top_k.cpp function topKHeap (line 10) | priority_queue, greater> topKHeap(vector &num... function main (line 29) | int main() { FILE: zh-hant/codes/cpp/chapter_searching/binary_search.cpp function binarySearch (line 10) | int binarySearch(vector &nums, int target) { function binarySearchLCRO (line 28) | int binarySearchLCRO(vector &nums, int target) { function main (line 46) | int main() { FILE: zh-hant/codes/cpp/chapter_searching/binary_search_edge.cpp function binarySearchInsertion (line 10) | int binarySearchInsertion(const vector &nums, int target) { function binarySearchLeftEdge (line 25) | int binarySearchLeftEdge(vector &nums, int target) { function binarySearchRightEdge (line 37) | int binarySearchRightEdge(vector &nums, int target) { function main (line 51) | int main() { FILE: zh-hant/codes/cpp/chapter_searching/binary_search_insertion.cpp function binarySearchInsertionSimple (line 10) | int binarySearchInsertionSimple(vector &nums, int target) { function binarySearchInsertion (line 27) | int binarySearchInsertion(vector &nums, int target) { function main (line 44) | int main() { FILE: zh-hant/codes/cpp/chapter_searching/hashing_search.cpp function hashingSearchArray (line 10) | int hashingSearchArray(unordered_map map, int target) { function ListNode (line 19) | ListNode *hashingSearchLinkedList(unordered_map map, in... function main (line 28) | int main() { FILE: zh-hant/codes/cpp/chapter_searching/linear_search.cpp function linearSearchArray (line 10) | int linearSearchArray(vector &nums, int target) { function ListNode (line 22) | ListNode *linearSearchLinkedList(ListNode *head, int target) { function main (line 35) | int main() { FILE: zh-hant/codes/cpp/chapter_searching/two_sum.cpp function twoSumBruteForce (line 10) | vector twoSumBruteForce(vector &nums, int target) { function twoSumHashTable (line 23) | vector twoSumHashTable(vector &nums, int target) { function main (line 38) | int main() { FILE: zh-hant/codes/cpp/chapter_sorting/bubble_sort.cpp function bubbleSort (line 10) | void bubbleSort(vector &nums) { function bubbleSortWithFlag (line 25) | void bubbleSortWithFlag(vector &nums) { function main (line 44) | int main() { FILE: zh-hant/codes/cpp/chapter_sorting/bucket_sort.cpp function bucketSort (line 10) | void bucketSort(vector &nums) { function main (line 36) | int main() { FILE: zh-hant/codes/cpp/chapter_sorting/counting_sort.cpp function countingSortNaive (line 11) | void countingSortNaive(vector &nums) { function countingSort (line 34) | void countingSort(vector &nums) { function main (line 65) | int main() { FILE: zh-hant/codes/cpp/chapter_sorting/heap_sort.cpp function siftDown (line 10) | void siftDown(vector &nums, int n, int i) { function heapSort (line 32) | void heapSort(vector &nums) { function main (line 47) | int main() { FILE: zh-hant/codes/cpp/chapter_sorting/insertion_sort.cpp function insertionSort (line 10) | void insertionSort(vector &nums) { function main (line 24) | int main() { FILE: zh-hant/codes/cpp/chapter_sorting/merge_sort.cpp function merge (line 10) | void merge(vector &nums, int left, int mid, int right) { function mergeSort (line 37) | void mergeSort(vector &nums, int left, int right) { function main (line 50) | int main() { FILE: zh-hant/codes/cpp/chapter_sorting/quick_sort.cpp class QuickSort (line 10) | class QuickSort { method partition (line 13) | static int partition(vector &nums, int left, int right) { method quickSort (line 29) | static void quickSort(vector &nums, int left, int right) { class QuickSortMedian (line 42) | class QuickSortMedian { method medianThree (line 45) | static int medianThree(vector &nums, int left, int mid, int right) { method partition (line 55) | static int partition(vector &nums, int left, int right) { method quickSort (line 75) | static void quickSort(vector &nums, int left, int right) { class QuickSortTailCall (line 88) | class QuickSortTailCall { method partition (line 91) | static int partition(vector &nums, int left, int right) { method quickSort (line 107) | static void quickSort(vector &nums, int left, int right) { function main (line 125) | int main() { FILE: zh-hant/codes/cpp/chapter_sorting/radix_sort.cpp function digit (line 10) | int digit(int num, int exp) { function countingSortDigit (line 16) | void countingSortDigit(vector &nums, int exp) { function radixSort (line 43) | void radixSort(vector &nums) { function main (line 56) | int main() { FILE: zh-hant/codes/cpp/chapter_sorting/selection_sort.cpp function selectionSort (line 10) | void selectionSort(vector &nums) { function main (line 26) | int main() { FILE: zh-hant/codes/cpp/chapter_stack_and_queue/array_deque.cpp class ArrayDeque (line 10) | class ArrayDeque { method ArrayDeque (line 18) | ArrayDeque(int capacity) { method capacity (line 24) | int capacity() { method size (line 29) | int size() { method isEmpty (line 34) | bool isEmpty() { method index (line 39) | int index(int i) { method pushFirst (line 47) | void pushFirst(int num) { method pushLast (line 61) | void pushLast(int num) { method popFirst (line 74) | int popFirst() { method popLast (line 83) | int popLast() { method peekFirst (line 90) | int peekFirst() { method peekLast (line 97) | int peekLast() { method toVector (line 106) | vector toVector() { function main (line 117) | int main() { FILE: zh-hant/codes/cpp/chapter_stack_and_queue/array_queue.cpp class ArrayQueue (line 10) | class ArrayQueue { method ArrayQueue (line 18) | ArrayQueue(int capacity) { method capacity (line 30) | int capacity() { method size (line 35) | int size() { method isEmpty (line 40) | bool isEmpty() { method push (line 45) | void push(int num) { method pop (line 59) | int pop() { method peek (line 68) | int peek() { method toVector (line 75) | vector toVector() { function main (line 86) | int main() { FILE: zh-hant/codes/cpp/chapter_stack_and_queue/array_stack.cpp class ArrayStack (line 10) | class ArrayStack { method size (line 16) | int size() { method isEmpty (line 21) | bool isEmpty() { method push (line 26) | void push(int num) { method pop (line 31) | int pop() { method top (line 38) | int top() { method toVector (line 45) | vector toVector() { function main (line 51) | int main() { FILE: zh-hant/codes/cpp/chapter_stack_and_queue/deque.cpp function main (line 10) | int main() { FILE: zh-hant/codes/cpp/chapter_stack_and_queue/linkedlist_deque.cpp type DoublyListNode (line 10) | struct DoublyListNode { method DoublyListNode (line 14) | DoublyListNode(int val) : val(val), prev(nullptr), next(nullptr) { class LinkedListDeque (line 19) | class LinkedListDeque { method LinkedListDeque (line 26) | LinkedListDeque() : front(nullptr), rear(nullptr) { method size (line 41) | int size() { method isEmpty (line 46) | bool isEmpty() { method push (line 51) | void push(int num, bool isFront) { method pushFirst (line 73) | void pushFirst(int num) { method pushLast (line 78) | void pushLast(int num) { method pop (line 83) | int pop(bool isFront) { method popFirst (line 115) | int popFirst() { method popLast (line 120) | int popLast() { method peekFirst (line 125) | int peekFirst() { method peekLast (line 132) | int peekLast() { method toVector (line 139) | vector toVector() { function main (line 151) | int main() { FILE: zh-hant/codes/cpp/chapter_stack_and_queue/linkedlist_queue.cpp class LinkedListQueue (line 10) | class LinkedListQueue { method LinkedListQueue (line 16) | LinkedListQueue() { method size (line 28) | int size() { method isEmpty (line 33) | bool isEmpty() { method push (line 38) | void push(int num) { method pop (line 55) | int pop() { method peek (line 67) | int peek() { method toVector (line 74) | vector toVector() { function main (line 86) | int main() { FILE: zh-hant/codes/cpp/chapter_stack_and_queue/linkedlist_stack.cpp class LinkedListStack (line 10) | class LinkedListStack { method LinkedListStack (line 16) | LinkedListStack() { method size (line 27) | int size() { method isEmpty (line 32) | bool isEmpty() { method push (line 37) | void push(int num) { method pop (line 45) | int pop() { method top (line 56) | int top() { method toVector (line 63) | vector toVector() { function main (line 75) | int main() { FILE: zh-hant/codes/cpp/chapter_stack_and_queue/queue.cpp function main (line 10) | int main() { FILE: zh-hant/codes/cpp/chapter_stack_and_queue/stack.cpp function main (line 10) | int main() { FILE: zh-hant/codes/cpp/chapter_tree/array_binary_tree.cpp class ArrayBinaryTree (line 10) | class ArrayBinaryTree { method ArrayBinaryTree (line 13) | ArrayBinaryTree(vector arr) { method size (line 18) | int size() { method val (line 23) | int val(int i) { method left (line 31) | int left(int i) { method right (line 36) | int right(int i) { method parent (line 41) | int parent(int i) { method levelOrder (line 46) | vector levelOrder() { method preOrder (line 57) | vector preOrder() { method inOrder (line 64) | vector inOrder() { method postOrder (line 71) | vector postOrder() { method dfs (line 81) | void dfs(int i, string order, vector &res) { function main (line 100) | int main() { FILE: zh-hant/codes/cpp/chapter_tree/avl_tree.cpp class AVLTree (line 10) | class AVLTree { method updateHeight (line 13) | void updateHeight(TreeNode *node) { method TreeNode (line 19) | TreeNode *rightRotate(TreeNode *node) { method TreeNode (line 33) | TreeNode *leftRotate(TreeNode *node) { method TreeNode (line 47) | TreeNode *rotate(TreeNode *node) { method TreeNode (line 77) | TreeNode *insertHelper(TreeNode *node, int val) { method TreeNode (line 95) | TreeNode *removeHelper(TreeNode *node, int val) { method height (line 138) | int height(TreeNode *node) { method balanceFactor (line 144) | int balanceFactor(TreeNode *node) { method insert (line 153) | void insert(int val) { method remove (line 158) | void remove(int val) { method TreeNode (line 163) | TreeNode *search(int val) { method AVLTree (line 182) | AVLTree() : root(nullptr) { function testInsert (line 191) | void testInsert(AVLTree &tree, int val) { function testRemove (line 197) | void testRemove(AVLTree &tree, int val) { function main (line 204) | int main() { FILE: zh-hant/codes/cpp/chapter_tree/binary_search_tree.cpp class BinarySearchTree (line 10) | class BinarySearchTree { method BinarySearchTree (line 16) | BinarySearchTree() { method TreeNode (line 27) | TreeNode *getRoot() { method TreeNode (line 32) | TreeNode *search(int num) { method insert (line 51) | void insert(int num) { method remove (line 80) | void remove(int num) { function main (line 135) | int main() { FILE: zh-hant/codes/cpp/chapter_tree/binary_tree.cpp function main (line 10) | int main() { FILE: zh-hant/codes/cpp/chapter_tree/binary_tree_bfs.cpp function levelOrder (line 10) | vector levelOrder(TreeNode *root) { function main (line 29) | int main() { FILE: zh-hant/codes/cpp/chapter_tree/binary_tree_dfs.cpp function preOrder (line 13) | void preOrder(TreeNode *root) { function inOrder (line 23) | void inOrder(TreeNode *root) { function postOrder (line 33) | void postOrder(TreeNode *root) { function main (line 43) | int main() { FILE: zh-hant/codes/cpp/utils/list_node.hpp type ListNode (line 15) | struct ListNode { method ListNode (line 18) | ListNode(int x) : val(x), next(nullptr) { function ListNode (line 23) | ListNode *vecToLinkedList(vector list) { method ListNode (line 18) | ListNode(int x) : val(x), next(nullptr) { function freeMemoryLinkedList (line 34) | void freeMemoryLinkedList(ListNode *cur) { FILE: zh-hant/codes/cpp/utils/print_utils.hpp function vecFind (line 17) | int vecFind(const vector &vec, T ele) { function string (line 28) | string strJoin(const string &delim, const T &vec) { function string (line 40) | string strRepeat(string str, int n) { function printArray (line 48) | void printArray(T *arr, int n) { function string (line 60) | string getVectorString(vector &list) { function printVector (line 65) | void printVector(vector list) { function printVectorMatrix (line 70) | void printVectorMatrix(vector> &matrix) { function printLinkedList (line 78) | void printLinkedList(ListNode *head) { type Trunk (line 88) | struct Trunk { method Trunk (line 91) | Trunk(Trunk *prev, string str) { function showTrunks (line 97) | void showTrunks(Trunk *p) { function printTree (line 111) | void printTree(TreeNode *root, Trunk *prev, bool isRight) { function printTree (line 143) | void printTree(TreeNode *root) { function printStack (line 148) | void printStack(stack stk) { function printQueue (line 170) | void printQueue(queue queue) { function printDeque (line 186) | void printDeque(deque deque) { function printHashMap (line 203) | void printHashMap(unordered_map map) { function S (line 210) | S &Container(priority_queue &pq) { function printHeap (line 220) | void printHeap(priority_queue &heap) { FILE: zh-hant/codes/cpp/utils/tree_node.hpp type TreeNode (line 15) | struct TreeNode { method TreeNode (line 21) | TreeNode() = default; method TreeNode (line 22) | explicit TreeNode(int x, TreeNode *parent = nullptr) : val(x), parent(... function TreeNode (line 43) | TreeNode *vectorToTreeDFS(vector &arr, int i) { method TreeNode (line 21) | TreeNode() = default; method TreeNode (line 22) | explicit TreeNode(int x, TreeNode *parent = nullptr) : val(x), parent(... function TreeNode (line 54) | TreeNode *vectorToTree(vector arr) { method TreeNode (line 21) | TreeNode() = default; method TreeNode (line 22) | explicit TreeNode(int x, TreeNode *parent = nullptr) : val(x), parent(... function treeToVecorDFS (line 59) | void treeToVecorDFS(TreeNode *root, int i, vector &res) { function treeToVecor (line 71) | vector treeToVecor(TreeNode *root) { function freeMemoryTree (line 78) | void freeMemoryTree(TreeNode *root) { FILE: zh-hant/codes/cpp/utils/vertex.hpp type Vertex (line 14) | struct Vertex { method Vertex (line 16) | Vertex(int x) : val(x) { function valsToVets (line 21) | vector valsToVets(vector vals) { function vetsToVals (line 30) | vector vetsToVals(vector vets) { FILE: zh-hant/codes/csharp/chapter_array_and_linkedlist/array.cs class array (line 7) | public class array { method RandomAccess (line 9) | int RandomAccess(int[] nums) { method Extend (line 19) | int[] Extend(int[] nums, int enlarge) { method Insert (line 31) | void Insert(int[] nums, int num, int index) { method Remove (line 41) | void Remove(int[] nums, int index) { method Traverse (line 49) | void Traverse(int[] nums) { method Find (line 62) | int Find(int[] nums, int target) { method ToString (line 71) | string ToString(int[] nums) { method Test (line 76) | [Test] FILE: zh-hant/codes/csharp/chapter_array_and_linkedlist/linked_list.cs class linked_list (line 7) | public class linked_list { method Insert (line 9) | void Insert(ListNode n0, ListNode P) { method Remove (line 16) | void Remove(ListNode n0) { method Access (line 26) | ListNode? Access(ListNode? head, int index) { method Find (line 36) | int Find(ListNode? head, int target) { method Test (line 48) | [Test] FILE: zh-hant/codes/csharp/chapter_array_and_linkedlist/list.cs class list (line 9) | public class list { method Test (line 10) | [Test] FILE: zh-hant/codes/csharp/chapter_array_and_linkedlist/my_list.cs class MyList (line 10) | class MyList { method MyList (line 17) | public MyList() { method Size (line 22) | public int Size() { method Capacity (line 27) | public int Capacity() { method Get (line 32) | public int Get(int index) { method Set (line 40) | public void Set(int index, int num) { method Add (line 47) | public void Add(int num) { method Insert (line 57) | public void Insert(int index, int num) { method Remove (line 73) | public int Remove(int index) { method ExtendCapacity (line 88) | public void ExtendCapacity() { method ToArray (line 96) | public int[] ToArray() { class my_list (line 106) | public class my_list { method Test (line 107) | [Test] FILE: zh-hant/codes/csharp/chapter_backtracking/n_queens.cs class n_queens (line 9) | public class n_queens { method Backtrack (line 11) | void Backtrack(int row, int n, List> state, List>> NQueens(int n) { method Test (line 62) | [Test] FILE: zh-hant/codes/csharp/chapter_backtracking/permutations_i.cs class permutations_i (line 9) | public class permutations_i { method Backtrack (line 11) | void Backtrack(List state, int[] choices, bool[] selected, List> PermutationsI(int[] nums) { method Test (line 41) | [Test] FILE: zh-hant/codes/csharp/chapter_backtracking/permutations_ii.cs class permutations_ii (line 9) | public class permutations_ii { method Backtrack (line 11) | void Backtrack(List state, int[] choices, bool[] selected, List> PermutationsII(int[] nums) { method Test (line 43) | [Test] FILE: zh-hant/codes/csharp/chapter_backtracking/preorder_traversal_i_compact.cs class preorder_traversal_i_compact (line 9) | public class preorder_traversal_i_compact { method PreOrder (line 13) | void PreOrder(TreeNode? root) { method Test (line 25) | [Test] FILE: zh-hant/codes/csharp/chapter_backtracking/preorder_traversal_ii_compact.cs class preorder_traversal_ii_compact (line 9) | public class preorder_traversal_ii_compact { method PreOrder (line 14) | void PreOrder(TreeNode? root) { method Test (line 30) | [Test] FILE: zh-hant/codes/csharp/chapter_backtracking/preorder_traversal_iii_compact.cs class preorder_traversal_iii_compact (line 9) | public class preorder_traversal_iii_compact { method PreOrder (line 14) | void PreOrder(TreeNode? root) { method Test (line 31) | [Test] FILE: zh-hant/codes/csharp/chapter_backtracking/preorder_traversal_iii_template.cs class preorder_traversal_iii_template (line 9) | public class preorder_traversal_iii_template { method IsSolution (line 11) | bool IsSolution(List state) { method RecordSolution (line 16) | void RecordSolution(List state, List> res) { method IsValid (line 21) | bool IsValid(List state, TreeNode choice) { method MakeChoice (line 26) | void MakeChoice(List state, TreeNode choice) { method UndoChoice (line 31) | void UndoChoice(List state, TreeNode choice) { method Backtrack (line 36) | void Backtrack(List state, List choices, List state, int target, int[] choices, int start, ... method SubsetSumI (line 35) | List> SubsetSumI(int[] nums, int target) { method Test (line 44) | [Test] FILE: zh-hant/codes/csharp/chapter_backtracking/subset_sum_i_naive.cs class subset_sum_i_naive (line 9) | public class subset_sum_i_naive { method Backtrack (line 11) | void Backtrack(List state, int target, int total, int[] choices, ... method SubsetSumINaive (line 33) | List> SubsetSumINaive(int[] nums, int target) { method Test (line 41) | [Test] FILE: zh-hant/codes/csharp/chapter_backtracking/subset_sum_ii.cs class subset_sum_ii (line 9) | public class subset_sum_ii { method Backtrack (line 11) | void Backtrack(List state, int target, int[] choices, int start, ... method SubsetSumII (line 40) | List> SubsetSumII(int[] nums, int target) { method Test (line 49) | [Test] FILE: zh-hant/codes/csharp/chapter_computational_complexity/iteration.cs class iteration (line 9) | public class iteration { method ForLoop (line 11) | int ForLoop(int n) { method WhileLoop (line 21) | int WhileLoop(int n) { method WhileLoopII (line 33) | int WhileLoopII(int n) { method NestedForLoop (line 47) | string NestedForLoop(int n) { method Test (line 60) | [Test] FILE: zh-hant/codes/csharp/chapter_computational_complexity/recursion.cs class recursion (line 9) | public class recursion { method Recur (line 11) | int Recur(int n) { method ForLoopRecur (line 22) | int ForLoopRecur(int n) { method TailRecur (line 41) | int TailRecur(int n, int res) { method Fib (line 50) | int Fib(int n) { method Test (line 61) | [Test] FILE: zh-hant/codes/csharp/chapter_computational_complexity/space_complexity.cs class space_complexity (line 9) | public class space_complexity { method Function (line 11) | int Function() { method Constant (line 17) | void Constant(int n) { method Linear (line 34) | void Linear(int n) { method LinearRecur (line 50) | void LinearRecur(int n) { method Quadratic (line 57) | void Quadratic(int n) { method QuadraticRecur (line 72) | int QuadraticRecur(int n) { method BuildTree (line 80) | TreeNode? BuildTree(int n) { method Test (line 89) | [Test] FILE: zh-hant/codes/csharp/chapter_computational_complexity/time_complexity.cs class time_complexity (line 9) | public class time_complexity { method Algorithm (line 10) | void Algorithm(int n) { method AlgorithmA (line 26) | void AlgorithmA(int n) { method AlgorithmB (line 31) | void AlgorithmB(int n) { method AlgorithmC (line 38) | void AlgorithmC(int n) { method Constant (line 45) | int Constant(int n) { method Linear (line 54) | int Linear(int n) { method ArrayTraversal (line 62) | int ArrayTraversal(int[] nums) { method Quadratic (line 72) | int Quadratic(int n) { method BubbleSort (line 84) | int BubbleSort(int[] nums) { method Exponential (line 101) | int Exponential(int n) { method ExpRecur (line 115) | int ExpRecur(int n) { method Logarithmic (line 121) | int Logarithmic(int n) { method LogRecur (line 131) | int LogRecur(int n) { method LinearLogRecur (line 137) | int LinearLogRecur(int n) { method FactorialRecur (line 147) | int FactorialRecur(int n) { method Test (line 157) | [Test] FILE: zh-hant/codes/csharp/chapter_computational_complexity/worst_best_time_complexity.cs class worst_best_time_complexity (line 9) | public class worst_best_time_complexity { method RandomNumbers (line 11) | int[] RandomNumbers(int n) { method FindOne (line 27) | int FindOne(int[] nums) { method Test (line 39) | [Test] FILE: zh-hant/codes/csharp/chapter_divide_and_conquer/binary_search_recur.cs class binary_search_recur (line 9) | public class binary_search_recur { method DFS (line 11) | int DFS(int[] nums, int target, int i, int j) { method BinarySearch (line 31) | int BinarySearch(int[] nums, int target) { method Test (line 37) | [Test] FILE: zh-hant/codes/csharp/chapter_divide_and_conquer/build_tree.cs class build_tree (line 9) | public class build_tree { method DFS (line 11) | TreeNode? DFS(int[] preorder, Dictionary inorderMap, int i, ... method BuildTree (line 28) | TreeNode? BuildTree(int[] preorder, int[] inorder) { method Test (line 38) | [Test] FILE: zh-hant/codes/csharp/chapter_divide_and_conquer/hanota.cs class hanota (line 9) | public class hanota { method Move (line 11) | void Move(List src, List tar) { method DFS (line 20) | void DFS(int i, List src, List buf, List tar) { method SolveHanota (line 35) | void SolveHanota(List A, List B, List C) { method Test (line 41) | [Test] FILE: zh-hant/codes/csharp/chapter_dynamic_programming/climbing_stairs_backtrack.cs class climbing_stairs_backtrack (line 9) | public class climbing_stairs_backtrack { method Backtrack (line 11) | void Backtrack(List choices, int state, int n, List res) { method ClimbingStairsBacktrack (line 27) | int ClimbingStairsBacktrack(int n) { method Test (line 35) | [Test] FILE: zh-hant/codes/csharp/chapter_dynamic_programming/climbing_stairs_constraint_dp.cs class climbing_stairs_constraint_dp (line 9) | public class climbing_stairs_constraint_dp { method ClimbingStairsConstraintDP (line 11) | int ClimbingStairsConstraintDP(int n) { method Test (line 30) | [Test] FILE: zh-hant/codes/csharp/chapter_dynamic_programming/climbing_stairs_dfs.cs class climbing_stairs_dfs (line 9) | public class climbing_stairs_dfs { method DFS (line 11) | int DFS(int i) { method ClimbingStairsDFS (line 21) | int ClimbingStairsDFS(int n) { method Test (line 25) | [Test] FILE: zh-hant/codes/csharp/chapter_dynamic_programming/climbing_stairs_dfs_mem.cs class climbing_stairs_dfs_mem (line 9) | public class climbing_stairs_dfs_mem { method DFS (line 11) | int DFS(int i, int[] mem) { method ClimbingStairsDFSMem (line 26) | int ClimbingStairsDFSMem(int n) { method Test (line 33) | [Test] FILE: zh-hant/codes/csharp/chapter_dynamic_programming/climbing_stairs_dp.cs class climbing_stairs_dp (line 9) | public class climbing_stairs_dp { method ClimbingStairsDP (line 11) | int ClimbingStairsDP(int n) { method ClimbingStairsDPComp (line 27) | int ClimbingStairsDPComp(int n) { method Test (line 39) | [Test] FILE: zh-hant/codes/csharp/chapter_dynamic_programming/coin_change.cs class coin_change (line 9) | public class coin_change { method CoinChangeDP (line 11) | int CoinChangeDP(int[] coins, int amt) { method CoinChangeDPComp (line 36) | int CoinChangeDPComp(int[] coins, int amt) { method Test (line 58) | [Test] FILE: zh-hant/codes/csharp/chapter_dynamic_programming/coin_change_ii.cs class coin_change_ii (line 9) | public class coin_change_ii { method CoinChangeIIDP (line 11) | int CoinChangeIIDP(int[] coins, int amt) { method CoinChangeIIDPComp (line 35) | int CoinChangeIIDPComp(int[] coins, int amt) { method Test (line 55) | [Test] FILE: zh-hant/codes/csharp/chapter_dynamic_programming/edit_distance.cs class edit_distance (line 9) | public class edit_distance { method EditDistanceDFS (line 11) | int EditDistanceDFS(string s, string t, int i, int j) { method EditDistanceDFSMem (line 33) | int EditDistanceDFSMem(string s, string t, int[][] mem, int i, int j) { method EditDistanceDP (line 59) | int EditDistanceDP(string s, string t) { method EditDistanceDPComp (line 85) | int EditDistanceDPComp(string s, string t) { method Test (line 113) | [Test] FILE: zh-hant/codes/csharp/chapter_dynamic_programming/knapsack.cs class knapsack (line 9) | public class knapsack { method KnapsackDFS (line 11) | int KnapsackDFS(int[] weight, int[] val, int i, int c) { method KnapsackDFSMem (line 28) | int KnapsackDFSMem(int[] weight, int[] val, int[][] mem, int i, int c) { method KnapsackDP (line 50) | int KnapsackDP(int[] weight, int[] val, int cap) { method KnapsackDPComp (line 70) | int KnapsackDPComp(int[] weight, int[] val, int cap) { method Test (line 90) | [Test] FILE: zh-hant/codes/csharp/chapter_dynamic_programming/min_cost_climbing_stairs_dp.cs class min_cost_climbing_stairs_dp (line 9) | public class min_cost_climbing_stairs_dp { method MinCostClimbingStairsDP (line 11) | int MinCostClimbingStairsDP(int[] cost) { method MinCostClimbingStairsDPComp (line 28) | int MinCostClimbingStairsDPComp(int[] cost) { method Test (line 41) | [Test] FILE: zh-hant/codes/csharp/chapter_dynamic_programming/min_path_sum.cs class min_path_sum (line 9) | public class min_path_sum { method MinPathSumDFS (line 11) | int MinPathSumDFS(int[][] grid, int i, int j) { method MinPathSumDFSMem (line 28) | int MinPathSumDFSMem(int[][] grid, int[][] mem, int i, int j) { method MinPathSumDP (line 50) | int MinPathSumDP(int[][] grid) { method MinPathSumDPComp (line 73) | int MinPathSumDPComp(int[][] grid) { method Test (line 94) | [Test] FILE: zh-hant/codes/csharp/chapter_dynamic_programming/unbounded_knapsack.cs class unbounded_knapsack (line 9) | public class unbounded_knapsack { method UnboundedKnapsackDP (line 11) | int UnboundedKnapsackDP(int[] wgt, int[] val, int cap) { method UnboundedKnapsackDPComp (line 31) | int UnboundedKnapsackDPComp(int[] wgt, int[] val, int cap) { method Test (line 50) | [Test] FILE: zh-hant/codes/csharp/chapter_graph/graph_adjacency_list.cs class GraphAdjList (line 10) | public class GraphAdjList { method GraphAdjList (line 15) | public GraphAdjList(Vertex[][] edges) { method Size (line 26) | int Size() { method AddEdge (line 31) | public void AddEdge(Vertex vet1, Vertex vet2) { method RemoveEdge (line 40) | public void RemoveEdge(Vertex vet1, Vertex vet2) { method AddVertex (line 49) | public void AddVertex(Vertex vet) { method RemoveVertex (line 57) | public void RemoveVertex(Vertex vet) { method Print (line 69) | public void Print() { class graph_adjacency_list (line 80) | public class graph_adjacency_list { method Test (line 81) | [Test] FILE: zh-hant/codes/csharp/chapter_graph/graph_adjacency_matrix.cs class GraphAdjMat (line 10) | class GraphAdjMat { method GraphAdjMat (line 15) | public GraphAdjMat(int[] vertices, int[][] edges) { method Size (line 30) | int Size() { method AddVertex (line 35) | public void AddVertex(int val) { method RemoveVertex (line 52) | public void RemoveVertex(int index) { method AddEdge (line 67) | public void AddEdge(int i, int j) { method RemoveEdge (line 78) | public void RemoveEdge(int i, int j) { method Print (line 87) | public void Print() { class graph_adjacency_matrix (line 95) | public class graph_adjacency_matrix { method Test (line 96) | [Test] FILE: zh-hant/codes/csharp/chapter_graph/graph_bfs.cs class graph_bfs (line 9) | public class graph_bfs { method GraphBFS (line 12) | List GraphBFS(GraphAdjList graph, Vertex startVet) { method Test (line 37) | [Test] FILE: zh-hant/codes/csharp/chapter_graph/graph_dfs.cs class graph_dfs (line 9) | public class graph_dfs { method DFS (line 11) | void DFS(GraphAdjList graph, HashSet visited, List res... method GraphDFS (line 26) | List GraphDFS(GraphAdjList graph, Vertex startVet) { method Test (line 35) | [Test] FILE: zh-hant/codes/csharp/chapter_greedy/coin_change_greedy.cs class coin_change_greedy (line 9) | public class coin_change_greedy { method CoinChangeGreedy (line 11) | int CoinChangeGreedy(int[] coins, int amt) { method Test (line 29) | [Test] FILE: zh-hant/codes/csharp/chapter_greedy/fractional_knapsack.cs class Item (line 10) | class Item(int w, int v) { class fractional_knapsack (line 15) | public class fractional_knapsack { method FractionalKnapsack (line 17) | double FractionalKnapsack(int[] wgt, int[] val, int cap) { method Test (line 42) | [Test] FILE: zh-hant/codes/csharp/chapter_greedy/max_capacity.cs class max_capacity (line 9) | public class max_capacity { method MaxCapacity (line 11) | int MaxCapacity(int[] ht) { method Test (line 31) | [Test] FILE: zh-hant/codes/csharp/chapter_greedy/max_product_cutting.cs class max_product_cutting (line 9) | public class max_product_cutting { method MaxProductCutting (line 11) | int MaxProductCutting(int n) { method Test (line 31) | [Test] FILE: zh-hant/codes/csharp/chapter_hashing/array_hash_map.cs class Pair (line 10) | class Pair(int key, string val) { class ArrayHashMap (line 16) | class ArrayHashMap { method ArrayHashMap (line 18) | public ArrayHashMap() { method HashFunc (line 27) | int HashFunc(int key) { method Get (line 33) | public string? Get(int key) { method Put (line 41) | public void Put(int key, string val) { method Remove (line 48) | public void Remove(int key) { method PairSet (line 55) | public List PairSet() { method KeySet (line 65) | public List KeySet() { method ValueSet (line 75) | public List ValueSet() { method Print (line 85) | public void Print() { class array_hash_map (line 93) | public class array_hash_map { method Test (line 94) | [Test] FILE: zh-hant/codes/csharp/chapter_hashing/built_in_hash.cs class built_in_hash (line 9) | public class built_in_hash { method Test (line 10) | [Test] FILE: zh-hant/codes/csharp/chapter_hashing/hash_map.cs class hash_map (line 10) | public class hash_map { method Test (line 11) | [Test] FILE: zh-hant/codes/csharp/chapter_hashing/hash_map_chaining.cs class HashMapChaining (line 10) | class HashMapChaining { method HashMapChaining (line 18) | public HashMapChaining() { method HashFunc (line 30) | int HashFunc(int key) { method LoadFactor (line 35) | double LoadFactor() { method Get (line 40) | public string? Get(int key) { method Put (line 53) | public void Put(int key, string val) { method Remove (line 72) | public void Remove(int key) { method Extend (line 85) | void Extend() { method Print (line 104) | public void Print() { class hash_map_chaining (line 117) | public class hash_map_chaining { method Test (line 118) | [Test] FILE: zh-hant/codes/csharp/chapter_hashing/hash_map_open_addressing.cs class HashMapOpenAddressing (line 10) | class HashMapOpenAddressing { method HashMapOpenAddressing (line 19) | public HashMapOpenAddressing() { method HashFunc (line 25) | int HashFunc(int key) { method LoadFactor (line 30) | double LoadFactor() { method FindBucket (line 35) | int FindBucket(int key) { method Get (line 62) | public string? Get(int key) { method Put (line 74) | public void Put(int key, string val) { method Remove (line 92) | public void Remove(int key) { method Extend (line 103) | void Extend() { method Print (line 119) | public void Print() { class hash_map_open_addressing (line 132) | public class hash_map_open_addressing { method Test (line 133) | [Test] FILE: zh-hant/codes/csharp/chapter_hashing/simple_hash.cs class simple_hash (line 9) | public class simple_hash { method AddHash (line 11) | int AddHash(string key) { method MulHash (line 21) | int MulHash(string key) { method XorHash (line 31) | int XorHash(string key) { method RotHash (line 41) | int RotHash(string key) { method Test (line 50) | [Test] FILE: zh-hant/codes/csharp/chapter_heap/heap.cs class heap (line 9) | public class heap { method TestPush (line 10) | void TestPush(PriorityQueue heap, int val) { method TestPop (line 16) | void TestPop(PriorityQueue heap) { method Test (line 22) | [Test] FILE: zh-hant/codes/csharp/chapter_heap/my_heap.cs class MaxHeap (line 10) | class MaxHeap { method MaxHeap (line 15) | public MaxHeap() { method MaxHeap (line 20) | public MaxHeap(IEnumerable nums) { method Left (line 31) | int Left(int i) { method Right (line 36) | int Right(int i) { method Parent (line 41) | int Parent(int i) { method Peek (line 46) | public int Peek() { method Push (line 51) | public void Push(int val) { method Size (line 59) | public int Size() { method IsEmpty (line 64) | public bool IsEmpty() { method SiftUp (line 69) | void SiftUp(int i) { method Pop (line 84) | public int Pop() { method SiftDown (line 100) | void SiftDown(int i) { method Swap (line 118) | void Swap(int i, int p) { method Print (line 123) | public void Print() { class my_heap (line 129) | public class my_heap { method Test (line 130) | [Test] FILE: zh-hant/codes/csharp/chapter_heap/top_k.cs class top_k (line 9) | public class top_k { method TopKHeap (line 11) | PriorityQueue TopKHeap(int[] nums, int k) { method Test (line 29) | [Test] FILE: zh-hant/codes/csharp/chapter_searching/binary_search.cs class binary_search (line 9) | public class binary_search { method BinarySearch (line 11) | int BinarySearch(int[] nums, int target) { method BinarySearchLCRO (line 29) | int BinarySearchLCRO(int[] nums, int target) { method Test (line 46) | [Test] FILE: zh-hant/codes/csharp/chapter_searching/binary_search_edge.cs class binary_search_edge (line 9) | public class binary_search_edge { method BinarySearchLeftEdge (line 11) | int BinarySearchLeftEdge(int[] nums, int target) { method BinarySearchRightEdge (line 23) | int BinarySearchRightEdge(int[] nums, int target) { method Test (line 36) | [Test] FILE: zh-hant/codes/csharp/chapter_searching/binary_search_insertion.cs class binary_search_insertion (line 9) | public class binary_search_insertion { method BinarySearchInsertionSimple (line 11) | public static int BinarySearchInsertionSimple(int[] nums, int target) { method BinarySearchInsertion (line 28) | public static int BinarySearchInsertion(int[] nums, int target) { method Test (line 44) | [Test] FILE: zh-hant/codes/csharp/chapter_searching/hashing_search.cs class hashing_search (line 9) | public class hashing_search { method HashingSearchArray (line 11) | int HashingSearchArray(Dictionary map, int target) { method HashingSearchLinkedList (line 18) | ListNode? HashingSearchLinkedList(Dictionary map, int t... method Test (line 25) | [Test] FILE: zh-hant/codes/csharp/chapter_searching/linear_search.cs class linear_search (line 9) | public class linear_search { method LinearSearchArray (line 11) | int LinearSearchArray(int[] nums, int target) { method LinearSearchLinkedList (line 23) | ListNode? LinearSearchLinkedList(ListNode? head, int target) { method Test (line 35) | [Test] FILE: zh-hant/codes/csharp/chapter_searching/two_sum.cs class two_sum (line 9) | public class two_sum { method TwoSumBruteForce (line 11) | int[] TwoSumBruteForce(int[] nums, int target) { method TwoSumHashTable (line 24) | int[] TwoSumHashTable(int[] nums, int target) { method Test (line 38) | [Test] FILE: zh-hant/codes/csharp/chapter_sorting/bubble_sort.cs class bubble_sort (line 9) | public class bubble_sort { method BubbleSort (line 11) | void BubbleSort(int[] nums) { method BubbleSortWithFlag (line 25) | void BubbleSortWithFlag(int[] nums) { method Test (line 41) | [Test] FILE: zh-hant/codes/csharp/chapter_sorting/bucket_sort.cs class bucket_sort (line 9) | public class bucket_sort { method BucketSort (line 11) | void BucketSort(float[] nums) { method Test (line 39) | [Test] FILE: zh-hant/codes/csharp/chapter_sorting/counting_sort.cs class counting_sort (line 9) | public class counting_sort { method CountingSortNaive (line 12) | void CountingSortNaive(int[] nums) { method CountingSort (line 35) | void CountingSort(int[] nums) { method Test (line 67) | [Test] FILE: zh-hant/codes/csharp/chapter_sorting/heap_sort.cs class heap_sort (line 9) | public class heap_sort { method SiftDown (line 11) | void SiftDown(int[] nums, int n, int i) { method HeapSort (line 32) | void HeapSort(int[] nums) { method Test (line 46) | [Test] FILE: zh-hant/codes/csharp/chapter_sorting/insertion_sort.cs class insertion_sort (line 9) | public class insertion_sort { method InsertionSort (line 11) | void InsertionSort(int[] nums) { method Test (line 24) | [Test] FILE: zh-hant/codes/csharp/chapter_sorting/merge_sort.cs class merge_sort (line 9) | public class merge_sort { method Merge (line 11) | void Merge(int[] nums, int left, int mid, int right) { method MergeSort (line 38) | void MergeSort(int[] nums, int left, int right) { method Test (line 49) | [Test] FILE: zh-hant/codes/csharp/chapter_sorting/quick_sort.cs class quickSort (line 9) | class quickSort { method Swap (line 11) | static void Swap(int[] nums, int i, int j) { method Partition (line 16) | static int Partition(int[] nums, int left, int right) { method QuickSort (line 31) | public static void QuickSort(int[] nums, int left, int right) { class QuickSortMedian (line 44) | class QuickSortMedian { method Swap (line 46) | static void Swap(int[] nums, int i, int j) { method MedianThree (line 51) | static int MedianThree(int[] nums, int left, int mid, int right) { method Partition (line 61) | static int Partition(int[] nums, int left, int right) { method QuickSort (line 80) | public static void QuickSort(int[] nums, int left, int right) { class QuickSortTailCall (line 93) | class QuickSortTailCall { method Swap (line 95) | static void Swap(int[] nums, int i, int j) { method Partition (line 100) | static int Partition(int[] nums, int left, int right) { method QuickSort (line 115) | public static void QuickSort(int[] nums, int left, int right) { class quick_sort (line 132) | public class quick_sort { method Test (line 133) | [Test] FILE: zh-hant/codes/csharp/chapter_sorting/radix_sort.cs class radix_sort (line 9) | public class radix_sort { method Digit (line 11) | int Digit(int num, int exp) { method CountingSortDigit (line 17) | void CountingSortDigit(int[] nums, int exp) { method RadixSort (line 45) | void RadixSort(int[] nums) { method Test (line 61) | [Test] FILE: zh-hant/codes/csharp/chapter_sorting/selection_sort.cs class selection_sort (line 9) | public class selection_sort { method SelectionSort (line 11) | void SelectionSort(int[] nums) { method Test (line 26) | [Test] FILE: zh-hant/codes/csharp/chapter_stack_and_queue/array_deque.cs class ArrayDeque (line 10) | public class ArrayDeque { method ArrayDeque (line 16) | public ArrayDeque(int capacity) { method Capacity (line 22) | int Capacity() { method Size (line 27) | public int Size() { method IsEmpty (line 32) | public bool IsEmpty() { method Index (line 37) | int Index(int i) { method PushFirst (line 45) | public void PushFirst(int num) { method PushLast (line 59) | public void PushLast(int num) { method PopFirst (line 72) | public int PopFirst() { method PopLast (line 81) | public int PopLast() { method PeekFirst (line 88) | public int PeekFirst() { method PeekLast (line 96) | public int PeekLast() { method ToArray (line 106) | public int[] ToArray() { class array_deque (line 116) | public class array_deque { method Test (line 117) | [Test] FILE: zh-hant/codes/csharp/chapter_stack_and_queue/array_queue.cs class ArrayQueue (line 10) | class ArrayQueue { method ArrayQueue (line 15) | public ArrayQueue(int capacity) { method Capacity (line 21) | int Capacity() { method Size (line 26) | public int Size() { method IsEmpty (line 31) | public bool IsEmpty() { method Push (line 36) | public void Push(int num) { method Pop (line 50) | public int Pop() { method Peek (line 59) | public int Peek() { method ToArray (line 66) | public int[] ToArray() { class array_queue (line 76) | public class array_queue { method Test (line 77) | [Test] FILE: zh-hant/codes/csharp/chapter_stack_and_queue/array_stack.cs class ArrayStack (line 10) | class ArrayStack { method ArrayStack (line 12) | public ArrayStack() { method Size (line 18) | public int Size() { method IsEmpty (line 23) | public bool IsEmpty() { method Push (line 28) | public void Push(int num) { method Pop (line 33) | public int Pop() { method Peek (line 42) | public int Peek() { method ToArray (line 49) | public int[] ToArray() { class array_stack (line 54) | public class array_stack { method Test (line 55) | [Test] FILE: zh-hant/codes/csharp/chapter_stack_and_queue/deque.cs class deque (line 9) | public class deque { method Test (line 10) | [Test] FILE: zh-hant/codes/csharp/chapter_stack_and_queue/linkedlist_deque.cs class ListNode (line 10) | public class ListNode(int val) { class LinkedListDeque (line 17) | public class LinkedListDeque { method LinkedListDeque (line 21) | public LinkedListDeque() { method Size (line 27) | public int Size() { method IsEmpty (line 32) | public bool IsEmpty() { method Push (line 37) | void Push(int num, bool isFront) { method PushFirst (line 63) | public void PushFirst(int num) { method PushLast (line 68) | public void PushLast(int num) { method Pop (line 73) | int? Pop(bool isFront) { method PopFirst (line 105) | public int? PopFirst() { method PopLast (line 110) | public int? PopLast() { method PeekFirst (line 115) | public int? PeekFirst() { method PeekLast (line 122) | public int? PeekLast() { method ToArray (line 129) | public int?[] ToArray() { class linkedlist_deque (line 141) | public class linkedlist_deque { method Test (line 142) | [Test] FILE: zh-hant/codes/csharp/chapter_stack_and_queue/linkedlist_queue.cs class LinkedListQueue (line 10) | class LinkedListQueue { method LinkedListQueue (line 14) | public LinkedListQueue() { method Size (line 20) | public int Size() { method IsEmpty (line 25) | public bool IsEmpty() { method Push (line 30) | public void Push(int num) { method Pop (line 46) | public int Pop() { method Peek (line 55) | public int Peek() { method ToArray (line 62) | public int[] ToArray() { class linkedlist_queue (line 76) | public class linkedlist_queue { method Test (line 77) | [Test] FILE: zh-hant/codes/csharp/chapter_stack_and_queue/linkedlist_stack.cs class LinkedListStack (line 10) | class LinkedListStack { method LinkedListStack (line 14) | public LinkedListStack() { method Size (line 19) | public int Size() { method IsEmpty (line 24) | public bool IsEmpty() { method Push (line 29) | public void Push(int num) { method Pop (line 38) | public int Pop() { method Peek (line 46) | public int Peek() { method ToArray (line 53) | public int[] ToArray() { class linkedlist_stack (line 67) | public class linkedlist_stack { method Test (line 68) | [Test] FILE: zh-hant/codes/csharp/chapter_stack_and_queue/queue.cs class queue (line 9) | public class queue { method Test (line 10) | [Test] FILE: zh-hant/codes/csharp/chapter_stack_and_queue/stack.cs class stack (line 9) | public class stack { method Test (line 10) | [Test] FILE: zh-hant/codes/csharp/chapter_tree/array_binary_tree.cs class ArrayBinaryTree (line 10) | public class ArrayBinaryTree(List arr) { method Size (line 14) | public int Size() { method Val (line 19) | public int? Val(int i) { method Left (line 27) | public int Left(int i) { method Right (line 32) | public int Right(int i) { method Parent (line 37) | public int Parent(int i) { method LevelOrder (line 42) | public List LevelOrder() { method DFS (line 53) | void DFS(int i, string order, List res) { method PreOrder (line 71) | public List PreOrder() { method InOrder (line 78) | public List InOrder() { method PostOrder (line 85) | public List PostOrder() { class array_binary_tree (line 92) | public class array_binary_tree { method Test (line 93) | [Test] FILE: zh-hant/codes/csharp/chapter_tree/avl_tree.cs class AVLTree (line 10) | class AVLTree { method Height (line 14) | int Height(TreeNode? node) { method UpdateHeight (line 20) | void UpdateHeight(TreeNode node) { method BalanceFactor (line 26) | public int BalanceFactor(TreeNode? node) { method RightRotate (line 34) | TreeNode? RightRotate(TreeNode? node) { method LeftRotate (line 48) | TreeNode? LeftRotate(TreeNode? node) { method Rotate (line 62) | TreeNode? Rotate(TreeNode? node) { method Insert (line 92) | public void Insert(int val) { method InsertHelper (line 97) | TreeNode? InsertHelper(TreeNode? node, int val) { method Remove (line 114) | public void Remove(int val) { method RemoveHelper (line 119) | TreeNode? RemoveHelper(TreeNode? node, int val) { method Search (line 153) | public TreeNode? Search(int val) { class avl_tree (line 172) | public class avl_tree { method TestInsert (line 173) | static void TestInsert(AVLTree tree, int val) { method TestRemove (line 179) | static void TestRemove(AVLTree tree, int val) { method Test (line 185) | [Test] FILE: zh-hant/codes/csharp/chapter_tree/binary_search_tree.cs class BinarySearchTree (line 9) | class BinarySearchTree { method BinarySearchTree (line 12) | public BinarySearchTree() { method GetRoot (line 18) | public TreeNode? GetRoot() { method Search (line 23) | public TreeNode? Search(int num) { method Insert (line 42) | public void Insert(int num) { method Remove (line 75) | public void Remove(int num) { class binary_search_tree (line 126) | public class binary_search_tree { method Test (line 127) | [Test] FILE: zh-hant/codes/csharp/chapter_tree/binary_tree.cs class binary_tree (line 9) | public class binary_tree { method Test (line 10) | [Test] FILE: zh-hant/codes/csharp/chapter_tree/binary_tree_bfs.cs class binary_tree_bfs (line 9) | public class binary_tree_bfs { method LevelOrder (line 12) | List LevelOrder(TreeNode root) { method Test (line 29) | [Test] FILE: zh-hant/codes/csharp/chapter_tree/binary_tree_dfs.cs class binary_tree_dfs (line 9) | public class binary_tree_dfs { method PreOrder (line 13) | void PreOrder(TreeNode? root) { method InOrder (line 22) | void InOrder(TreeNode? root) { method PostOrder (line 31) | void PostOrder(TreeNode? root) { method Test (line 39) | [Test] FILE: zh-hant/codes/csharp/utils/ListNode.cs class ListNode (line 8) | public class ListNode(int x) { method ArrToLinkedList (line 13) | public static ListNode? ArrToLinkedList(int[] arr) { method ToString (line 23) | public override string? ToString() { FILE: zh-hant/codes/csharp/utils/PrintUtil.cs class Trunk (line 9) | public class Trunk(Trunk? prev, string str) { class PrintUtil (line 14) | public static class PrintUtil { method PrintList (line 16) | public static void PrintList(IList list) { method PrintList (line 20) | public static string PrintList(this IEnumerable list) { method PrintMatrix (line 25) | public static void PrintMatrix(T[][] matrix) { method PrintMatrix (line 34) | public static void PrintMatrix(List> matrix) { method PrintLinkedList (line 43) | public static void PrintLinkedList(ListNode? head) { method PrintTree (line 57) | public static void PrintTree(TreeNode? root) { method PrintTree (line 62) | public static void PrintTree(TreeNode? root, Trunk? prev, bool isRight) { method ShowTrunks (line 93) | public static void ShowTrunks(Trunk? p) { method PrintHashMap (line 103) | public static void PrintHashMap(Dictionary map) where K : ... method PrintHeap (line 110) | public static void PrintHeap(Queue queue) { method PrintHeap (line 120) | public static void PrintHeap(PriorityQueue queue) { FILE: zh-hant/codes/csharp/utils/TreeNode.cs class TreeNode (line 10) | public class TreeNode(int? x) { method ListToTreeDFS (line 33) | static TreeNode? ListToTreeDFS(List arr, int i) { method ListToTree (line 45) | public static TreeNode? ListToTree(List arr) { method TreeToListDFS (line 50) | static void TreeToListDFS(TreeNode? root, int i, List res) { method TreeToList (line 62) | public static List TreeToList(TreeNode root) { FILE: zh-hant/codes/csharp/utils/Vertex.cs class Vertex (line 10) | public class Vertex(int val) { method ValsToVets (line 14) | public static Vertex[] ValsToVets(int[] vals) { method VetsToVals (line 23) | public static List VetsToVals(List vets) { FILE: zh-hant/codes/dart/build.dart function main (line 3) | void main() FILE: zh-hant/codes/dart/chapter_array_and_linkedlist/array.dart function randomAccess (line 12) | int randomAccess(List nums) function extend (line 21) | List extend(List nums, int enlarge) function insert (line 33) | void insert(List nums, int _num, int index) function remove (line 43) | void remove(List nums, int index) function traverse (line 51) | void traverse(List nums) function find (line 68) | int find(List nums, int target) function main (line 76) | void main() FILE: zh-hant/codes/dart/chapter_array_and_linkedlist/linked_list.dart function insert (line 11) | void insert(ListNode n0, ListNode P) function remove (line 18) | void remove(ListNode n0) function access (line 27) | ListNode? access(ListNode? head, int index) function find (line 36) | int find(ListNode? head, int target) function main (line 49) | void main() FILE: zh-hant/codes/dart/chapter_array_and_linkedlist/list.dart function main (line 10) | void main() FILE: zh-hant/codes/dart/chapter_array_and_linkedlist/my_list.dart class MyList (line 8) | class MyList { method size (line 20) | int size() method capacity (line 23) | int capacity() method get (line 26) | int get(int index) method set (line 32) | void set(int index, int _num) method add (line 38) | void add(int _num) method insert (line 47) | void insert(int index, int _num) method remove (line 61) | int remove(int index) method extendCapacity (line 75) | void extendCapacity() method toArray (line 87) | List toArray() function main (line 97) | void main() FILE: zh-hant/codes/dart/chapter_backtracking/n_queens.dart function backtrack (line 8) | void backtrack( function nQueens (line 50) | List>> nQueens(int n) function main (line 64) | void main() FILE: zh-hant/codes/dart/chapter_backtracking/permutations_i.dart function backtrack (line 8) | void backtrack( function permutationsI (line 37) | List> permutationsI(List nums) function main (line 44) | void main() FILE: zh-hant/codes/dart/chapter_backtracking/permutations_ii.dart function backtrack (line 8) | void backtrack( function permutationsII (line 39) | List> permutationsII(List nums) function main (line 46) | void main() FILE: zh-hant/codes/dart/chapter_backtracking/preorder_traversal_i_compact.dart function preOrder (line 11) | void preOrder(TreeNode? root, List res) function main (line 24) | void main() FILE: zh-hant/codes/dart/chapter_backtracking/preorder_traversal_ii_compact.dart function preOrder (line 11) | void preOrder( function main (line 33) | void main() FILE: zh-hant/codes/dart/chapter_backtracking/preorder_traversal_iii_compact.dart function preOrder (line 11) | void preOrder( function main (line 33) | void main() FILE: zh-hant/codes/dart/chapter_backtracking/preorder_traversal_iii_template.dart function isSolution (line 11) | bool isSolution(List state) function recordSolution (line 16) | void recordSolution(List state, List> res) function isValid (line 21) | bool isValid(List state, TreeNode? choice) function makeChoice (line 26) | void makeChoice(List state, TreeNode? choice) function undoChoice (line 31) | void undoChoice(List state, TreeNode? choice) function backtrack (line 36) | void backtrack( function main (line 61) | void main() FILE: zh-hant/codes/dart/chapter_backtracking/subset_sum_i.dart function backtrack (line 8) | void backtrack( function subsetSumI (line 38) | List> subsetSumI(List nums, int target) function main (line 48) | void main() FILE: zh-hant/codes/dart/chapter_backtracking/subset_sum_i_naive.dart function backtrack (line 8) | void backtrack( function subsetSumINaive (line 36) | List> subsetSumINaive(List nums, int target) function main (line 45) | void main() FILE: zh-hant/codes/dart/chapter_backtracking/subset_sum_ii.dart function backtrack (line 8) | void backtrack( function subsetSumII (line 43) | List> subsetSumII(List nums, int target) function main (line 53) | void main() FILE: zh-hant/codes/dart/chapter_computational_complexity/iteration.dart function forLoop (line 8) | int forLoop(int n) function whileLoop (line 18) | int whileLoop(int n) function whileLoopII (line 30) | int whileLoopII(int n) function nestedForLoop (line 44) | String nestedForLoop(int n) function main (line 57) | void main() FILE: zh-hant/codes/dart/chapter_computational_complexity/recursion.dart function recur (line 8) | int recur(int n) function forLoopRecur (line 18) | int forLoopRecur(int n) function tailRecur (line 37) | int tailRecur(int n, int res) function fib (line 45) | int fib(int n) function main (line 55) | void main() FILE: zh-hant/codes/dart/chapter_computational_complexity/space_complexity.dart function function (line 15) | int function() function constant (line 21) | void constant(int n) function linear (line 38) | void linear(int n) function linearRecur (line 54) | void linearRecur(int n) function quadratic (line 61) | void quadratic(int n) function quadraticRecur (line 76) | int quadraticRecur(int n) function buildTree (line 84) | TreeNode? buildTree(int n) function main (line 93) | void main() FILE: zh-hant/codes/dart/chapter_computational_complexity/time_complexity.dart function constant (line 10) | int constant(int n) function linear (line 20) | int linear(int n) function arrayTraversal (line 29) | int arrayTraversal(List nums) function quadratic (line 39) | int quadratic(int n) function bubbleSort (line 51) | int bubbleSort(List nums) function exponential (line 70) | int exponential(int n) function expRecur (line 84) | int expRecur(int n) function logarithmic (line 90) | int logarithmic(int n) function logRecur (line 100) | int logRecur(int n) function linearLogRecur (line 106) | int linearLogRecur(int n) function factorialRecur (line 116) | int factorialRecur(int n) function main (line 127) | void main() FILE: zh-hant/codes/dart/chapter_computational_complexity/worst_best_time_complexity.dart function randomNumbers (line 8) | List randomNumbers(int n) function findOne (line 21) | int findOne(List nums) function main (line 32) | void main() FILE: zh-hant/codes/dart/chapter_divide_and_conquer/binary_search_recur.dart function dfs (line 8) | int dfs(List nums, int target, int i, int j) function binarySearch (line 28) | int binarySearch(List nums, int target) function main (line 35) | void main() FILE: zh-hant/codes/dart/chapter_divide_and_conquer/build_tree.dart function dfs (line 11) | TreeNode? dfs( function buildTree (line 35) | TreeNode? buildTree(List preorder, List inorder) function main (line 46) | void main() FILE: zh-hant/codes/dart/chapter_divide_and_conquer/hanota.dart function move (line 8) | void move(List src, List tar) function dfs (line 16) | void dfs(int i, List src, List buf, List tar) function solveHanota (line 31) | void solveHanota(List A, List B, List C) function main (line 38) | void main() FILE: zh-hant/codes/dart/chapter_dynamic_programming/climbing_stairs_backtrack.dart function backtrack (line 8) | void backtrack(List choices, int state, int n, List res) function climbingStairsBacktrack (line 24) | int climbingStairsBacktrack(int n) function main (line 34) | void main() FILE: zh-hant/codes/dart/chapter_dynamic_programming/climbing_stairs_constraint_dp.dart function climbingStairsConstraintDP (line 8) | int climbingStairsConstraintDP(int n) function main (line 28) | void main() FILE: zh-hant/codes/dart/chapter_dynamic_programming/climbing_stairs_dfs.dart function dfs (line 8) | int dfs(int i) function climbingStairsDFS (line 17) | int climbingStairsDFS(int n) function main (line 22) | void main() FILE: zh-hant/codes/dart/chapter_dynamic_programming/climbing_stairs_dfs_mem.dart function dfs (line 8) | int dfs(int i, List mem) function climbingStairsDFSMem (line 21) | int climbingStairsDFSMem(int n) function main (line 28) | void main() FILE: zh-hant/codes/dart/chapter_dynamic_programming/climbing_stairs_dp.dart function climbingStairsDP (line 8) | int climbingStairsDP(int n) function climbingStairsDPComp (line 23) | int climbingStairsDPComp(int n) function main (line 35) | void main() FILE: zh-hant/codes/dart/chapter_dynamic_programming/coin_change.dart function coinChangeDP (line 10) | int coinChangeDP(List coins, int amt) function coinChangeDPComp (line 35) | int coinChangeDPComp(List coins, int amt) function main (line 57) | void main() FILE: zh-hant/codes/dart/chapter_dynamic_programming/coin_change_ii.dart function coinChangeIIDP (line 8) | int coinChangeIIDP(List coins, int amt) function coinChangeIIDPComp (line 32) | int coinChangeIIDPComp(List coins, int amt) function main (line 53) | void main() FILE: zh-hant/codes/dart/chapter_dynamic_programming/edit_distance.dart function editDistanceDFS (line 10) | int editDistanceDFS(String s, String t, int i, int j) function editDistanceDFSMem (line 28) | int editDistanceDFSMem(String s, String t, List> mem, int i, i... function editDistanceDP (line 49) | int editDistanceDP(String s, String t) function editDistanceDPComp (line 75) | int editDistanceDPComp(String s, String t) function main (line 104) | void main() FILE: zh-hant/codes/dart/chapter_dynamic_programming/knapsack.dart function knapsackDFS (line 10) | int knapsackDFS(List wgt, List val, int i, int c) function knapsackDFSMem (line 27) | int knapsackDFSMem( function knapsackDP (line 55) | int knapsackDP(List wgt, List val, int cap) function knapsackDPComp (line 75) | int knapsackDPComp(List wgt, List val, int cap) function main (line 93) | void main() FILE: zh-hant/codes/dart/chapter_dynamic_programming/min_cost_climbing_stairs_dp.dart function minCostClimbingStairsDP (line 10) | int minCostClimbingStairsDP(List cost) function minCostClimbingStairsDPComp (line 26) | int minCostClimbingStairsDPComp(List cost) function main (line 39) | void main() FILE: zh-hant/codes/dart/chapter_dynamic_programming/min_path_sum.dart function minPathSumDFS (line 10) | int minPathSumDFS(List> grid, int i, int j) function minPathSumDFSMem (line 28) | int minPathSumDFSMem(List> grid, List> mem, int i, i... function minPathSumDP (line 51) | int minPathSumDP(List> grid) function minPathSumDPComp (line 74) | int minPathSumDPComp(List> grid) function main (line 95) | void main() FILE: zh-hant/codes/dart/chapter_dynamic_programming/unbounded_knapsack.dart function unboundedKnapsackDP (line 10) | int unboundedKnapsackDP(List wgt, List val, int cap) function unboundedKnapsackDPComp (line 30) | int unboundedKnapsackDPComp(List wgt, List val, int cap) function main (line 50) | void main() FILE: zh-hant/codes/dart/chapter_graph/graph_adjacency_list.dart class GraphAdjList (line 10) | class GraphAdjList { method size (line 24) | int size() method addEdge (line 29) | void addEdge(Vertex vet1, Vertex vet2) method removeEdge (line 41) | void removeEdge(Vertex vet1, Vertex vet2) method addVertex (line 53) | void addVertex(Vertex vet) method removeVertex (line 60) | void removeVertex(Vertex vet) method printAdjList (line 73) | void printAdjList() function main (line 86) | void main() FILE: zh-hant/codes/dart/chapter_graph/graph_adjacency_matrix.dart class GraphAdjMat (line 10) | class GraphAdjMat { method size (line 30) | int size() method addVertex (line 35) | void addVertex(int val) method removeVertex (line 49) | void removeVertex(int index) method addEdge (line 65) | void addEdge(int i, int j) method removeEdge (line 77) | void removeEdge(int i, int j) method printAdjMat (line 87) | void printAdjMat() function main (line 95) | void main() FILE: zh-hant/codes/dart/chapter_graph/graph_bfs.dart function graphBFS (line 13) | List graphBFS(GraphAdjList graph, Vertex startVet) function main (line 41) | void main() FILE: zh-hant/codes/dart/chapter_graph/graph_dfs.dart function dfs (line 11) | void dfs( function graphDFS (line 30) | List graphDFS(GraphAdjList graph, Vertex startVet) function main (line 40) | void main() FILE: zh-hant/codes/dart/chapter_greedy/coin_change_greedy.dart function coinChangeGreedy (line 8) | int coinChangeGreedy(List coins, int amt) function main (line 27) | void main() FILE: zh-hant/codes/dart/chapter_greedy/fractional_knapsack.dart class Item (line 8) | class Item { function fractionalKnapsack (line 16) | double fractionalKnapsack(List wgt, List val, int cap) function main (line 39) | void main() FILE: zh-hant/codes/dart/chapter_greedy/max_capacity.dart function maxCapacity (line 10) | int maxCapacity(List ht) function main (line 31) | void main() FILE: zh-hant/codes/dart/chapter_greedy/max_product_cutting.dart function maxProductCutting (line 10) | int maxProductCutting(int n) function main (line 31) | void main() FILE: zh-hant/codes/dart/chapter_hashing/array_hash_map.dart class Pair (line 8) | class Pair { class ArrayHashMap (line 15) | class ArrayHashMap { method _hashFunc (line 24) | int _hashFunc(int key) method get (line 30) | String? get(int key) method put (line 40) | void put(int key, String val) method remove (line 47) | void remove(int key) method pairSet (line 53) | List pairSet() method keySet (line 64) | List keySet() method values (line 75) | List values() method printHashMap (line 86) | void printHashMap() function main (line 94) | void main() FILE: zh-hant/codes/dart/chapter_hashing/built_in_hash.dart function main (line 10) | void main() FILE: zh-hant/codes/dart/chapter_hashing/hash_map.dart function main (line 8) | void main() FILE: zh-hant/codes/dart/chapter_hashing/hash_map_chaining.dart class HashMapChaining (line 10) | class HashMapChaining { method hashFunc (line 27) | int hashFunc(int key) method loadFactor (line 32) | double loadFactor() method get (line 37) | String? get(int key) method put (line 51) | void put(int key, String val) method remove (line 72) | void remove(int key) method extend (line 86) | void extend() method printHashMap (line 102) | void printHashMap() function main (line 114) | void main() FILE: zh-hant/codes/dart/chapter_hashing/hash_map_open_addressing.dart class HashMapOpenAddressing (line 10) | class HashMapOpenAddressing { method hashFunc (line 25) | int hashFunc(int key) method loadFactor (line 30) | double loadFactor() method findBucket (line 35) | int findBucket(int key) method get (line 62) | String? get(int key) method put (line 74) | void put(int key, String val) method remove (line 92) | void remove(int key) method extend (line 103) | void extend() method printHashMap (line 119) | void printHashMap() function main (line 133) | void main() FILE: zh-hant/codes/dart/chapter_hashing/simple_hash.dart function addHash (line 8) | int addHash(String key) function mulHash (line 18) | int mulHash(String key) function xorHash (line 28) | int xorHash(String key) function rotHash (line 38) | int rotHash(String key) function main (line 48) | void main() FILE: zh-hant/codes/dart/chapter_heap/my_heap.dart class MaxHeap (line 10) | class MaxHeap { method _left (line 24) | int _left(int i) method _right (line 29) | int _right(int i) method _parent (line 34) | int _parent(int i) method _swap (line 39) | void _swap(int i, int j) method size (line 46) | int size() method isEmpty (line 51) | bool isEmpty() method peek (line 56) | int peek() method push (line 61) | void push(int val) method siftUp (line 69) | void siftUp(int i) method pop (line 85) | int pop() method siftDown (line 99) | void siftDown(int i) method print (line 117) | void print() function main (line 123) | void main() FILE: zh-hant/codes/dart/chapter_heap/top_k.dart function topKHeap (line 10) | MinHeap topKHeap(List nums, int k) function main (line 25) | void main() class MinHeap (line 35) | class MinHeap { method getHeap (line 49) | List getHeap() method _left (line 54) | int _left(int i) method _right (line 59) | int _right(int i) method _parent (line 64) | int _parent(int i) method _swap (line 69) | void _swap(int i, int j) method size (line 76) | int size() method isEmpty (line 81) | bool isEmpty() method peek (line 86) | int peek() method push (line 91) | void push(int val) method siftUp (line 99) | void siftUp(int i) method pop (line 115) | int pop() method siftDown (line 129) | void siftDown(int i) method print (line 147) | void print() FILE: zh-hant/codes/dart/chapter_searching/binary_search.dart function binarySearch (line 8) | int binarySearch(List nums, int target) function binarySearchLCRO (line 30) | int binarySearchLCRO(List nums, int target) function main (line 52) | void main() FILE: zh-hant/codes/dart/chapter_searching/binary_search_edge.dart function binarySearchLeftEdge (line 10) | int binarySearchLeftEdge(List nums, int target) function binarySearchRightEdge (line 22) | int binarySearchRightEdge(List nums, int target) function main (line 36) | void main() FILE: zh-hant/codes/dart/chapter_searching/binary_search_insertion.dart function binarySearchInsertionSimple (line 8) | int binarySearchInsertionSimple(List nums, int target) function binarySearchInsertion (line 25) | int binarySearchInsertion(List nums, int target) function main (line 42) | void main() FILE: zh-hant/codes/dart/chapter_searching/hashing_search.dart function hashingSearchArray (line 11) | int hashingSearchArray(Map map, int target) function hashingSearchLinkedList (line 21) | ListNode? hashingSearchLinkedList(Map map, int target) function main (line 31) | void main() FILE: zh-hant/codes/dart/chapter_searching/linear_search.dart function linearSearchArray (line 10) | int linearSearchArray(List nums, int target) function linearSearchList (line 23) | ListNode? linearSearchList(ListNode? head, int target) function main (line 35) | void main() FILE: zh-hant/codes/dart/chapter_searching/two_sum.dart function twoSumBruteForce (line 10) | List twoSumBruteForce(List nums, int target) function twoSumHashTable (line 22) | List twoSumHashTable(List nums, int target) function main (line 37) | void main() FILE: zh-hant/codes/dart/chapter_sorting/bubble_sort.dart function bubbleSort (line 8) | void bubbleSort(List nums) function bubbleSortWithFlag (line 24) | void bubbleSortWithFlag(List nums) function main (line 43) | void main() FILE: zh-hant/codes/dart/chapter_sorting/bucket_sort.dart function bucketSort (line 8) | void bucketSort(List nums) function main (line 34) | void main() FILE: zh-hant/codes/dart/chapter_sorting/counting_sort.dart function countingSortNaive (line 10) | void countingSortNaive(List nums) function countingSort (line 33) | void countingSort(List nums) function main (line 64) | void main() FILE: zh-hant/codes/dart/chapter_sorting/heap_sort.dart function siftDown (line 8) | void siftDown(List nums, int n, int i) function heapSort (line 28) | void heapSort(List nums) function main (line 45) | void main() FILE: zh-hant/codes/dart/chapter_sorting/insertion_sort.dart function insertionSort (line 8) | void insertionSort(List nums) function main (line 22) | void main() FILE: zh-hant/codes/dart/chapter_sorting/merge_sort.dart function merge (line 8) | void merge(List nums, int left, int mid, int right) function mergeSort (line 35) | void mergeSort(List nums, int left, int right) function main (line 47) | void main() FILE: zh-hant/codes/dart/chapter_sorting/quick_sort.dart class QuickSort (line 8) | class QuickSort { method _swap (line 10) | void _swap(List nums, int i, int j) method _partition (line 17) | int _partition(List nums, int left, int right) method quickSort (line 30) | void quickSort(List nums, int left, int right) class QuickSortMedian (line 42) | class QuickSortMedian { method _swap (line 44) | void _swap(List nums, int i, int j) method _medianThree (line 51) | int _medianThree(List nums, int left, int mid, int right) method _partition (line 61) | int _partition(List nums, int left, int right) method quickSort (line 78) | void quickSort(List nums, int left, int right) class QuickSortTailCall (line 90) | class QuickSortTailCall { method _swap (line 92) | void _swap(List nums, int i, int j) method _partition (line 99) | int _partition(List nums, int left, int right) method quickSort (line 112) | void quickSort(List nums, int left, int right) function main (line 130) | void main() FILE: zh-hant/codes/dart/chapter_sorting/radix_sort.dart function digit (line 8) | int digit(int _num, int exp) function countingSortDigit (line 14) | void countingSortDigit(List nums, int exp) function radixSort (line 40) | void radixSort(List nums) function main (line 55) | void main() FILE: zh-hant/codes/dart/chapter_sorting/selection_sort.dart function selectionSort (line 8) | void selectionSort(List nums) function main (line 25) | void main() FILE: zh-hant/codes/dart/chapter_stack_and_queue/array_deque.dart class ArrayDeque (line 8) | class ArrayDeque { method capacity (line 20) | int capacity() method size (line 25) | int size() method isEmpty (line 30) | bool isEmpty() method index (line 35) | int index(int i) method pushFirst (line 43) | void pushFirst(int _num) method pushLast (line 56) | void pushLast(int _num) method popFirst (line 68) | int popFirst() method popLast (line 77) | int popLast() method peekFirst (line 84) | int peekFirst() method peekLast (line 92) | int peekLast() method toArray (line 102) | List toArray() function main (line 113) | void main() FILE: zh-hant/codes/dart/chapter_stack_and_queue/array_queue.dart class ArrayQueue (line 8) | class ArrayQueue { method capaCity (line 19) | int capaCity() method size (line 24) | int size() method isEmpty (line 29) | bool isEmpty() method push (line 34) | void push(int _num) method pop (line 47) | int pop() method peek (line 56) | int peek() method toArray (line 64) | List toArray() function main (line 75) | void main() FILE: zh-hant/codes/dart/chapter_stack_and_queue/array_stack.dart class ArrayStack (line 8) | class ArrayStack { method size (line 15) | int size() method isEmpty (line 20) | bool isEmpty() method push (line 25) | void push(int _num) method pop (line 30) | int pop() method peek (line 38) | int peek() method toArray (line 46) | List toArray() function main (line 50) | void main() FILE: zh-hant/codes/dart/chapter_stack_and_queue/deque.dart function main (line 9) | void main() FILE: zh-hant/codes/dart/chapter_stack_and_queue/linkedlist_deque.dart class ListNode (line 8) | class ListNode { class LinkedListDeque (line 17) | class LinkedListDeque { method size (line 28) | int size() method isEmpty (line 33) | bool isEmpty() method push (line 38) | void push(int _num, bool isFront) method pushFirst (line 60) | void pushFirst(int _num) method pushLast (line 65) | void pushLast(int _num) method pop (line 70) | int? pop(bool isFront) method popFirst (line 102) | int? popFirst() method popLast (line 107) | int? popLast() method peekFirst (line 112) | int? peekFirst() method peekLast (line 117) | int? peekLast() method toArray (line 122) | List toArray() function main (line 134) | void main() FILE: zh-hant/codes/dart/chapter_stack_and_queue/linkedlist_queue.dart class LinkedListQueue (line 10) | class LinkedListQueue { method size (line 21) | int size() method isEmpty (line 26) | bool isEmpty() method push (line 31) | void push(int _num) method pop (line 47) | int pop() method peek (line 56) | int peek() method toArray (line 64) | List toArray() function main (line 76) | void main() FILE: zh-hant/codes/dart/chapter_stack_and_queue/linkedlist_stack.dart class LinkedListStack (line 10) | class LinkedListStack { method size (line 19) | int size() method isEmpty (line 24) | bool isEmpty() method push (line 29) | void push(int _num) method pop (line 37) | int pop() method peek (line 45) | int peek() method toList (line 53) | List toList() function main (line 66) | void main() FILE: zh-hant/codes/dart/chapter_stack_and_queue/queue.dart function main (line 9) | void main() FILE: zh-hant/codes/dart/chapter_stack_and_queue/stack.dart function main (line 7) | void main() FILE: zh-hant/codes/dart/chapter_tree/array_binary_tree.dart class ArrayBinaryTree (line 11) | class ArrayBinaryTree { method size (line 18) | int size() method val (line 23) | int? val(int i) method left (line 32) | int? left(int i) method right (line 37) | int? right(int i) method parent (line 42) | int? parent(int i) method levelOrder (line 47) | List levelOrder() method dfs (line 58) | void dfs(int i, String order, List res) method preOrder (line 80) | List preOrder() method inOrder (line 87) | List inOrder() method postOrder (line 94) | List postOrder() function main (line 102) | void main() FILE: zh-hant/codes/dart/chapter_tree/avl_tree.dart class AVLTree (line 11) | class AVLTree { method height (line 20) | int height(TreeNode? node) method updateHeight (line 26) | void updateHeight(TreeNode? node) method balanceFactor (line 32) | int balanceFactor(TreeNode? node) method rightRotate (line 40) | TreeNode? rightRotate(TreeNode? node) method leftRotate (line 54) | TreeNode? leftRotate(TreeNode? node) method rotate (line 68) | TreeNode? rotate(TreeNode? node) method insert (line 98) | void insert(int val) method insertHelper (line 103) | TreeNode? insertHelper(TreeNode? node, int val) method remove (line 120) | void remove(int val) method removeHelper (line 125) | TreeNode? removeHelper(TreeNode? node, int val) method search (line 159) | TreeNode? search(int val) function testInsert (line 177) | void testInsert(AVLTree tree, int val) function testRemove (line 183) | void testRemove(AVLTree tree, int val) function main (line 190) | void main() FILE: zh-hant/codes/dart/chapter_tree/binary_search_tree.dart class BinarySearchTree (line 11) | class BinarySearchTree { method getRoot (line 21) | TreeNode? getRoot() method search (line 26) | TreeNode? search(int _num) method insert (line 45) | void insert(int _num) method remove (line 74) | void remove(int _num) function main (line 123) | void main() FILE: zh-hant/codes/dart/chapter_tree/binary_tree.dart function main (line 10) | void main() FILE: zh-hant/codes/dart/chapter_tree/binary_tree_bfs.dart function levelOrder (line 12) | List levelOrder(TreeNode? root) function main (line 28) | void main() FILE: zh-hant/codes/dart/chapter_tree/binary_tree_dfs.dart function preOrder (line 14) | void preOrder(TreeNode? node) function inOrder (line 23) | void inOrder(TreeNode? node) function postOrder (line 32) | void postOrder(TreeNode? node) function main (line 41) | void main() FILE: zh-hant/codes/dart/utils/list_node.dart class ListNode (line 8) | class ListNode { function listToLinkedList (line 16) | ListNode? listToLinkedList(List list) FILE: zh-hant/codes/dart/utils/print_util.dart class Trunk (line 12) | class Trunk { function printMatrix (line 20) | void printMatrix(List> matrix) function printLinkedList (line 29) | void printLinkedList(ListNode? head) function printTree (line 45) | void printTree(TreeNode? root, [Trunk? prev = null, bool isRight = false]) function showTrunks (line 75) | void showTrunks(Trunk? p) function printHeap (line 85) | void printHeap(List heap) FILE: zh-hant/codes/dart/utils/tree_node.dart class TreeNode (line 8) | class TreeNode { function listToTreeDFS (line 19) | TreeNode? listToTreeDFS(List arr, int i) function listToTree (line 30) | TreeNode? listToTree(List arr) function treeToListDFS (line 35) | void treeToListDFS(TreeNode? root, int i, List res) function treeToList (line 46) | List treeToList(TreeNode? root) FILE: zh-hant/codes/dart/utils/vertex.dart class Vertex (line 8) | class Vertex { method valsToVets (line 13) | List valsToVets(List vals) method vetsToVals (line 22) | List vetsToVals(List vets) FILE: zh-hant/codes/go/chapter_array_and_linkedlist/array.go function randomAccess (line 12) | func randomAccess(nums []int) (randomNum int) { function extend (line 21) | func extend(nums []int, enlarge int) []int { function insert (line 33) | func insert(nums []int, num int, index int) { function remove (line 43) | func remove(nums []int, index int) { function traverse (line 51) | func traverse(nums []int) { function find (line 70) | func find(nums []int, target int) (index int) { FILE: zh-hant/codes/go/chapter_array_and_linkedlist/array_test.go function TestArray (line 18) | func TestArray(t *testing.T) { FILE: zh-hant/codes/go/chapter_array_and_linkedlist/linked_list.go function insertNode (line 12) | func insertNode(n0 *ListNode, P *ListNode) { function removeItem (line 19) | func removeItem(n0 *ListNode) { function access (line 30) | func access(head *ListNode, index int) *ListNode { function findNode (line 41) | func findNode(head *ListNode, target int) int { FILE: zh-hant/codes/go/chapter_array_and_linkedlist/linked_list_test.go function TestLinkedList (line 14) | func TestLinkedList(t *testing.T) { FILE: zh-hant/codes/go/chapter_array_and_linkedlist/list_test.go function TestList (line 14) | func TestList(t *testing.T) { FILE: zh-hant/codes/go/chapter_array_and_linkedlist/my_list.go type myList (line 8) | type myList struct method size (line 26) | func (l *myList) size() int { method capacity (line 31) | func (l *myList) capacity() int { method get (line 36) | func (l *myList) get(index int) int { method set (line 45) | func (l *myList) set(num, index int) { method add (line 53) | func (l *myList) add(num int) { method insert (line 64) | func (l *myList) insert(num, index int) { method remove (line 82) | func (l *myList) remove(index int) int { method extendCapacity (line 98) | func (l *myList) extendCapacity() { method toArray (line 106) | func (l *myList) toArray() []int { function newMyList (line 16) | func newMyList() *myList { FILE: zh-hant/codes/go/chapter_array_and_linkedlist/my_list_test.go function TestMyList (line 13) | func TestMyList(t *testing.T) { FILE: zh-hant/codes/go/chapter_backtracking/n_queens.go function backtrack (line 8) | func backtrack(row, n int, state *[][]string, res *[][][]string, cols, d... function nQueens (line 40) | func nQueens(n int) [][][]string { FILE: zh-hant/codes/go/chapter_backtracking/n_queens_test.go function TestNQueens (line 12) | func TestNQueens(t *testing.T) { FILE: zh-hant/codes/go/chapter_backtracking/permutation_test.go function TestPermutationI (line 14) | func TestPermutationI(t *testing.T) { function TestPermutationII (line 25) | func TestPermutationII(t *testing.T) { FILE: zh-hant/codes/go/chapter_backtracking/permutations_i.go function backtrackI (line 8) | func backtrackI(state *[]int, choices *[]int, selected *[]bool, res *[][... function permutationsI (line 32) | func permutationsI(nums []int) [][]int { FILE: zh-hant/codes/go/chapter_backtracking/permutations_ii.go function backtrackII (line 8) | func backtrackII(state *[]int, choices *[]int, selected *[]bool, res *[]... function permutationsII (line 35) | func permutationsII(nums []int) [][]int { FILE: zh-hant/codes/go/chapter_backtracking/preorder_traversal_i_compact.go function preOrderI (line 12) | func preOrderI(root *TreeNode, res *[]*TreeNode) { FILE: zh-hant/codes/go/chapter_backtracking/preorder_traversal_ii_compact.go function preOrderII (line 12) | func preOrderII(root *TreeNode, res *[][]*TreeNode, path *[]*TreeNode) { FILE: zh-hant/codes/go/chapter_backtracking/preorder_traversal_iii_compact.go function preOrderIII (line 12) | func preOrderIII(root *TreeNode, res *[][]*TreeNode, path *[]*TreeNode) { FILE: zh-hant/codes/go/chapter_backtracking/preorder_traversal_iii_template.go function isSolution (line 12) | func isSolution(state *[]*TreeNode) bool { function recordSolution (line 17) | func recordSolution(state *[]*TreeNode, res *[][]*TreeNode) { function isValid (line 22) | func isValid(state *[]*TreeNode, choice *TreeNode) bool { function makeChoice (line 27) | func makeChoice(state *[]*TreeNode, choice *TreeNode) { function undoChoice (line 32) | func undoChoice(state *[]*TreeNode, choice *TreeNode) { function backtrackIII (line 37) | func backtrackIII(state *[]*TreeNode, choices *[]*TreeNode, res *[][]*Tr... FILE: zh-hant/codes/go/chapter_backtracking/preorder_traversal_test.go function TestPreorderTraversalICompact (line 14) | func TestPreorderTraversalICompact(t *testing.T) { function TestPreorderTraversalIICompact (line 31) | func TestPreorderTraversalIICompact(t *testing.T) { function TestPreorderTraversalIIICompact (line 51) | func TestPreorderTraversalIIICompact(t *testing.T) { function TestPreorderTraversalIIITemplate (line 71) | func TestPreorderTraversalIIITemplate(t *testing.T) { FILE: zh-hant/codes/go/chapter_backtracking/subset_sum_i.go function backtrackSubsetSumI (line 10) | func backtrackSubsetSumI(start, target int, state, choices *[]int, res *... function subsetSumI (line 35) | func subsetSumI(nums []int, target int) [][]int { FILE: zh-hant/codes/go/chapter_backtracking/subset_sum_i_naive.go function backtrackSubsetSumINaive (line 8) | func backtrackSubsetSumINaive(total, target int, state, choices *[]int, ... function subsetSumINaive (line 31) | func subsetSumINaive(nums []int, target int) [][]int { FILE: zh-hant/codes/go/chapter_backtracking/subset_sum_ii.go function backtrackSubsetSumII (line 10) | func backtrackSubsetSumII(start, target int, state, choices *[]int, res ... function subsetSumII (line 40) | func subsetSumII(nums []int, target int) [][]int { FILE: zh-hant/codes/go/chapter_backtracking/subset_sum_test.go function TestSubsetSumINaive (line 15) | func TestSubsetSumINaive(t *testing.T) { function TestSubsetSumI (line 30) | func TestSubsetSumI(t *testing.T) { function TestSubsetSumII (line 44) | func TestSubsetSumII(t *testing.T) { FILE: zh-hant/codes/go/chapter_computational_complexity/iteration.go function forLoop (line 10) | func forLoop(n int) int { function whileLoop (line 20) | func whileLoop(n int) int { function whileLoopII (line 34) | func whileLoopII(n int) int { function nestedForLoop (line 49) | func nestedForLoop(n int) string { FILE: zh-hant/codes/go/chapter_computational_complexity/iteration_test.go function TestIteration (line 13) | func TestIteration(t *testing.T) { FILE: zh-hant/codes/go/chapter_computational_complexity/recursion.go function recur (line 10) | func recur(n int) int { function forLoopRecur (line 22) | func forLoopRecur(n int) int { function tailRecur (line 42) | func tailRecur(n int, res int) int { function fib (line 52) | func fib(n int) int { FILE: zh-hant/codes/go/chapter_computational_complexity/recursion_test.go function TestRecursion (line 13) | func TestRecursion(t *testing.T) { FILE: zh-hant/codes/go/chapter_computational_complexity/space_complexity.go type node (line 15) | type node struct function newNode (line 21) | func newNode(val int) *node { function function (line 26) | func function() int { function spaceConstant (line 32) | func spaceConstant(n int) { function spaceLinear (line 54) | func spaceLinear(n int) { function spaceLinearRecur (line 70) | func spaceLinearRecur(n int) { function spaceQuadratic (line 79) | func spaceQuadratic(n int) { function spaceQuadraticRecur (line 88) | func spaceQuadraticRecur(n int) int { function buildTree (line 98) | func buildTree(n int) *TreeNode { FILE: zh-hant/codes/go/chapter_computational_complexity/space_complexity_test.go function TestSpaceComplexity (line 13) | func TestSpaceComplexity(t *testing.T) { FILE: zh-hant/codes/go/chapter_computational_complexity/time_complexity.go function constant (line 8) | func constant(n int) int { function linear (line 18) | func linear(n int) int { function arrayTraversal (line 27) | func arrayTraversal(nums []int) int { function quadratic (line 37) | func quadratic(n int) int { function bubbleSort (line 49) | func bubbleSort(nums []int) int { function exponential (line 68) | func exponential(n int) int { function expRecur (line 82) | func expRecur(n int) int { function logarithmic (line 90) | func logarithmic(n int) int { function logRecur (line 100) | func logRecur(n int) int { function linearLogRecur (line 108) | func linearLogRecur(n int) int { function factorialRecur (line 120) | func factorialRecur(n int) int { FILE: zh-hant/codes/go/chapter_computational_complexity/time_complexity_test.go function TestTimeComplexity (line 12) | func TestTimeComplexity(t *testing.T) { FILE: zh-hant/codes/go/chapter_computational_complexity/worst_best_time_complexity.go function randomNumbers (line 12) | func randomNumbers(n int) []int { function findOne (line 26) | func findOne(nums []int) int { FILE: zh-hant/codes/go/chapter_computational_complexity/worst_best_time_complexity_test.go function TestWorstBestTimeComplexity (line 12) | func TestWorstBestTimeComplexity(t *testing.T) { FILE: zh-hant/codes/go/chapter_divide_and_conquer/binary_search_recur.go function dfs (line 8) | func dfs(nums []int, target, i, j int) int { function binarySearch (line 31) | func binarySearch(nums []int, target int) int { FILE: zh-hant/codes/go/chapter_divide_and_conquer/binary_search_recur_test.go function TestBinarySearch (line 12) | func TestBinarySearch(t *testing.T) { FILE: zh-hant/codes/go/chapter_divide_and_conquer/build_tree.go function dfsBuildTree (line 10) | func dfsBuildTree(preorder []int, inorderMap map[int]int, i, l, r int) *... function buildTree (line 28) | func buildTree(preorder, inorder []int) *TreeNode { FILE: zh-hant/codes/go/chapter_divide_and_conquer/build_tree_test.go function TestBuildTree (line 14) | func TestBuildTree(t *testing.T) { FILE: zh-hant/codes/go/chapter_divide_and_conquer/hanota.go function move (line 10) | func move(src, tar *list.List) { function dfsHanota (line 20) | func dfsHanota(i int, src, buf, tar *list.List) { function solveHanota (line 35) | func solveHanota(A, B, C *list.List) { FILE: zh-hant/codes/go/chapter_divide_and_conquer/hanota_test.go function TestHanota (line 15) | func TestHanota(t *testing.T) { FILE: zh-hant/codes/go/chapter_dynamic_programming/climbing_stairs_backtrack.go function backtrack (line 8) | func backtrack(choices []int, state, n int, res []int) { function climbingStairsBacktrack (line 26) | func climbingStairsBacktrack(n int) int { FILE: zh-hant/codes/go/chapter_dynamic_programming/climbing_stairs_constraint_dp.go function climbingStairsConstraintDP (line 8) | func climbingStairsConstraintDP(n int) int { FILE: zh-hant/codes/go/chapter_dynamic_programming/climbing_stairs_dfs.go function dfs (line 8) | func dfs(i int) int { function climbingStairsDFS (line 19) | func climbingStairsDFS(n int) int { FILE: zh-hant/codes/go/chapter_dynamic_programming/climbing_stairs_dfs_mem.go function dfsMem (line 8) | func dfsMem(i int, mem []int) int { function climbingStairsDFSMem (line 25) | func climbingStairsDFSMem(n int) int { FILE: zh-hant/codes/go/chapter_dynamic_programming/climbing_stairs_dp.go function climbingStairsDP (line 8) | func climbingStairsDP(n int) int { function climbingStairsDPComp (line 25) | func climbingStairsDPComp(n int) int { FILE: zh-hant/codes/go/chapter_dynamic_programming/climbing_stairs_test.go function TestClimbingStairsBacktrack (line 12) | func TestClimbingStairsBacktrack(t *testing.T) { function TestClimbingStairsDFS (line 18) | func TestClimbingStairsDFS(t *testing.T) { function TestClimbingStairsDFSMem (line 24) | func TestClimbingStairsDFSMem(t *testing.T) { function TestClimbingStairsDP (line 30) | func TestClimbingStairsDP(t *testing.T) { function TestClimbingStairsDPComp (line 36) | func TestClimbingStairsDPComp(t *testing.T) { function TestClimbingStairsConstraintDP (line 42) | func TestClimbingStairsConstraintDP(t *testing.T) { function TestMinCostClimbingStairsDPComp (line 48) | func TestMinCostClimbingStairsDPComp(t *testing.T) { FILE: zh-hant/codes/go/chapter_dynamic_programming/coin_change.go function coinChangeDP (line 10) | func coinChangeDP(coins []int, amt int) int { function coinChangeDPComp (line 41) | func coinChangeDPComp(coins []int, amt int) int { FILE: zh-hant/codes/go/chapter_dynamic_programming/coin_change_ii.go function coinChangeIIDP (line 8) | func coinChangeIIDP(coins []int, amt int) int { function coinChangeIIDPComp (line 35) | func coinChangeIIDPComp(coins []int, amt int) int { FILE: zh-hant/codes/go/chapter_dynamic_programming/coin_change_test.go function TestCoinChange (line 12) | func TestCoinChange(t *testing.T) { FILE: zh-hant/codes/go/chapter_dynamic_programming/edit_distance.go function editDistanceDFS (line 8) | func editDistanceDFS(s string, t string, i int, j int) int { function editDistanceDFSMem (line 34) | func editDistanceDFSMem(s string, t string, mem [][]int, i int, j int) i... function editDistanceDP (line 65) | func editDistanceDP(s string, t string) int { function editDistanceDPComp (line 95) | func editDistanceDPComp(s string, t string) int { function MinInt (line 124) | func MinInt(a, b int) int { FILE: zh-hant/codes/go/chapter_dynamic_programming/edit_distance_test.go function TestEditDistanceDFS (line 12) | func TestEditDistanceDFS(test *testing.T) { FILE: zh-hant/codes/go/chapter_dynamic_programming/knapsack.go function knapsackDFS (line 10) | func knapsackDFS(wgt, val []int, i, c int) int { function knapsackDFSMem (line 27) | func knapsackDFSMem(wgt, val []int, mem [][]int, i, c int) int { function knapsackDP (line 49) | func knapsackDP(wgt, val []int, cap int) int { function knapsackDPComp (line 72) | func knapsackDPComp(wgt, val []int, cap int) int { FILE: zh-hant/codes/go/chapter_dynamic_programming/knapsack_test.go function TestKnapsack (line 12) | func TestKnapsack(t *testing.T) { function TestUnboundedKnapsack (line 42) | func TestUnboundedKnapsack(t *testing.T) { FILE: zh-hant/codes/go/chapter_dynamic_programming/min_cost_climbing_stairs_dp.go function minCostClimbingStairsDP (line 8) | func minCostClimbingStairsDP(cost []int) int { function minCostClimbingStairsDPComp (line 32) | func minCostClimbingStairsDPComp(cost []int) int { FILE: zh-hant/codes/go/chapter_dynamic_programming/min_path_sum.go function minPathSumDFS (line 10) | func minPathSumDFS(grid [][]int, i, j int) int { function minPathSumDFSMem (line 27) | func minPathSumDFSMem(grid, mem [][]int, i, j int) int { function minPathSumDP (line 49) | func minPathSumDP(grid [][]int) int { function minPathSumDPComp (line 75) | func minPathSumDPComp(grid [][]int) int { FILE: zh-hant/codes/go/chapter_dynamic_programming/min_path_sum_test.go function TestMinPathSum (line 12) | func TestMinPathSum(t *testing.T) { FILE: zh-hant/codes/go/chapter_dynamic_programming/unbounded_knapsack.go function unboundedKnapsackDP (line 10) | func unboundedKnapsackDP(wgt, val []int, cap int) int { function unboundedKnapsackDPComp (line 33) | func unboundedKnapsackDPComp(wgt, val []int, cap int) int { FILE: zh-hant/codes/go/chapter_graph/graph_adjacency_list.go type graphAdjList (line 16) | type graphAdjList struct method size (line 36) | func (g *graphAdjList) size() int { method addEdge (line 41) | func (g *graphAdjList) addEdge(vet1 Vertex, vet2 Vertex) { method removeEdge (line 53) | func (g *graphAdjList) removeEdge(vet1 Vertex, vet2 Vertex) { method addVertex (line 65) | func (g *graphAdjList) addVertex(vet Vertex) { method removeVertex (line 75) | func (g *graphAdjList) removeVertex(vet Vertex) { method print (line 89) | func (g *graphAdjList) print() { function newGraphAdjList (line 22) | func newGraphAdjList(edges [][]Vertex) *graphAdjList { FILE: zh-hant/codes/go/chapter_graph/graph_adjacency_list_test.go function TestGraphAdjList (line 14) | func TestGraphAdjList(t *testing.T) { FILE: zh-hant/codes/go/chapter_graph/graph_adjacency_matrix.go type graphAdjMat (line 10) | type graphAdjMat struct method size (line 39) | func (g *graphAdjMat) size() int { method addVertex (line 44) | func (g *graphAdjMat) addVertex(val int) { method removeVertex (line 58) | func (g *graphAdjMat) removeVertex(index int) { method addEdge (line 74) | func (g *graphAdjMat) addEdge(i, j int) { method removeEdge (line 86) | func (g *graphAdjMat) removeEdge(i, j int) { method print (line 96) | func (g *graphAdjMat) print() { function newGraphAdjMat (line 18) | func newGraphAdjMat(vertices []int, edges [][]int) *graphAdjMat { FILE: zh-hant/codes/go/chapter_graph/graph_adjacency_matrix_test.go function TestGraphAdjMat (line 12) | func TestGraphAdjMat(t *testing.T) { FILE: zh-hant/codes/go/chapter_graph/graph_bfs.go function graphBFS (line 13) | func graphBFS(g *graphAdjList, startVet Vertex) []Vertex { FILE: zh-hant/codes/go/chapter_graph/graph_bfs_test.go function TestGraphBFS (line 14) | func TestGraphBFS(t *testing.T) { FILE: zh-hant/codes/go/chapter_graph/graph_dfs.go function dfs (line 12) | func dfs(g *graphAdjList, visited map[Vertex]struct{}, res *[]Vertex, ve... function graphDFS (line 28) | func graphDFS(g *graphAdjList, startVet Vertex) []Vertex { FILE: zh-hant/codes/go/chapter_graph/graph_dfs_test.go function TestGraphDFS (line 14) | func TestGraphDFS(t *testing.T) { FILE: zh-hant/codes/go/chapter_greedy/coin_change_greedy.go function coinChangeGreedy (line 8) | func coinChangeGreedy(coins []int, amt int) int { FILE: zh-hant/codes/go/chapter_greedy/coin_change_greedy_test.go function TestCoinChangeGreedy (line 12) | func TestCoinChangeGreedy(t *testing.T) { FILE: zh-hant/codes/go/chapter_greedy/fractional_knapsack.go type Item (line 10) | type Item struct function fractionalKnapsack (line 16) | func fractionalKnapsack(wgt []int, val []int, cap int) float64 { FILE: zh-hant/codes/go/chapter_greedy/fractional_knapsack_test.go function TestFractionalKnapsack (line 12) | func TestFractionalKnapsack(t *testing.T) { FILE: zh-hant/codes/go/chapter_greedy/max_capacity.go function maxCapacity (line 10) | func maxCapacity(ht []int) int { FILE: zh-hant/codes/go/chapter_greedy/max_capacity_test.go function TestMaxCapacity (line 12) | func TestMaxCapacity(t *testing.T) { FILE: zh-hant/codes/go/chapter_greedy/max_product_cutting.go function maxProductCutting (line 10) | func maxProductCutting(n int) int { FILE: zh-hant/codes/go/chapter_greedy/max_product_cutting_test.go function TestMaxProductCutting (line 12) | func TestMaxProductCutting(t *testing.T) { FILE: zh-hant/codes/go/chapter_hashing/array_hash_map.go type pair (line 10) | type pair struct type arrayHashMap (line 16) | type arrayHashMap struct method hashFunc (line 28) | func (a *arrayHashMap) hashFunc(key int) int { method get (line 34) | func (a *arrayHashMap) get(key int) string { method put (line 44) | func (a *arrayHashMap) put(key int, val string) { method remove (line 51) | func (a *arrayHashMap) remove(key int) { method pairSet (line 58) | func (a *arrayHashMap) pairSet() []*pair { method keySet (line 69) | func (a *arrayHashMap) keySet() []int { method valueSet (line 80) | func (a *arrayHashMap) valueSet() []string { method print (line 91) | func (a *arrayHashMap) print() { function newArrayHashMap (line 21) | func newArrayHashMap() *arrayHashMap { FILE: zh-hant/codes/go/chapter_hashing/array_hash_map_test.go function TestArrayHashMap (line 12) | func TestArrayHashMap(t *testing.T) { FILE: zh-hant/codes/go/chapter_hashing/hash_collision_test.go function TestHashMapChaining (line 12) | func TestHashMapChaining(t *testing.T) { function TestHashMapOpenAddressing (line 38) | func TestHashMapOpenAddressing(t *testing.T) { FILE: zh-hant/codes/go/chapter_hashing/hash_map_chaining.go type hashMapChaining (line 14) | type hashMapChaining struct method hashFunc (line 38) | func (m *hashMapChaining) hashFunc(key int) int { method loadFactor (line 43) | func (m *hashMapChaining) loadFactor() float64 { method get (line 48) | func (m *hashMapChaining) get(key int) string { method put (line 62) | func (m *hashMapChaining) put(key int, val string) { method remove (line 85) | func (m *hashMapChaining) remove(key int) { method extend (line 99) | func (m *hashMapChaining) extend() { method print (line 122) | func (m *hashMapChaining) print() { function newHashMapChaining (line 23) | func newHashMapChaining() *hashMapChaining { FILE: zh-hant/codes/go/chapter_hashing/hash_map_open_addressing.go type hashMapOpenAddressing (line 12) | type hashMapOpenAddressing struct method hashFunc (line 34) | func (h *hashMapOpenAddressing) hashFunc(key int) int { method loadFactor (line 39) | func (h *hashMapOpenAddressing) loadFactor() float64 { method findBucket (line 44) | func (h *hashMapOpenAddressing) findBucket(key int) int { method get (line 70) | func (h *hashMapOpenAddressing) get(key int) string { method put (line 79) | func (h *hashMapOpenAddressing) put(key int, val string) { method remove (line 93) | func (h *hashMapOpenAddressing) remove(key int) { method extend (line 102) | func (h *hashMapOpenAddressing) extend() { method print (line 116) | func (h *hashMapOpenAddressing) print() { function newHashMapOpenAddressing (line 22) | func newHashMapOpenAddressing() *hashMapOpenAddressing { FILE: zh-hant/codes/go/chapter_hashing/hash_map_test.go function TestHashMap (line 15) | func TestHashMap(t *testing.T) { function TestSimpleHash (line 58) | func TestSimpleHash(t *testing.T) { FILE: zh-hant/codes/go/chapter_hashing/simple_hash.go function addHash (line 10) | func addHash(key string) int { function mulHash (line 22) | func mulHash(key string) int { function xorHash (line 34) | func xorHash(key string) int { function rotHash (line 46) | func rotHash(key string) int { FILE: zh-hant/codes/go/chapter_heap/heap.go type intHeap (line 9) | type intHeap method Push (line 12) | func (h *intHeap) Push(x any) { method Pop (line 19) | func (h *intHeap) Pop() any { method Len (line 27) | func (h *intHeap) Len() int { method Less (line 32) | func (h *intHeap) Less(i, j int) bool { method Swap (line 38) | func (h *intHeap) Swap(i, j int) { method Top (line 43) | func (h *intHeap) Top() any { FILE: zh-hant/codes/go/chapter_heap/heap_test.go function testPush (line 16) | func testPush(h *intHeap, val int) { function testPop (line 23) | func testPop(h *intHeap) { function TestHeap (line 30) | func TestHeap(t *testing.T) { function TestMyHeap (line 62) | func TestMyHeap(t *testing.T) { function TestTopKHeap (line 93) | func TestTopKHeap(t *testing.T) { FILE: zh-hant/codes/go/chapter_heap/my_heap.go type maxHeap (line 13) | type maxHeap struct method left (line 37) | func (h *maxHeap) left(i int) int { method right (line 42) | func (h *maxHeap) right(i int) int { method parent (line 47) | func (h *maxHeap) parent(i int) int { method swap (line 53) | func (h *maxHeap) swap(i, j int) { method size (line 58) | func (h *maxHeap) size() int { method isEmpty (line 63) | func (h *maxHeap) isEmpty() bool { method peek (line 68) | func (h *maxHeap) peek() any { method push (line 73) | func (h *maxHeap) push(val any) { method siftUp (line 81) | func (h *maxHeap) siftUp(i int) { method pop (line 97) | func (h *maxHeap) pop() any { method siftDown (line 116) | func (h *maxHeap) siftDown(i int) { method print (line 138) | func (h *maxHeap) print() { function newHeap (line 19) | func newHeap() *maxHeap { function newMaxHeap (line 26) | func newMaxHeap(nums []any) *maxHeap { FILE: zh-hant/codes/go/chapter_heap/top_k.go type minHeap (line 9) | type minHeap method Len (line 11) | func (h *minHeap) Len() int { return len(*h) } method Less (line 12) | func (h *minHeap) Less(i, j int) bool { return (*h)[i].(int) < (*h)[j]... method Swap (line 13) | func (h *minHeap) Swap(i, j int) { (*h)[i], (*h)[j] = (*h)[j], (*... method Push (line 16) | func (h *minHeap) Push(x any) { method Pop (line 21) | func (h *minHeap) Pop() any { method Top (line 29) | func (h *minHeap) Top() any { function topKHeap (line 34) | func topKHeap(nums []int, k int) *minHeap { FILE: zh-hant/codes/go/chapter_searching/binary_search.go function binarySearch (line 8) | func binarySearch(nums []int, target int) int { function binarySearchLCRO (line 27) | func binarySearchLCRO(nums []int, target int) int { FILE: zh-hant/codes/go/chapter_searching/binary_search_edge.go function binarySearchLeftEdge (line 8) | func binarySearchLeftEdge(nums []int, target int) int { function binarySearchRightEdge (line 20) | func binarySearchRightEdge(nums []int, target int) int { FILE: zh-hant/codes/go/chapter_searching/binary_search_insertion.go function binarySearchInsertionSimple (line 8) | func binarySearchInsertionSimple(nums []int, target int) int { function binarySearchInsertion (line 30) | func binarySearchInsertion(nums []int, target int) int { FILE: zh-hant/codes/go/chapter_searching/binary_search_test.go function TestBinarySearch (line 12) | func TestBinarySearch(t *testing.T) { function TestBinarySearchEdge (line 26) | func TestBinarySearchEdge(t *testing.T) { function TestBinarySearchInsertion (line 41) | func TestBinarySearchInsertion(t *testing.T) { FILE: zh-hant/codes/go/chapter_searching/hashing_search.go function hashingSearchArray (line 10) | func hashingSearchArray(m map[int]int, target int) int { function hashingSearchLinkedList (line 21) | func hashingSearchLinkedList(m map[int]*ListNode, target int) *ListNode { FILE: zh-hant/codes/go/chapter_searching/hashing_search_test.go function TestHashingSearch (line 14) | func TestHashingSearch(t *testing.T) { FILE: zh-hant/codes/go/chapter_searching/linear_search.go function linearSearchArray (line 12) | func linearSearchArray(nums []int, target int) int { function linearSearchLinkedList (line 25) | func linearSearchLinkedList(node *ListNode, target int) *ListNode { FILE: zh-hant/codes/go/chapter_searching/linear_search_test.go function TestLinearSearch (line 14) | func TestLinearSearch(t *testing.T) { FILE: zh-hant/codes/go/chapter_searching/two_sum.go function twoSumBruteForce (line 8) | func twoSumBruteForce(nums []int, target int) []int { function twoSumHashTable (line 22) | func twoSumHashTable(nums []int, target int) []int { FILE: zh-hant/codes/go/chapter_searching/two_sum_test.go function TestTwoSum (line 12) | func TestTwoSum(t *testing.T) { FILE: zh-hant/codes/go/chapter_sorting/bubble_sort.go function bubbleSort (line 8) | func bubbleSort(nums []int) { function bubbleSortWithFlag (line 22) | func bubbleSortWithFlag(nums []int) { FILE: zh-hant/codes/go/chapter_sorting/bubble_sort_test.go function TestBubbleSort (line 12) | func TestBubbleSort(t *testing.T) { FILE: zh-hant/codes/go/chapter_sorting/bucket_sort.go function bucketSort (line 10) | func bucketSort(nums []float64) { FILE: zh-hant/codes/go/chapter_sorting/bucket_sort_test.go function TestBucketSort (line 12) | func TestBucketSort(t *testing.T) { FILE: zh-hant/codes/go/chapter_sorting/counting_sort.go type CountingSort (line 7) | type CountingSort struct function countingSortNaive (line 11) | func countingSortNaive(nums []int) { function countingSort (line 36) | func countingSort(nums []int) { FILE: zh-hant/codes/go/chapter_sorting/counting_sort_test.go function TestCountingSort (line 12) | func TestCountingSort(t *testing.T) { FILE: zh-hant/codes/go/chapter_sorting/heap_sort.go function siftDown (line 8) | func siftDown(nums *[]int, n, i int) { function heapSort (line 32) | func heapSort(nums *[]int) { FILE: zh-hant/codes/go/chapter_sorting/heap_sort_test.go function TestHeapSort (line 12) | func TestHeapSort(t *testing.T) { FILE: zh-hant/codes/go/chapter_sorting/insertion_sort.go function insertionSort (line 8) | func insertionSort(nums []int) { FILE: zh-hant/codes/go/chapter_sorting/insertion_sort_test.go function TestInsertionSort (line 12) | func TestInsertionSort(t *testing.T) { FILE: zh-hant/codes/go/chapter_sorting/merge_sort.go function merge (line 8) | func merge(nums []int, left, mid, right int) { function mergeSort (line 43) | func mergeSort(nums []int, left, right int) { FILE: zh-hant/codes/go/chapter_sorting/merge_sort_test.go function TestMergeSort (line 12) | func TestMergeSort(t *testing.T) { FILE: zh-hant/codes/go/chapter_sorting/quick_sort.go type quickSort (line 8) | type quickSort struct method partition (line 17) | func (q *quickSort) partition(nums []int, left, right int) int { method quickSort (line 36) | func (q *quickSort) quickSort(nums []int, left, right int) { type quickSortMedian (line 11) | type quickSortMedian struct method medianThree (line 49) | func (q *quickSortMedian) medianThree(nums []int, left, mid, right int... method partition (line 61) | func (q *quickSortMedian) partition(nums []int, left, right int) int { method quickSort (line 84) | func (q *quickSortMedian) quickSort(nums []int, left, right int) { type quickSortTailCall (line 14) | type quickSortTailCall struct method partition (line 97) | func (q *quickSortTailCall) partition(nums []int, left, right int) int { method quickSort (line 116) | func (q *quickSortTailCall) quickSort(nums []int, left, right int) { FILE: zh-hant/codes/go/chapter_sorting/quick_sort_test.go function TestQuickSort (line 13) | func TestQuickSort(t *testing.T) { function TestQuickSortMedian (line 21) | func TestQuickSortMedian(t *testing.T) { function TestQuickSortTailCall (line 29) | func TestQuickSortTailCall(t *testing.T) { FILE: zh-hant/codes/go/chapter_sorting/radix_sort.go function digit (line 10) | func digit(num, exp int) int { function countingSortDigit (line 16) | func countingSortDigit(nums []int, exp int) { function radixSort (line 44) | func radixSort(nums []int) { FILE: zh-hant/codes/go/chapter_sorting/radix_sort_test.go function TestRadixSort (line 12) | func TestRadixSort(t *testing.T) { FILE: zh-hant/codes/go/chapter_sorting/selection_sort.go function selectionSort (line 8) | func selectionSort(nums []int) { FILE: zh-hant/codes/go/chapter_sorting/selection_sort_test.go function TestSelectionSort (line 12) | func TestSelectionSort(t *testing.T) { FILE: zh-hant/codes/go/chapter_stack_and_queue/array_deque.go type arrayDeque (line 10) | type arrayDeque struct method size (line 28) | func (q *arrayDeque) size() int { method isEmpty (line 33) | func (q *arrayDeque) isEmpty() bool { method index (line 38) | func (q *arrayDeque) index(i int) int { method pushFirst (line 46) | func (q *arrayDeque) pushFirst(num int) { method pushLast (line 60) | func (q *arrayDeque) pushLast(num int) { method popFirst (line 73) | func (q *arrayDeque) popFirst() any { method popLast (line 85) | func (q *arrayDeque) popLast() any { method peekFirst (line 95) | func (q *arrayDeque) peekFirst() any { method peekLast (line 103) | func (q *arrayDeque) peekLast() any { method toSlice (line 113) | func (q *arrayDeque) toSlice() []int { function newArrayDeque (line 18) | func newArrayDeque(queCapacity int) *arrayDeque { FILE: zh-hant/codes/go/chapter_stack_and_queue/array_queue.go type arrayQueue (line 8) | type arrayQueue struct method size (line 26) | func (q *arrayQueue) size() int { method isEmpty (line 31) | func (q *arrayQueue) isEmpty() bool { method push (line 36) | func (q *arrayQueue) push(num int) { method pop (line 50) | func (q *arrayQueue) pop() any { method peek (line 63) | func (q *arrayQueue) peek() any { method toSlice (line 71) | func (q *arrayQueue) toSlice() []int { function newArrayQueue (line 16) | func newArrayQueue(queCapacity int) *arrayQueue { FILE: zh-hant/codes/go/chapter_stack_and_queue/array_stack.go type arrayStack (line 8) | type arrayStack struct method size (line 21) | func (s *arrayStack) size() int { method isEmpty (line 26) | func (s *arrayStack) isEmpty() bool { method push (line 31) | func (s *arrayStack) push(v int) { method pop (line 37) | func (s *arrayStack) pop() any { method peek (line 44) | func (s *arrayStack) peek() any { method toSlice (line 53) | func (s *arrayStack) toSlice() []int { function newArrayStack (line 13) | func newArrayStack() *arrayStack { FILE: zh-hant/codes/go/chapter_stack_and_queue/deque_test.go function TestDeque (line 15) | func TestDeque(t *testing.T) { function TestArrayDeque (line 52) | func TestArrayDeque(t *testing.T) { function TestLinkedListDeque (line 95) | func TestLinkedListDeque(t *testing.T) { function BenchmarkLinkedListDeque (line 132) | func BenchmarkLinkedListDeque(b *testing.B) { FILE: zh-hant/codes/go/chapter_stack_and_queue/linkedlist_deque.go type linkedListDeque (line 12) | type linkedListDeque struct method pushFirst (line 25) | func (s *linkedListDeque) pushFirst(value any) { method pushLast (line 30) | func (s *linkedListDeque) pushLast(value any) { method popFirst (line 35) | func (s *linkedListDeque) popFirst() any { method popLast (line 45) | func (s *linkedListDeque) popLast() any { method peekFirst (line 55) | func (s *linkedListDeque) peekFirst() any { method peekLast (line 64) | func (s *linkedListDeque) peekLast() any { method size (line 73) | func (s *linkedListDeque) size() int { method isEmpty (line 78) | func (s *linkedListDeque) isEmpty() bool { method toList (line 83) | func (s *linkedListDeque) toList() *list.List { function newLinkedListDeque (line 18) | func newLinkedListDeque() *linkedListDeque { FILE: zh-hant/codes/go/chapter_stack_and_queue/linkedlist_queue.go type linkedListQueue (line 12) | type linkedListQueue struct method push (line 25) | func (s *linkedListQueue) push(value any) { method pop (line 30) | func (s *linkedListQueue) pop() any { method peek (line 40) | func (s *linkedListQueue) peek() any { method size (line 49) | func (s *linkedListQueue) size() int { method isEmpty (line 54) | func (s *linkedListQueue) isEmpty() bool { method toList (line 59) | func (s *linkedListQueue) toList() *list.List { function newLinkedListQueue (line 18) | func newLinkedListQueue() *linkedListQueue { FILE: zh-hant/codes/go/chapter_stack_and_queue/linkedlist_stack.go type linkedListStack (line 12) | type linkedListStack struct method push (line 25) | func (s *linkedListStack) push(value int) { method pop (line 30) | func (s *linkedListStack) pop() any { method peek (line 40) | func (s *linkedListStack) peek() any { method size (line 49) | func (s *linkedListStack) size() int { method isEmpty (line 54) | func (s *linkedListStack) isEmpty() bool { method toList (line 59) | func (s *linkedListStack) toList() *list.List { function newLinkedListStack (line 18) | func newLinkedListStack() *linkedListStack { FILE: zh-hant/codes/go/chapter_stack_and_queue/queue_test.go function TestQueue (line 15) | func TestQueue(t *testing.T) { function TestArrayQueue (line 48) | func TestArrayQueue(t *testing.T) { function TestLinkedListQueue (line 92) | func TestLinkedListQueue(t *testing.T) { function BenchmarkArrayQueue (line 124) | func BenchmarkArrayQueue(b *testing.B) { function BenchmarkLinkedQueue (line 137) | func BenchmarkLinkedQueue(b *testing.B) { FILE: zh-hant/codes/go/chapter_stack_and_queue/stack_test.go function TestStack (line 14) | func TestStack(t *testing.T) { function TestArrayStack (line 47) | func TestArrayStack(t *testing.T) { function TestLinkedListStack (line 78) | func TestLinkedListStack(t *testing.T) { function BenchmarkArrayStack (line 109) | func BenchmarkArrayStack(b *testing.B) { function BenchmarkLinkedListStack (line 121) | func BenchmarkLinkedListStack(b *testing.B) { FILE: zh-hant/codes/go/chapter_tree/array_binary_tree.go type arrayBinaryTree (line 8) | type arrayBinaryTree struct method size (line 20) | func (abt *arrayBinaryTree) size() int { method val (line 25) | func (abt *arrayBinaryTree) val(i int) any { method left (line 34) | func (abt *arrayBinaryTree) left(i int) int { method right (line 39) | func (abt *arrayBinaryTree) right(i int) int { method parent (line 44) | func (abt *arrayBinaryTree) parent(i int) int { method levelOrder (line 49) | func (abt *arrayBinaryTree) levelOrder() []any { method dfs (line 61) | func (abt *arrayBinaryTree) dfs(i int, order string, res *[]any) { method preOrder (line 83) | func (abt *arrayBinaryTree) preOrder() []any { method inOrder (line 90) | func (abt *arrayBinaryTree) inOrder() []any { method postOrder (line 97) | func (abt *arrayBinaryTree) postOrder() []any { function newArrayBinaryTree (line 13) | func newArrayBinaryTree(arr []any) *arrayBinaryTree { FILE: zh-hant/codes/go/chapter_tree/array_binary_tree_test.go function TestArrayBinaryTree (line 14) | func TestArrayBinaryTree(t *testing.T) { FILE: zh-hant/codes/go/chapter_tree/avl_tree.go type aVLTree (line 10) | type aVLTree struct method height (line 20) | func (t *aVLTree) height(node *TreeNode) int { method updateHeight (line 29) | func (t *aVLTree) updateHeight(node *TreeNode) { method balanceFactor (line 41) | func (t *aVLTree) balanceFactor(node *TreeNode) int { method rightRotate (line 51) | func (t *aVLTree) rightRotate(node *TreeNode) *TreeNode { method leftRotate (line 65) | func (t *aVLTree) leftRotate(node *TreeNode) *TreeNode { method rotate (line 79) | func (t *aVLTree) rotate(node *TreeNode) *TreeNode { method insert (line 110) | func (t *aVLTree) insert(val int) { method insertHelper (line 115) | func (t *aVLTree) insertHelper(node *TreeNode, val int) *TreeNode { method remove (line 137) | func (t *aVLTree) remove(val int) { method removeHelper (line 142) | func (t *aVLTree) removeHelper(node *TreeNode, val int) *TreeNode { method search (line 183) | func (t *aVLTree) search(val int) *TreeNode { function newAVLTree (line 15) | func newAVLTree() *aVLTree { FILE: zh-hant/codes/go/chapter_tree/avl_tree_test.go function TestAVLTree (line 14) | func TestAVLTree(t *testing.T) { function testInsert (line 44) | func testInsert(tree *aVLTree, val int) { function testRemove (line 50) | func testRemove(tree *aVLTree, val int) { FILE: zh-hant/codes/go/chapter_tree/binary_search_tree.go type binarySearchTree (line 11) | type binarySearchTree struct method getRoot (line 23) | func (bst *binarySearchTree) getRoot() *TreeNode { method search (line 28) | func (bst *binarySearchTree) search(num int) *TreeNode { method insert (line 48) | func (bst *binarySearchTree) insert(num int) { method remove (line 79) | func (bst *binarySearchTree) remove(num int) { method print (line 140) | func (bst *binarySearchTree) print() { function newBinarySearchTree (line 15) | func newBinarySearchTree() *binarySearchTree { FILE: zh-hant/codes/go/chapter_tree/binary_search_tree_test.go function TestBinarySearchTree (line 12) | func TestBinarySearchTree(t *testing.T) { FILE: zh-hant/codes/go/chapter_tree/binary_tree_bfs.go function levelOrder (line 14) | func levelOrder(root *TreeNode) []any { FILE: zh-hant/codes/go/chapter_tree/binary_tree_bfs_test.go function TestLevelOrder (line 14) | func TestLevelOrder(t *testing.T) { FILE: zh-hant/codes/go/chapter_tree/binary_tree_dfs.go function preOrder (line 14) | func preOrder(node *TreeNode) { function inOrder (line 25) | func inOrder(node *TreeNode) { function postOrder (line 36) | func postOrder(node *TreeNode) { FILE: zh-hant/codes/go/chapter_tree/binary_tree_dfs_test.go function TestPreInPostOrderTraversal (line 14) | func TestPreInPostOrderTraversal(t *testing.T) { FILE: zh-hant/codes/go/chapter_tree/binary_tree_test.go function TestBinaryTree (line 14) | func TestBinaryTree(t *testing.T) { FILE: zh-hant/codes/go/pkg/list_node.go type ListNode (line 8) | type ListNode struct function NewListNode (line 14) | func NewListNode(v int) *ListNode { function ArrayToLinkedList (line 22) | func ArrayToLinkedList(arr []int) *ListNode { FILE: zh-hant/codes/go/pkg/list_node_test.go function TestListNode (line 11) | func TestListNode(t *testing.T) { FILE: zh-hant/codes/go/pkg/print_utils.go function PrintSlice (line 15) | func PrintSlice[T any](nums []T) { function PrintList (line 21) | func PrintList(list *list.List) { function PrintMap (line 37) | func PrintMap[K comparable, V any](m map[K]V) { function PrintHeap (line 44) | func PrintHeap(h []any) { function PrintLinkedList (line 53) | func PrintLinkedList(node *ListNode) { function PrintTree (line 67) | func PrintTree(root *TreeNode) { function printTreeHelper (line 74) | func printTreeHelper(root *TreeNode, prev *trunk, isRight bool) { type trunk (line 99) | type trunk struct function newTrunk (line 104) | func newTrunk(prev *trunk, str string) *trunk { function showTrunk (line 111) | func showTrunk(t *trunk) { FILE: zh-hant/codes/go/pkg/tree_node.go type TreeNode (line 8) | type TreeNode struct function NewTreeNode (line 16) | func NewTreeNode(v any) *TreeNode { function SliceToTreeDFS (line 45) | func SliceToTreeDFS(arr []any, i int) *TreeNode { function SliceToTree (line 56) | func SliceToTree(arr []any) *TreeNode { function TreeToSliceDFS (line 61) | func TreeToSliceDFS(root *TreeNode, i int, res *[]any) { function TreeToSlice (line 74) | func TreeToSlice(root *TreeNode) []any { FILE: zh-hant/codes/go/pkg/tree_node_test.go function TestTreeNode (line 12) | func TestTreeNode(t *testing.T) { FILE: zh-hant/codes/go/pkg/vertex.go type Vertex (line 8) | type Vertex struct function NewVertex (line 13) | func NewVertex(val int) Vertex { function ValsToVets (line 20) | func ValsToVets(vals []int) []Vertex { function VetsToVals (line 29) | func VetsToVals(vets []Vertex) []int { function DeleteSliceElms (line 38) | func DeleteSliceElms[T any](a []T, elms ...T) []T { FILE: zh-hant/codes/java/chapter_array_and_linkedlist/array.java class array (line 12) | public class array { method randomAccess (line 14) | static int randomAccess(int[] nums) { method extend (line 23) | static int[] extend(int[] nums, int enlarge) { method insert (line 35) | static void insert(int[] nums, int num, int index) { method remove (line 45) | static void remove(int[] nums, int index) { method traverse (line 53) | static void traverse(int[] nums) { method find (line 66) | static int find(int[] nums, int target) { method main (line 75) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_array_and_linkedlist/linked_list.java class linked_list (line 11) | public class linked_list { method insert (line 13) | static void insert(ListNode n0, ListNode P) { method remove (line 20) | static void remove(ListNode n0) { method access (line 30) | static ListNode access(ListNode head, int index) { method find (line 40) | static int find(ListNode head, int target) { method main (line 52) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_array_and_linkedlist/list.java class list (line 11) | public class list { method main (line 12) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_array_and_linkedlist/my_list.java class MyList (line 12) | class MyList { method MyList (line 19) | public MyList() { method size (line 24) | public int size() { method capacity (line 29) | public int capacity() { method get (line 34) | public int get(int index) { method set (line 42) | public void set(int index, int num) { method add (line 49) | public void add(int num) { method insert (line 59) | public void insert(int index, int num) { method remove (line 75) | public int remove(int index) { method extendCapacity (line 90) | public void extendCapacity() { method toArray (line 98) | public int[] toArray() { class my_list (line 109) | public class my_list { method main (line 111) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_backtracking/n_queens.java class n_queens (line 11) | public class n_queens { method backtrack (line 13) | public static void backtrack(int row, int n, List> state,... method nQueens (line 44) | public static List>> nQueens(int n) { method main (line 64) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_backtracking/permutations_i.java class permutations_i (line 11) | public class permutations_i { method backtrack (line 13) | public static void backtrack(List state, int[] choices, boole... method permutationsI (line 37) | static List> permutationsI(int[] nums) { method main (line 43) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_backtracking/permutations_ii.java class permutations_ii (line 11) | public class permutations_ii { method backtrack (line 13) | static void backtrack(List state, int[] choices, boolean[] se... method permutationsII (line 39) | static List> permutationsII(int[] nums) { method main (line 45) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_backtracking/preorder_traversal_i_compact.java class preorder_traversal_i_compact (line 12) | public class preorder_traversal_i_compact { method preOrder (line 16) | static void preOrder(TreeNode root) { method main (line 28) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_backtracking/preorder_traversal_ii_compact.java class preorder_traversal_ii_compact (line 12) | public class preorder_traversal_ii_compact { method preOrder (line 17) | static void preOrder(TreeNode root) { method main (line 33) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_backtracking/preorder_traversal_iii_compact.java class preorder_traversal_iii_compact (line 12) | public class preorder_traversal_iii_compact { method preOrder (line 17) | static void preOrder(TreeNode root) { method main (line 34) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_backtracking/preorder_traversal_iii_template.java class preorder_traversal_iii_template (line 12) | public class preorder_traversal_iii_template { method isSolution (line 14) | static boolean isSolution(List state) { method recordSolution (line 19) | static void recordSolution(List state, List> ... method isValid (line 24) | static boolean isValid(List state, TreeNode choice) { method makeChoice (line 29) | static void makeChoice(List state, TreeNode choice) { method undoChoice (line 34) | static void undoChoice(List state, TreeNode choice) { method backtrack (line 39) | static void backtrack(List state, List choices, Li... method main (line 59) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_backtracking/subset_sum_i.java class subset_sum_i (line 11) | public class subset_sum_i { method backtrack (line 13) | static void backtrack(List state, int target, int[] choices, ... method subsetSumI (line 37) | static List> subsetSumI(int[] nums, int target) { method main (line 46) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_backtracking/subset_sum_i_naive.java class subset_sum_i_naive (line 11) | public class subset_sum_i_naive { method backtrack (line 13) | static void backtrack(List state, int target, int total, int[... method subsetSumINaive (line 35) | static List> subsetSumINaive(int[] nums, int target) { method main (line 43) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_backtracking/subset_sum_ii.java class subset_sum_ii (line 11) | public class subset_sum_ii { method backtrack (line 13) | static void backtrack(List state, int target, int[] choices, ... method subsetSumII (line 42) | static List> subsetSumII(int[] nums, int target) { method main (line 51) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_computational_complexity/iteration.java class iteration (line 9) | public class iteration { method forLoop (line 11) | static int forLoop(int n) { method whileLoop (line 21) | static int whileLoop(int n) { method whileLoopII (line 33) | static int whileLoopII(int n) { method nestedForLoop (line 47) | static String nestedForLoop(int n) { method main (line 60) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_computational_complexity/recursion.java class recursion (line 11) | public class recursion { method recur (line 13) | static int recur(int n) { method forLoopRecur (line 24) | static int forLoopRecur(int n) { method tailRecur (line 43) | static int tailRecur(int n, int res) { method fib (line 52) | static int fib(int n) { method main (line 63) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_computational_complexity/space_complexity.java class space_complexity (line 12) | public class space_complexity { method function (line 14) | static int function() { method constant (line 20) | static void constant(int n) { method linear (line 37) | static void linear(int n) { method linearRecur (line 53) | static void linearRecur(int n) { method quadratic (line 61) | static void quadratic(int n) { method quadraticRecur (line 76) | static int quadraticRecur(int n) { method buildTree (line 86) | static TreeNode buildTree(int n) { method main (line 96) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_computational_complexity/time_complexity.java class time_complexity (line 9) | public class time_complexity { method constant (line 11) | static int constant(int n) { method linear (line 20) | static int linear(int n) { method arrayTraversal (line 28) | static int arrayTraversal(int[] nums) { method quadratic (line 38) | static int quadratic(int n) { method bubbleSort (line 50) | static int bubbleSort(int[] nums) { method exponential (line 69) | static int exponential(int n) { method expRecur (line 83) | static int expRecur(int n) { method logarithmic (line 90) | static int logarithmic(int n) { method logRecur (line 100) | static int logRecur(int n) { method linearLogRecur (line 107) | static int linearLogRecur(int n) { method factorialRecur (line 118) | static int factorialRecur(int n) { method main (line 130) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_computational_complexity/worst_best_time_complexity.java class worst_best_time_complexity (line 11) | public class worst_best_time_complexity { method randomNumbers (line 13) | static int[] randomNumbers(int n) { method findOne (line 30) | static int findOne(int[] nums) { method main (line 41) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_divide_and_conquer/binary_search_recur.java class binary_search_recur (line 9) | public class binary_search_recur { method dfs (line 11) | static int dfs(int[] nums, int target, int i, int j) { method binarySearch (line 31) | static int binarySearch(int[] nums, int target) { method main (line 37) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_divide_and_conquer/build_tree.java class build_tree (line 12) | public class build_tree { method dfs (line 14) | static TreeNode dfs(int[] preorder, Map inorderMap, ... method buildTree (line 31) | static TreeNode buildTree(int[] preorder, int[] inorder) { method main (line 41) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_divide_and_conquer/hanota.java class hanota (line 11) | public class hanota { method move (line 13) | static void move(List src, List tar) { method dfs (line 21) | static void dfs(int i, List src, List buf, List A, List B, List choices, int state, int n, ... method climbingStairsBacktrack (line 29) | public static int climbingStairsBacktrack(int n) { method main (line 38) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_dynamic_programming/climbing_stairs_constraint_dp.java class climbing_stairs_constraint_dp (line 9) | public class climbing_stairs_constraint_dp { method climbingStairsConstraintDP (line 11) | static int climbingStairsConstraintDP(int n) { method main (line 30) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_dynamic_programming/climbing_stairs_dfs.java class climbing_stairs_dfs (line 9) | public class climbing_stairs_dfs { method dfs (line 11) | public static int dfs(int i) { method climbingStairsDFS (line 21) | public static int climbingStairsDFS(int n) { method main (line 25) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_dynamic_programming/climbing_stairs_dfs_mem.java class climbing_stairs_dfs_mem (line 11) | public class climbing_stairs_dfs_mem { method dfs (line 13) | public static int dfs(int i, int[] mem) { method climbingStairsDFSMem (line 28) | public static int climbingStairsDFSMem(int n) { method main (line 35) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_dynamic_programming/climbing_stairs_dp.java class climbing_stairs_dp (line 9) | public class climbing_stairs_dp { method climbingStairsDP (line 11) | public static int climbingStairsDP(int n) { method climbingStairsDPComp (line 27) | public static int climbingStairsDPComp(int n) { method main (line 39) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_dynamic_programming/coin_change.java class coin_change (line 11) | public class coin_change { method coinChangeDP (line 13) | static int coinChangeDP(int[] coins, int amt) { method coinChangeDPComp (line 38) | static int coinChangeDPComp(int[] coins, int amt) { method main (line 60) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_dynamic_programming/coin_change_ii.java class coin_change_ii (line 9) | public class coin_change_ii { method coinChangeIIDP (line 11) | static int coinChangeIIDP(int[] coins, int amt) { method coinChangeIIDPComp (line 35) | static int coinChangeIIDPComp(int[] coins, int amt) { method main (line 55) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_dynamic_programming/edit_distance.java class edit_distance (line 11) | public class edit_distance { method editDistanceDFS (line 13) | static int editDistanceDFS(String s, String t, int i, int j) { method editDistanceDFSMem (line 35) | static int editDistanceDFSMem(String s, String t, int[][] mem, int i, ... method editDistanceDP (line 61) | static int editDistanceDP(String s, String t) { method editDistanceDPComp (line 87) | static int editDistanceDPComp(String s, String t) { method main (line 115) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_dynamic_programming/knapsack.java class knapsack (line 11) | public class knapsack { method knapsackDFS (line 14) | static int knapsackDFS(int[] wgt, int[] val, int i, int c) { method knapsackDFSMem (line 31) | static int knapsackDFSMem(int[] wgt, int[] val, int[][] mem, int i, in... method knapsackDP (line 53) | static int knapsackDP(int[] wgt, int[] val, int cap) { method knapsackDPComp (line 73) | static int knapsackDPComp(int[] wgt, int[] val, int cap) { method main (line 90) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_dynamic_programming/min_cost_climbing_stairs_dp.java class min_cost_climbing_stairs_dp (line 11) | public class min_cost_climbing_stairs_dp { method minCostClimbingStairsDP (line 13) | public static int minCostClimbingStairsDP(int[] cost) { method minCostClimbingStairsDPComp (line 30) | public static int minCostClimbingStairsDPComp(int[] cost) { method main (line 43) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_dynamic_programming/min_path_sum.java class min_path_sum (line 11) | public class min_path_sum { method minPathSumDFS (line 13) | static int minPathSumDFS(int[][] grid, int i, int j) { method minPathSumDFSMem (line 30) | static int minPathSumDFSMem(int[][] grid, int[][] mem, int i, int j) { method minPathSumDP (line 52) | static int minPathSumDP(int[][] grid) { method minPathSumDPComp (line 75) | static int minPathSumDPComp(int[][] grid) { method main (line 96) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_dynamic_programming/unbounded_knapsack.java class unbounded_knapsack (line 9) | public class unbounded_knapsack { method unboundedKnapsackDP (line 11) | static int unboundedKnapsackDP(int[] wgt, int[] val, int cap) { method unboundedKnapsackDPComp (line 31) | static int unboundedKnapsackDPComp(int[] wgt, int[] val, int cap) { method main (line 50) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_graph/graph_adjacency_list.java class GraphAdjList (line 13) | class GraphAdjList { method GraphAdjList (line 18) | public GraphAdjList(Vertex[][] edges) { method size (line 29) | public int size() { method addEdge (line 34) | public void addEdge(Vertex vet1, Vertex vet2) { method removeEdge (line 43) | public void removeEdge(Vertex vet1, Vertex vet2) { method addVertex (line 52) | public void addVertex(Vertex vet) { method removeVertex (line 60) | public void removeVertex(Vertex vet) { method print (line 72) | public void print() { class graph_adjacency_list (line 83) | public class graph_adjacency_list { method main (line 84) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_graph/graph_adjacency_matrix.java class GraphAdjMat (line 13) | class GraphAdjMat { method GraphAdjMat (line 18) | public GraphAdjMat(int[] vertices, int[][] edges) { method size (line 33) | public int size() { method addVertex (line 38) | public void addVertex(int val) { method removeVertex (line 55) | public void removeVertex(int index) { method addEdge (line 70) | public void addEdge(int i, int j) { method removeEdge (line 81) | public void removeEdge(int i, int j) { method print (line 90) | public void print() { class graph_adjacency_matrix (line 98) | public class graph_adjacency_matrix { method main (line 99) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_graph/graph_bfs.java class graph_bfs (line 12) | public class graph_bfs { method graphBFS (line 15) | static List graphBFS(GraphAdjList graph, Vertex startVet) { method main (line 40) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_graph/graph_dfs.java class graph_dfs (line 12) | public class graph_dfs { method dfs (line 14) | static void dfs(GraphAdjList graph, Set visited, List ... method graphDFS (line 28) | static List graphDFS(GraphAdjList graph, Vertex startVet) { method main (line 37) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_greedy/coin_change_greedy.java class coin_change_greedy (line 11) | public class coin_change_greedy { method coinChangeGreedy (line 13) | static int coinChangeGreedy(int[] coins, int amt) { method main (line 31) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_greedy/fractional_knapsack.java class Item (line 13) | class Item { method Item (line 17) | public Item(int w, int v) { class fractional_knapsack (line 23) | public class fractional_knapsack { method fractionalKnapsack (line 25) | static double fractionalKnapsack(int[] wgt, int[] val, int cap) { method main (line 50) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_greedy/max_capacity.java class max_capacity (line 9) | public class max_capacity { method maxCapacity (line 11) | static int maxCapacity(int[] ht) { method main (line 31) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_greedy/max_product_cutting.java class max_product_cutting (line 11) | public class max_product_cutting { method maxProductCutting (line 13) | public static int maxProductCutting(int n) { method main (line 33) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_hashing/array_hash_map.java class Pair (line 12) | class Pair { method Pair (line 16) | public Pair(int key, String val) { class ArrayHashMap (line 23) | class ArrayHashMap { method ArrayHashMap (line 26) | public ArrayHashMap() { method hashFunc (line 35) | private int hashFunc(int key) { method get (line 41) | public String get(int key) { method put (line 50) | public void put(int key, String val) { method remove (line 57) | public void remove(int key) { method pairSet (line 64) | public List pairSet() { method keySet (line 74) | public List keySet() { method valueSet (line 84) | public List valueSet() { method print (line 94) | public void print() { class array_hash_map (line 101) | public class array_hash_map { method main (line 102) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_hashing/built_in_hash.java class built_in_hash (line 12) | public class built_in_hash { method main (line 13) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_hashing/hash_map.java class hash_map (line 12) | public class hash_map { method main (line 13) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_hashing/hash_map_chaining.java class HashMapChaining (line 13) | class HashMapChaining { method HashMapChaining (line 21) | public HashMapChaining() { method hashFunc (line 33) | int hashFunc(int key) { method loadFactor (line 38) | double loadFactor() { method get (line 43) | String get(int key) { method put (line 57) | void put(int key, String val) { method remove (line 78) | void remove(int key) { method extend (line 92) | void extend() { method print (line 111) | void print() { class hash_map_chaining (line 122) | public class hash_map_chaining { method main (line 123) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_hashing/hash_map_open_addressing.java class HashMapOpenAddressing (line 10) | class HashMapOpenAddressing { method HashMapOpenAddressing (line 19) | public HashMapOpenAddressing() { method hashFunc (line 25) | private int hashFunc(int key) { method loadFactor (line 30) | private double loadFactor() { method findBucket (line 35) | private int findBucket(int key) { method get (line 62) | public String get(int key) { method put (line 74) | public void put(int key, String val) { method remove (line 92) | public void remove(int key) { method extend (line 103) | private void extend() { method print (line 119) | public void print() { class hash_map_open_addressing (line 132) | public class hash_map_open_addressing { method main (line 133) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_hashing/simple_hash.java class simple_hash (line 9) | public class simple_hash { method addHash (line 11) | static int addHash(String key) { method mulHash (line 21) | static int mulHash(String key) { method xorHash (line 31) | static int xorHash(String key) { method rotHash (line 41) | static int rotHash(String key) { method main (line 50) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_heap/heap.java class heap (line 12) | public class heap { method testPush (line 13) | public static void testPush(Queue heap, int val) { method testPop (line 19) | public static void testPop(Queue heap) { method main (line 25) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_heap/my_heap.java class MaxHeap (line 13) | class MaxHeap { method MaxHeap (line 18) | public MaxHeap(List nums) { method left (line 28) | private int left(int i) { method right (line 33) | private int right(int i) { method parent (line 38) | private int parent(int i) { method swap (line 43) | private void swap(int i, int j) { method size (line 50) | public int size() { method isEmpty (line 55) | public boolean isEmpty() { method peek (line 60) | public int peek() { method push (line 65) | public void push(int val) { method siftUp (line 73) | private void siftUp(int i) { method pop (line 88) | public int pop() { method siftDown (line 103) | private void siftDown(int i) { method print (line 122) | public void print() { class my_heap (line 129) | public class my_heap { method main (line 130) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_heap/top_k.java class top_k (line 12) | public class top_k { method topKHeap (line 14) | static Queue topKHeap(int[] nums, int k) { method main (line 32) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_searching/binary_search.java class binary_search (line 9) | public class binary_search { method binarySearch (line 11) | static int binarySearch(int[] nums, int target) { method binarySearchLCRO (line 29) | static int binarySearchLCRO(int[] nums, int target) { method main (line 46) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_searching/binary_search_edge.java class binary_search_edge (line 9) | public class binary_search_edge { method binarySearchLeftEdge (line 11) | static int binarySearchLeftEdge(int[] nums, int target) { method binarySearchRightEdge (line 23) | static int binarySearchRightEdge(int[] nums, int target) { method main (line 36) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_searching/binary_search_insertion.java class binary_search_insertion (line 9) | class binary_search_insertion { method binarySearchInsertionSimple (line 11) | static int binarySearchInsertionSimple(int[] nums, int target) { method binarySearchInsertion (line 28) | static int binarySearchInsertion(int[] nums, int target) { method main (line 44) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_searching/hashing_search.java class hashing_search (line 12) | public class hashing_search { method hashingSearchArray (line 14) | static int hashingSearchArray(Map map, int target) { method hashingSearchLinkedList (line 21) | static ListNode hashingSearchLinkedList(Map map, in... method main (line 27) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_searching/linear_search.java class linear_search (line 11) | public class linear_search { method linearSearchArray (line 13) | static int linearSearchArray(int[] nums, int target) { method linearSearchLinkedList (line 25) | static ListNode linearSearchLinkedList(ListNode head, int target) { method main (line 37) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_searching/two_sum.java class two_sum (line 11) | public class two_sum { method twoSumBruteForce (line 13) | static int[] twoSumBruteForce(int[] nums, int target) { method twoSumHashTable (line 26) | static int[] twoSumHashTable(int[] nums, int target) { method main (line 40) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_sorting/bubble_sort.java class bubble_sort (line 11) | public class bubble_sort { method bubbleSort (line 13) | static void bubbleSort(int[] nums) { method bubbleSortWithFlag (line 29) | static void bubbleSortWithFlag(int[] nums) { method main (line 48) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_sorting/bucket_sort.java class bucket_sort (line 11) | public class bucket_sort { method bucketSort (line 13) | static void bucketSort(float[] nums) { method main (line 41) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_sorting/counting_sort.java class counting_sort (line 11) | public class counting_sort { method countingSortNaive (line 14) | static void countingSortNaive(int[] nums) { method countingSort (line 37) | static void countingSort(int[] nums) { method main (line 69) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_sorting/heap_sort.java class heap_sort (line 11) | public class heap_sort { method siftDown (line 13) | public static void siftDown(int[] nums, int n, int i) { method heapSort (line 36) | public static void heapSort(int[] nums) { method main (line 52) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_sorting/insertion_sort.java class insertion_sort (line 11) | public class insertion_sort { method insertionSort (line 13) | static void insertionSort(int[] nums) { method main (line 26) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_sorting/merge_sort.java class merge_sort (line 11) | public class merge_sort { method merge (line 13) | static void merge(int[] nums, int left, int mid, int right) { method mergeSort (line 40) | static void mergeSort(int[] nums, int left, int right) { method main (line 52) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_sorting/quick_sort.java class QuickSort (line 12) | class QuickSort { method swap (line 14) | static void swap(int[] nums, int i, int j) { method partition (line 21) | static int partition(int[] nums, int left, int right) { method quickSort (line 36) | public static void quickSort(int[] nums, int left, int right) { class QuickSortMedian (line 49) | class QuickSortMedian { method swap (line 51) | static void swap(int[] nums, int i, int j) { method medianThree (line 58) | static int medianThree(int[] nums, int left, int mid, int right) { method partition (line 68) | static int partition(int[] nums, int left, int right) { method quickSort (line 87) | public static void quickSort(int[] nums, int left, int right) { class QuickSortTailCall (line 100) | class QuickSortTailCall { method swap (line 102) | static void swap(int[] nums, int i, int j) { method partition (line 109) | static int partition(int[] nums, int left, int right) { method quickSort (line 124) | public static void quickSort(int[] nums, int left, int right) { class quick_sort (line 141) | public class quick_sort { method main (line 142) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_sorting/radix_sort.java class radix_sort (line 11) | public class radix_sort { method digit (line 13) | static int digit(int num, int exp) { method countingSortDigit (line 19) | static void countingSortDigit(int[] nums, int exp) { method radixSort (line 46) | static void radixSort(int[] nums) { method main (line 62) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_sorting/selection_sort.java class selection_sort (line 11) | public class selection_sort { method selectionSort (line 13) | public static void selectionSort(int[] nums) { method main (line 30) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_stack_and_queue/array_deque.java class ArrayDeque (line 12) | class ArrayDeque { method ArrayDeque (line 18) | public ArrayDeque(int capacity) { method capacity (line 24) | public int capacity() { method size (line 29) | public int size() { method isEmpty (line 34) | public boolean isEmpty() { method index (line 39) | private int index(int i) { method pushFirst (line 47) | public void pushFirst(int num) { method pushLast (line 61) | public void pushLast(int num) { method popFirst (line 74) | public int popFirst() { method popLast (line 83) | public int popLast() { method peekFirst (line 90) | public int peekFirst() { method peekLast (line 97) | public int peekLast() { method toArray (line 106) | public int[] toArray() { class array_deque (line 116) | public class array_deque { method main (line 117) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_stack_and_queue/array_queue.java class ArrayQueue (line 12) | class ArrayQueue { method ArrayQueue (line 17) | public ArrayQueue(int capacity) { method capacity (line 23) | public int capacity() { method size (line 28) | public int size() { method isEmpty (line 33) | public boolean isEmpty() { method push (line 38) | public void push(int num) { method pop (line 52) | public int pop() { method peek (line 61) | public int peek() { method toArray (line 68) | public int[] toArray() { class array_queue (line 78) | public class array_queue { method main (line 79) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_stack_and_queue/array_stack.java class ArrayStack (line 12) | class ArrayStack { method ArrayStack (line 15) | public ArrayStack() { method size (line 21) | public int size() { method isEmpty (line 26) | public boolean isEmpty() { method push (line 31) | public void push(int num) { method pop (line 36) | public int pop() { method peek (line 43) | public int peek() { method toArray (line 50) | public Object[] toArray() { class array_stack (line 55) | public class array_stack { method main (line 56) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_stack_and_queue/deque.java class deque (line 11) | public class deque { method main (line 12) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_stack_and_queue/linkedlist_deque.java class ListNode (line 12) | class ListNode { method ListNode (line 17) | ListNode(int val) { class LinkedListDeque (line 24) | class LinkedListDeque { method LinkedListDeque (line 28) | public LinkedListDeque() { method size (line 33) | public int size() { method isEmpty (line 38) | public boolean isEmpty() { method push (line 43) | private void push(int num, boolean isFront) { method pushFirst (line 65) | public void pushFirst(int num) { method pushLast (line 70) | public void pushLast(int num) { method pop (line 75) | private int pop(boolean isFront) { method popFirst (line 105) | public int popFirst() { method popLast (line 110) | public int popLast() { method peekFirst (line 115) | public int peekFirst() { method peekLast (line 122) | public int peekLast() { method toArray (line 129) | public int[] toArray() { class linkedlist_deque (line 140) | public class linkedlist_deque { method main (line 141) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_stack_and_queue/linkedlist_queue.java class LinkedListQueue (line 12) | class LinkedListQueue { method LinkedListQueue (line 16) | public LinkedListQueue() { method size (line 22) | public int size() { method isEmpty (line 27) | public boolean isEmpty() { method push (line 32) | public void push(int num) { method pop (line 48) | public int pop() { method peek (line 57) | public int peek() { method toArray (line 64) | public int[] toArray() { class linkedlist_queue (line 75) | public class linkedlist_queue { method main (line 76) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_stack_and_queue/linkedlist_stack.java class LinkedListStack (line 13) | class LinkedListStack { method LinkedListStack (line 17) | public LinkedListStack() { method size (line 22) | public int size() { method isEmpty (line 27) | public boolean isEmpty() { method push (line 32) | public void push(int num) { method pop (line 40) | public int pop() { method peek (line 48) | public int peek() { method toArray (line 55) | public int[] toArray() { class linkedlist_stack (line 66) | public class linkedlist_stack { method main (line 67) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_stack_and_queue/queue.java class queue (line 11) | public class queue { method main (line 12) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_stack_and_queue/stack.java class stack (line 11) | public class stack { method main (line 12) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_tree/array_binary_tree.java class ArrayBinaryTree (line 13) | class ArrayBinaryTree { method ArrayBinaryTree (line 17) | public ArrayBinaryTree(List arr) { method size (line 22) | public int size() { method val (line 27) | public Integer val(int i) { method left (line 35) | public Integer left(int i) { method right (line 40) | public Integer right(int i) { method parent (line 45) | public Integer parent(int i) { method levelOrder (line 50) | public List levelOrder() { method dfs (line 61) | private void dfs(Integer i, String order, List res) { method preOrder (line 79) | public List preOrder() { method inOrder (line 86) | public List inOrder() { method postOrder (line 93) | public List postOrder() { class array_binary_tree (line 100) | public class array_binary_tree { method main (line 101) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_tree/avl_tree.java class AVLTree (line 12) | class AVLTree { method height (line 16) | public int height(TreeNode node) { method updateHeight (line 22) | private void updateHeight(TreeNode node) { method balanceFactor (line 28) | public int balanceFactor(TreeNode node) { method rightRotate (line 37) | private TreeNode rightRotate(TreeNode node) { method leftRotate (line 51) | private TreeNode leftRotate(TreeNode node) { method rotate (line 65) | private TreeNode rotate(TreeNode node) { method insert (line 95) | public void insert(int val) { method insertHelper (line 100) | private TreeNode insertHelper(TreeNode node, int val) { method remove (line 118) | public void remove(int val) { method removeHelper (line 123) | private TreeNode removeHelper(TreeNode node, int val) { method search (line 158) | public TreeNode search(int val) { class avl_tree (line 177) | public class avl_tree { method testInsert (line 178) | static void testInsert(AVLTree tree, int val) { method testRemove (line 184) | static void testRemove(AVLTree tree, int val) { method main (line 190) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_tree/binary_search_tree.java class BinarySearchTree (line 12) | class BinarySearchTree { method BinarySearchTree (line 16) | public BinarySearchTree() { method getRoot (line 22) | public TreeNode getRoot() { method search (line 27) | public TreeNode search(int num) { method insert (line 46) | public void insert(int num) { method remove (line 75) | public void remove(int num) { class binary_search_tree (line 126) | public class binary_search_tree { method main (line 127) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_tree/binary_tree.java class binary_tree (line 11) | public class binary_tree { method main (line 12) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_tree/binary_tree_bfs.java class binary_tree_bfs (line 12) | public class binary_tree_bfs { method levelOrder (line 14) | static List levelOrder(TreeNode root) { method main (line 31) | public static void main(String[] args) { FILE: zh-hant/codes/java/chapter_tree/binary_tree_dfs.java class binary_tree_dfs (line 12) | public class binary_tree_dfs { method preOrder (line 17) | static void preOrder(TreeNode root) { method inOrder (line 27) | static void inOrder(TreeNode root) { method postOrder (line 37) | static void postOrder(TreeNode root) { method main (line 46) | public static void main(String[] args) { FILE: zh-hant/codes/java/utils/ListNode.java class ListNode (line 10) | public class ListNode { method ListNode (line 14) | public ListNode(int x) { method arrToLinkedList (line 19) | public static ListNode arrToLinkedList(int[] arr) { FILE: zh-hant/codes/java/utils/PrintUtil.java class Trunk (line 11) | class Trunk { method Trunk (line 15) | Trunk(Trunk prev, String str) { class PrintUtil (line 21) | public class PrintUtil { method printMatrix (line 23) | public static void printMatrix(T[][] matrix) { method printMatrix (line 32) | public static void printMatrix(List> matrix) { method printLinkedList (line 41) | public static void printLinkedList(ListNode head) { method printTree (line 51) | public static void printTree(TreeNode root) { method printTree (line 60) | public static void printTree(TreeNode root, Trunk prev, boolean isRigh... method showTrunks (line 91) | public static void showTrunks(Trunk p) { method printHashMap (line 101) | public static void printHashMap(Map map) { method printHeap (line 108) | public static void printHeap(Queue queue) { FILE: zh-hant/codes/java/utils/TreeNode.java class TreeNode (line 12) | public class TreeNode { method TreeNode (line 19) | public TreeNode(int x) { method listToTreeDFS (line 40) | private static TreeNode listToTreeDFS(List arr, int i) { method listToTree (line 51) | public static TreeNode listToTree(List arr) { method treeToListDFS (line 56) | private static void treeToListDFS(TreeNode root, int i, List ... method treeToList (line 68) | public static List treeToList(TreeNode root) { FILE: zh-hant/codes/java/utils/Vertex.java class Vertex (line 12) | public class Vertex { method Vertex (line 15) | public Vertex(int val) { method valsToVets (line 20) | public static Vertex[] valsToVets(int[] vals) { method vetsToVals (line 29) | public static List vetsToVals(List vets) { FILE: zh-hant/codes/javascript/chapter_array_and_linkedlist/array.js function randomAccess (line 8) | function randomAccess(nums) { function extend (line 19) | function extend(nums, enlarge) { function insert (line 31) | function insert(nums, num, index) { function remove (line 41) | function remove(nums, index) { function traverse (line 49) | function traverse(nums) { function find (line 62) | function find(nums, target) { FILE: zh-hant/codes/javascript/chapter_array_and_linkedlist/linked_list.js function insert (line 11) | function insert(n0, P) { function remove (line 18) | function remove(n0) { function access (line 27) | function access(head, index) { function find (line 38) | function find(head, target) { FILE: zh-hant/codes/javascript/chapter_array_and_linkedlist/my_list.js class MyList (line 8) | class MyList { method constructor (line 15) | constructor() { method size (line 20) | size() { method capacity (line 25) | capacity() { method get (line 30) | get(index) { method set (line 37) | set(index, num) { method add (line 43) | add(num) { method insert (line 54) | insert(index, num) { method remove (line 70) | remove(index) { method extendCapacity (line 84) | extendCapacity() { method toArray (line 94) | toArray() { FILE: zh-hant/codes/javascript/chapter_backtracking/n_queens.js function backtrack (line 8) | function backtrack(row, n, state, res, cols, diags1, diags2) { function nQueens (line 34) | function nQueens(n) { FILE: zh-hant/codes/javascript/chapter_backtracking/permutations_i.js function backtrack (line 8) | function backtrack(state, choices, selected, res) { function permutationsI (line 31) | function permutationsI(nums) { FILE: zh-hant/codes/javascript/chapter_backtracking/permutations_ii.js function backtrack (line 8) | function backtrack(state, choices, selected, res) { function permutationsII (line 33) | function permutationsII(nums) { FILE: zh-hant/codes/javascript/chapter_backtracking/preorder_traversal_i_compact.js function preOrder (line 11) | function preOrder(root, res) { FILE: zh-hant/codes/javascript/chapter_backtracking/preorder_traversal_ii_compact.js function preOrder (line 11) | function preOrder(root, path, res) { FILE: zh-hant/codes/javascript/chapter_backtracking/preorder_traversal_iii_compact.js function preOrder (line 11) | function preOrder(root, path, res) { FILE: zh-hant/codes/javascript/chapter_backtracking/preorder_traversal_iii_template.js function isSolution (line 11) | function isSolution(state) { function recordSolution (line 16) | function recordSolution(state, res) { function isValid (line 21) | function isValid(state, choice) { function makeChoice (line 26) | function makeChoice(state, choice) { function undoChoice (line 31) | function undoChoice(state) { function backtrack (line 36) | function backtrack(state, choices, res) { FILE: zh-hant/codes/javascript/chapter_backtracking/subset_sum_i.js function backtrack (line 8) | function backtrack(state, target, choices, start, res) { function subsetSumI (line 32) | function subsetSumI(nums, target) { FILE: zh-hant/codes/javascript/chapter_backtracking/subset_sum_i_naive.js function backtrack (line 8) | function backtrack(state, target, total, choices, res) { function subsetSumINaive (line 30) | function subsetSumINaive(nums, target) { FILE: zh-hant/codes/javascript/chapter_backtracking/subset_sum_ii.js function backtrack (line 8) | function backtrack(state, target, choices, start, res) { function subsetSumII (line 37) | function subsetSumII(nums, target) { FILE: zh-hant/codes/javascript/chapter_computational_complexity/iteration.js function forLoop (line 8) | function forLoop(n) { function whileLoop (line 18) | function whileLoop(n) { function whileLoopII (line 30) | function whileLoopII(n) { function nestedForLoop (line 44) | function nestedForLoop(n) { FILE: zh-hant/codes/javascript/chapter_computational_complexity/recursion.js function recur (line 8) | function recur(n) { function forLoopRecur (line 18) | function forLoopRecur(n) { function tailRecur (line 37) | function tailRecur(n, res) { function fib (line 45) | function fib(n) { FILE: zh-hant/codes/javascript/chapter_computational_complexity/space_complexity.js function constFunc (line 12) | function constFunc() { function constant (line 18) | function constant(n) { function linear (line 35) | function linear(n) { function linearRecur (line 51) | function linearRecur(n) { function quadratic (line 58) | function quadratic(n) { function quadraticRecur (line 75) | function quadraticRecur(n) { function buildTree (line 83) | function buildTree(n) { FILE: zh-hant/codes/javascript/chapter_computational_complexity/time_complexity.js function constant (line 8) | function constant(n) { function linear (line 16) | function linear(n) { function arrayTraversal (line 23) | function arrayTraversal(nums) { function quadratic (line 33) | function quadratic(n) { function bubbleSort (line 45) | function bubbleSort(nums) { function exponential (line 64) | function exponential(n) { function expRecur (line 79) | function expRecur(n) { function logarithmic (line 85) | function logarithmic(n) { function logRecur (line 95) | function logRecur(n) { function linearLogRecur (line 101) | function linearLogRecur(n) { function factorialRecur (line 111) | function factorialRecur(n) { FILE: zh-hant/codes/javascript/chapter_computational_complexity/worst_best_time_complexity.js function randomNumbers (line 8) | function randomNumbers(n) { function findOne (line 25) | function findOne(nums) { FILE: zh-hant/codes/javascript/chapter_divide_and_conquer/binary_search_recur.js function dfs (line 8) | function dfs(nums, target, i, j) { function binarySearch (line 28) | function binarySearch(nums, target) { FILE: zh-hant/codes/javascript/chapter_divide_and_conquer/build_tree.js function dfs (line 11) | function dfs(preorder, inorderMap, i, l, r) { function buildTree (line 27) | function buildTree(preorder, inorder) { FILE: zh-hant/codes/javascript/chapter_divide_and_conquer/hanota.js function move (line 8) | function move(src, tar) { function dfs (line 16) | function dfs(i, src, buf, tar) { function solveHanota (line 31) | function solveHanota(A, B, C) { FILE: zh-hant/codes/javascript/chapter_dynamic_programming/climbing_stairs_backtrack.js function backtrack (line 8) | function backtrack(choices, state, n, res) { function climbingStairsBacktrack (line 22) | function climbingStairsBacktrack(n) { FILE: zh-hant/codes/javascript/chapter_dynamic_programming/climbing_stairs_constraint_dp.js function climbingStairsConstraintDP (line 8) | function climbingStairsConstraintDP(n) { FILE: zh-hant/codes/javascript/chapter_dynamic_programming/climbing_stairs_dfs.js function dfs (line 8) | function dfs(i) { function climbingStairsDFS (line 17) | function climbingStairsDFS(n) { FILE: zh-hant/codes/javascript/chapter_dynamic_programming/climbing_stairs_dfs_mem.js function dfs (line 8) | function dfs(i, mem) { function climbingStairsDFSMem (line 21) | function climbingStairsDFSMem(n) { FILE: zh-hant/codes/javascript/chapter_dynamic_programming/climbing_stairs_dp.js function climbingStairsDP (line 8) | function climbingStairsDP(n) { function climbingStairsDPComp (line 23) | function climbingStairsDPComp(n) { FILE: zh-hant/codes/javascript/chapter_dynamic_programming/coin_change.js function coinChangeDP (line 8) | function coinChangeDP(coins, amt) { function coinChangeDPComp (line 35) | function coinChangeDPComp(coins, amt) { FILE: zh-hant/codes/javascript/chapter_dynamic_programming/coin_change_ii.js function coinChangeIIDP (line 8) | function coinChangeIIDP(coins, amt) { function coinChangeIIDPComp (line 34) | function coinChangeIIDPComp(coins, amt) { FILE: zh-hant/codes/javascript/chapter_dynamic_programming/edit_distance.js function editDistanceDFS (line 8) | function editDistanceDFS(s, t, i, j) { function editDistanceDFSMem (line 31) | function editDistanceDFSMem(s, t, mem, i, j) { function editDistanceDP (line 58) | function editDistanceDP(s, t) { function editDistanceDPComp (line 86) | function editDistanceDPComp(s, t) { FILE: zh-hant/codes/javascript/chapter_dynamic_programming/knapsack.js function knapsackDFS (line 8) | function knapsackDFS(wgt, val, i, c) { function knapsackDFSMem (line 25) | function knapsackDFSMem(wgt, val, mem, i, c) { function knapsackDP (line 48) | function knapsackDP(wgt, val, cap) { function knapsackDPComp (line 73) | function knapsackDPComp(wgt, val, cap) { FILE: zh-hant/codes/javascript/chapter_dynamic_programming/min_cost_climbing_stairs_dp.js function minCostClimbingStairsDP (line 8) | function minCostClimbingStairsDP(cost) { function minCostClimbingStairsDPComp (line 26) | function minCostClimbingStairsDPComp(cost) { FILE: zh-hant/codes/javascript/chapter_dynamic_programming/min_path_sum.js function minPathSumDFS (line 8) | function minPathSumDFS(grid, i, j) { function minPathSumDFSMem (line 25) | function minPathSumDFSMem(grid, mem, i, j) { function minPathSumDP (line 47) | function minPathSumDP(grid) { function minPathSumDPComp (line 73) | function minPathSumDPComp(grid) { FILE: zh-hant/codes/javascript/chapter_dynamic_programming/unbounded_knapsack.js function unboundedKnapsackDP (line 8) | function unboundedKnapsackDP(wgt, val, cap) { function unboundedKnapsackDPComp (line 33) | function unboundedKnapsackDPComp(wgt, val, cap) { FILE: zh-hant/codes/javascript/chapter_graph/graph_adjacency_list.js class GraphAdjList (line 10) | class GraphAdjList { method constructor (line 15) | constructor(edges) { method size (line 26) | size() { method addEdge (line 31) | addEdge(vet1, vet2) { method removeEdge (line 45) | removeEdge(vet1, vet2) { method addVertex (line 60) | addVertex(vet) { method removeVertex (line 67) | removeVertex(vet) { method print (line 83) | print() { FILE: zh-hant/codes/javascript/chapter_graph/graph_adjacency_matrix.js class GraphAdjMat (line 8) | class GraphAdjMat { method constructor (line 13) | constructor(vertices, edges) { method size (line 28) | size() { method addVertex (line 33) | addVertex(val) { method removeVertex (line 50) | removeVertex(index) { method addEdge (line 67) | addEdge(i, j) { method removeEdge (line 79) | removeEdge(i, j) { method print (line 89) | print() { FILE: zh-hant/codes/javascript/chapter_graph/graph_bfs.js function graphBFS (line 12) | function graphBFS(graph, startVet) { FILE: zh-hant/codes/javascript/chapter_graph/graph_dfs.js function dfs (line 12) | function dfs(graph, visited, res, vet) { function graphDFS (line 27) | function graphDFS(graph, startVet) { FILE: zh-hant/codes/javascript/chapter_greedy/coin_change_greedy.js function coinChangeGreedy (line 8) | function coinChangeGreedy(coins, amt) { FILE: zh-hant/codes/javascript/chapter_greedy/fractional_knapsack.js class Item (line 8) | class Item { method constructor (line 9) | constructor(w, v) { function fractionalKnapsack (line 16) | function fractionalKnapsack(wgt, val, cap) { FILE: zh-hant/codes/javascript/chapter_greedy/max_capacity.js function maxCapacity (line 8) | function maxCapacity(ht) { FILE: zh-hant/codes/javascript/chapter_greedy/max_product_cutting.js function maxProductCutting (line 8) | function maxProductCutting(n) { FILE: zh-hant/codes/javascript/chapter_hashing/array_hash_map.js class Pair (line 8) | class Pair { method constructor (line 9) | constructor(key, val) { class ArrayHashMap (line 16) | class ArrayHashMap { method constructor (line 18) | constructor() { method #hashFunc (line 24) | #hashFunc(key) { method get (line 29) | get(key) { method set (line 37) | set(key, val) { method delete (line 43) | delete(key) { method entries (line 50) | entries() { method keys (line 61) | keys() { method values (line 72) | values() { method print (line 83) | print() { FILE: zh-hant/codes/javascript/chapter_hashing/hash_map_chaining.js class Pair (line 8) | class Pair { method constructor (line 9) | constructor(key, val) { class HashMapChaining (line 16) | class HashMapChaining { method constructor (line 24) | constructor() { method #hashFunc (line 33) | #hashFunc(key) { method #loadFactor (line 38) | #loadFactor() { method get (line 43) | get(key) { method put (line 57) | put(key, val) { method remove (line 78) | remove(key) { method #extend (line 92) | #extend() { method print (line 108) | print() { FILE: zh-hant/codes/javascript/chapter_hashing/hash_map_open_addressing.js class Pair (line 8) | class Pair { method constructor (line 9) | constructor(key, val) { class HashMapOpenAddressing (line 16) | class HashMapOpenAddressing { method constructor (line 25) | constructor() { method #hashFunc (line 35) | #hashFunc(key) { method #loadFactor (line 40) | #loadFactor() { method #findBucket (line 45) | #findBucket(key) { method get (line 75) | get(key) { method put (line 90) | put(key, val) { method remove (line 111) | remove(key) { method #extend (line 125) | #extend() { method print (line 141) | print() { FILE: zh-hant/codes/javascript/chapter_hashing/simple_hash.js function addHash (line 8) | function addHash(key) { function mulHash (line 18) | function mulHash(key) { function xorHash (line 28) | function xorHash(key) { function rotHash (line 38) | function rotHash(key) { FILE: zh-hant/codes/javascript/chapter_heap/my_heap.js class MaxHeap (line 10) | class MaxHeap { method constructor (line 14) | constructor(nums) { method #left (line 24) | #left(i) { method #right (line 29) | #right(i) { method #parent (line 34) | #parent(i) { method #swap (line 39) | #swap(i, j) { method size (line 46) | size() { method isEmpty (line 51) | isEmpty() { method peek (line 56) | peek() { method push (line 61) | push(val) { method #siftUp (line 69) | #siftUp(i) { method pop (line 83) | pop() { method #siftDown (line 97) | #siftDown(i) { method print (line 115) | print() { method getMaxHeap (line 120) | getMaxHeap() { FILE: zh-hant/codes/javascript/chapter_heap/top_k.js function pushMinHeap (line 10) | function pushMinHeap(maxHeap, val) { function popMinHeap (line 16) | function popMinHeap(maxHeap) { function peekMinHeap (line 22) | function peekMinHeap(maxHeap) { function getMinHeap (line 28) | function getMinHeap(maxHeap) { function topKHeap (line 34) | function topKHeap(nums, k) { FILE: zh-hant/codes/javascript/chapter_searching/binary_search.js function binarySearch (line 8) | function binarySearch(nums, target) { function binarySearchLCRO (line 29) | function binarySearchLCRO(nums, target) { FILE: zh-hant/codes/javascript/chapter_searching/binary_search_edge.js function binarySearchLeftEdge (line 10) | function binarySearchLeftEdge(nums, target) { function binarySearchRightEdge (line 22) | function binarySearchRightEdge(nums, target) { FILE: zh-hant/codes/javascript/chapter_searching/binary_search_insertion.js function binarySearchInsertionSimple (line 8) | function binarySearchInsertionSimple(nums, target) { function binarySearchInsertion (line 26) | function binarySearchInsertion(nums, target) { FILE: zh-hant/codes/javascript/chapter_searching/hashing_search.js function hashingSearchArray (line 10) | function hashingSearchArray(map, target) { function hashingSearchLinkedList (line 17) | function hashingSearchLinkedList(map, target) { FILE: zh-hant/codes/javascript/chapter_searching/linear_search.js function linearSearchArray (line 10) | function linearSearchArray(nums, target) { function linearSearchLinkedList (line 23) | function linearSearchLinkedList(head, target) { FILE: zh-hant/codes/javascript/chapter_searching/two_sum.js function twoSumBruteForce (line 8) | function twoSumBruteForce(nums, target) { function twoSumHashTable (line 22) | function twoSumHashTable(nums, target) { FILE: zh-hant/codes/javascript/chapter_sorting/bubble_sort.js function bubbleSort (line 8) | function bubbleSort(nums) { function bubbleSortWithFlag (line 24) | function bubbleSortWithFlag(nums) { FILE: zh-hant/codes/javascript/chapter_sorting/bucket_sort.js function bucketSort (line 8) | function bucketSort(nums) { FILE: zh-hant/codes/javascript/chapter_sorting/counting_sort.js function countingSortNaive (line 9) | function countingSortNaive(nums) { function countingSort (line 29) | function countingSort(nums) { FILE: zh-hant/codes/javascript/chapter_sorting/heap_sort.js function siftDown (line 8) | function siftDown(nums, n, i) { function heapSort (line 32) | function heapSort(nums) { FILE: zh-hant/codes/javascript/chapter_sorting/insertion_sort.js function insertionSort (line 8) | function insertionSort(nums) { FILE: zh-hant/codes/javascript/chapter_sorting/merge_sort.js function merge (line 8) | function merge(nums, left, mid, right) { function mergeSort (line 38) | function mergeSort(nums, left, right) { FILE: zh-hant/codes/javascript/chapter_sorting/quick_sort.js class QuickSort (line 8) | class QuickSort { method swap (line 10) | swap(nums, i, j) { method partition (line 17) | partition(nums, left, right) { method quickSort (line 36) | quickSort(nums, left, right) { class QuickSortMedian (line 48) | class QuickSortMedian { method swap (line 50) | swap(nums, i, j) { method medianThree (line 57) | medianThree(nums, left, mid, right) { method partition (line 69) | partition(nums, left, right) { method quickSort (line 92) | quickSort(nums, left, right) { class QuickSortTailCall (line 104) | class QuickSortTailCall { method swap (line 106) | swap(nums, i, j) { method partition (line 113) | partition(nums, left, right) { method quickSort (line 127) | quickSort(nums, left, right) { FILE: zh-hant/codes/javascript/chapter_sorting/radix_sort.js function digit (line 8) | function digit(num, exp) { function countingSortDigit (line 14) | function countingSortDigit(nums, exp) { function radixSort (line 42) | function radixSort(nums) { FILE: zh-hant/codes/javascript/chapter_sorting/selection_sort.js function selectionSort (line 8) | function selectionSort(nums) { FILE: zh-hant/codes/javascript/chapter_stack_and_queue/array_deque.js class ArrayDeque (line 8) | class ArrayDeque { method constructor (line 14) | constructor(capacity) { method capacity (line 21) | capacity() { method size (line 26) | size() { method isEmpty (line 31) | isEmpty() { method index (line 36) | index(i) { method pushFirst (line 44) | pushFirst(num) { method pushLast (line 58) | pushLast(num) { method popFirst (line 71) | popFirst() { method popLast (line 80) | popLast() { method peekFirst (line 87) | peekFirst() { method peekLast (line 93) | peekLast() { method toArray (line 101) | toArray() { FILE: zh-hant/codes/javascript/chapter_stack_and_queue/array_queue.js class ArrayQueue (line 8) | class ArrayQueue { method constructor (line 13) | constructor(capacity) { method capacity (line 18) | get capacity() { method size (line 23) | get size() { method isEmpty (line 28) | isEmpty() { method push (line 33) | push(num) { method pop (line 47) | pop() { method peek (line 56) | peek() { method toArray (line 62) | toArray() { FILE: zh-hant/codes/javascript/chapter_stack_and_queue/array_stack.js class ArrayStack (line 8) | class ArrayStack { method constructor (line 10) | constructor() { method size (line 15) | get size() { method isEmpty (line 20) | isEmpty() { method push (line 25) | push(num) { method pop (line 30) | pop() { method top (line 36) | top() { method toArray (line 42) | toArray() { FILE: zh-hant/codes/javascript/chapter_stack_and_queue/linkedlist_deque.js class ListNode (line 8) | class ListNode { method constructor (line 13) | constructor(val) { class LinkedListDeque (line 21) | class LinkedListDeque { method constructor (line 26) | constructor() { method pushLast (line 33) | pushLast(val) { method pushFirst (line 49) | pushFirst(val) { method popLast (line 65) | popLast() { method popFirst (line 82) | popFirst() { method peekLast (line 99) | peekLast() { method peekFirst (line 104) | peekFirst() { method size (line 109) | size() { method isEmpty (line 114) | isEmpty() { method print (line 119) | print() { FILE: zh-hant/codes/javascript/chapter_stack_and_queue/linkedlist_queue.js class LinkedListQueue (line 10) | class LinkedListQueue { method constructor (line 15) | constructor() { method size (line 21) | get size() { method isEmpty (line 26) | isEmpty() { method push (line 31) | push(num) { method pop (line 47) | pop() { method peek (line 56) | peek() { method toArray (line 62) | toArray() { FILE: zh-hant/codes/javascript/chapter_stack_and_queue/linkedlist_stack.js class LinkedListStack (line 10) | class LinkedListStack { method constructor (line 14) | constructor() { method size (line 19) | get size() { method isEmpty (line 24) | isEmpty() { method push (line 29) | push(num) { method pop (line 37) | pop() { method peek (line 45) | peek() { method toArray (line 51) | toArray() { FILE: zh-hant/codes/javascript/chapter_tree/array_binary_tree.js class ArrayBinaryTree (line 11) | class ArrayBinaryTree { method constructor (line 15) | constructor(arr) { method size (line 20) | size() { method val (line 25) | val(i) { method left (line 32) | left(i) { method right (line 37) | right(i) { method parent (line 42) | parent(i) { method levelOrder (line 47) | levelOrder() { method #dfs (line 57) | #dfs(i, order, res) { method preOrder (line 71) | preOrder() { method inOrder (line 78) | inOrder() { method postOrder (line 85) | postOrder() { FILE: zh-hant/codes/javascript/chapter_tree/avl_tree.js class AVLTree (line 11) | class AVLTree { method constructor (line 13) | constructor() { method height (line 18) | height(node) { method #updateHeight (line 24) | #updateHeight(node) { method balanceFactor (line 31) | balanceFactor(node) { method #rightRotate (line 39) | #rightRotate(node) { method #leftRotate (line 53) | #leftRotate(node) { method #rotate (line 67) | #rotate(node) { method insert (line 97) | insert(val) { method #insertHelper (line 102) | #insertHelper(node, val) { method remove (line 117) | remove(val) { method #removeHelper (line 122) | #removeHelper(node, val) { method search (line 153) | search(val) { function testInsert (line 169) | function testInsert(tree, val) { function testRemove (line 175) | function testRemove(tree, val) { FILE: zh-hant/codes/javascript/chapter_tree/binary_search_tree.js class BinarySearchTree (line 11) | class BinarySearchTree { method constructor (line 13) | constructor() { method getRoot (line 19) | getRoot() { method search (line 24) | search(num) { method insert (line 40) | insert(num) { method remove (line 65) | remove(num) { FILE: zh-hant/codes/javascript/chapter_tree/binary_tree_bfs.js function levelOrder (line 11) | function levelOrder(root) { FILE: zh-hant/codes/javascript/chapter_tree/binary_tree_dfs.js function preOrder (line 14) | function preOrder(root) { function inOrder (line 23) | function inOrder(root) { function postOrder (line 32) | function postOrder(root) { FILE: zh-hant/codes/javascript/modules/ListNode.js class ListNode (line 8) | class ListNode { method constructor (line 11) | constructor(val, next) { function arrToLinkedList (line 18) | function arrToLinkedList(arr) { FILE: zh-hant/codes/javascript/modules/PrintUtil.js function printLinkedList (line 10) | function printLinkedList(head) { function Trunk (line 19) | function Trunk(prev, str) { function printTree (line 29) | function printTree(root) { function printTree (line 34) | function printTree(root, prev, isRight) { function showTrunks (line 65) | function showTrunks(p) { function printHeap (line 75) | function printHeap(arr) { FILE: zh-hant/codes/javascript/modules/TreeNode.js class TreeNode (line 8) | class TreeNode { method constructor (line 13) | constructor(val, left, right, height) { function arrToTree (line 22) | function arrToTree(arr, i = 0) { FILE: zh-hant/codes/javascript/modules/Vertex.js class Vertex (line 8) | class Vertex { method constructor (line 10) | constructor(val) { method valsToVets (line 15) | static valsToVets(vals) { method vetsToVals (line 24) | static vetsToVals(vets) { FILE: zh-hant/codes/python/chapter_array_and_linkedlist/array.py function random_access (line 10) | def random_access(nums: list[int]) -> int: function extend (line 21) | def extend(nums: list[int], enlarge: int) -> list[int]: function insert (line 32) | def insert(nums: list[int], num: int, index: int): function remove (line 41) | def remove(nums: list[int], index: int): function traverse (line 48) | def traverse(nums: list[int]): function find (line 63) | def find(nums: list[int], target: int) -> int: FILE: zh-hant/codes/python/chapter_array_and_linkedlist/linked_list.py function insert (line 14) | def insert(n0: ListNode, P: ListNode): function remove (line 21) | def remove(n0: ListNode): function access (line 31) | def access(head: ListNode, index: int) -> ListNode | None: function find (line 40) | def find(head: ListNode, target: int) -> int: FILE: zh-hant/codes/python/chapter_array_and_linkedlist/my_list.py class MyList (line 8) | class MyList: method __init__ (line 11) | def __init__(self): method size (line 18) | def size(self) -> int: method capacity (line 22) | def capacity(self) -> int: method get (line 26) | def get(self, index: int) -> int: method set (line 33) | def set(self, num: int, index: int): method add (line 39) | def add(self, num: int): method insert (line 47) | def insert(self, num: int, index: int): method remove (line 61) | def remove(self, index: int) -> int: method extend_capacity (line 74) | def extend_capacity(self): method to_array (line 81) | def to_array(self) -> list[int]: FILE: zh-hant/codes/python/chapter_backtracking/n_queens.py function backtrack (line 8) | def backtrack( function n_queens (line 39) | def n_queens(n: int) -> list[list[list[str]]]: FILE: zh-hant/codes/python/chapter_backtracking/permutations_i.py function backtrack (line 8) | def backtrack( function permutations_i (line 30) | def permutations_i(nums: list[int]) -> list[list[int]]: FILE: zh-hant/codes/python/chapter_backtracking/permutations_ii.py function backtrack (line 8) | def backtrack( function permutations_ii (line 32) | def permutations_ii(nums: list[int]) -> list[list[int]]: FILE: zh-hant/codes/python/chapter_backtracking/preorder_traversal_i_compact.py function pre_order (line 14) | def pre_order(root: TreeNode): FILE: zh-hant/codes/python/chapter_backtracking/preorder_traversal_ii_compact.py function pre_order (line 14) | def pre_order(root: TreeNode): FILE: zh-hant/codes/python/chapter_backtracking/preorder_traversal_iii_compact.py function pre_order (line 14) | def pre_order(root: TreeNode): FILE: zh-hant/codes/python/chapter_backtracking/preorder_traversal_iii_template.py function is_solution (line 14) | def is_solution(state: list[TreeNode]) -> bool: function record_solution (line 19) | def record_solution(state: list[TreeNode], res: list[list[TreeNode]]): function is_valid (line 24) | def is_valid(state: list[TreeNode], choice: TreeNode) -> bool: function make_choice (line 29) | def make_choice(state: list[TreeNode], choice: TreeNode): function undo_choice (line 34) | def undo_choice(state: list[TreeNode], choice: TreeNode): function backtrack (line 39) | def backtrack( FILE: zh-hant/codes/python/chapter_backtracking/subset_sum_i.py function backtrack (line 8) | def backtrack( function subset_sum_i (line 31) | def subset_sum_i(nums: list[int], target: int) -> list[list[int]]: FILE: zh-hant/codes/python/chapter_backtracking/subset_sum_i_naive.py function backtrack (line 8) | def backtrack( function subset_sum_i_naive (line 33) | def subset_sum_i_naive(nums: list[int], target: int) -> list[list[int]]: FILE: zh-hant/codes/python/chapter_backtracking/subset_sum_ii.py function backtrack (line 8) | def backtrack( function subset_sum_ii (line 35) | def subset_sum_ii(nums: list[int], target: int) -> list[list[int]]: FILE: zh-hant/codes/python/chapter_computational_complexity/iteration.py function for_loop (line 8) | def for_loop(n: int) -> int: function while_loop (line 17) | def while_loop(n: int) -> int: function while_loop_ii (line 28) | def while_loop_ii(n: int) -> int: function nested_for_loop (line 41) | def nested_for_loop(n: int) -> str: FILE: zh-hant/codes/python/chapter_computational_complexity/recursion.py function recur (line 8) | def recur(n: int) -> int: function for_loop_recur (line 19) | def for_loop_recur(n: int) -> int: function tail_recur (line 36) | def tail_recur(n, res): function fib (line 45) | def fib(n: int) -> int: FILE: zh-hant/codes/python/chapter_computational_complexity/space_complexity.py function function (line 14) | def function() -> int: function constant (line 20) | def constant(n: int): function linear (line 34) | def linear(n: int): function linear_recur (line 44) | def linear_recur(n: int): function quadratic (line 52) | def quadratic(n: int): function quadratic_recur (line 58) | def quadratic_recur(n: int) -> int: function build_tree (line 67) | def build_tree(n: int) -> TreeNode | None: FILE: zh-hant/codes/python/chapter_computational_complexity/time_complexity.py function constant (line 8) | def constant(n: int) -> int: function linear (line 17) | def linear(n: int) -> int: function array_traversal (line 25) | def array_traversal(nums: list[int]) -> int: function quadratic (line 34) | def quadratic(n: int) -> int: function bubble_sort (line 44) | def bubble_sort(nums: list[int]) -> int: function exponential (line 60) | def exponential(n: int) -> int: function exp_recur (line 73) | def exp_recur(n: int) -> int: function logarithmic (line 80) | def logarithmic(n: int) -> int: function log_recur (line 89) | def log_recur(n: int) -> int: function linear_log_recur (line 96) | def linear_log_recur(n: int) -> int: function factorial_recur (line 108) | def factorial_recur(n: int) -> int: FILE: zh-hant/codes/python/chapter_computational_complexity/worst_best_time_complexity.py function random_numbers (line 10) | def random_numbers(n: int) -> list[int]: function find_one (line 19) | def find_one(nums: list[int]) -> int: FILE: zh-hant/codes/python/chapter_divide_and_conquer/binary_search_recur.py function dfs (line 8) | def dfs(nums: list[int], target: int, i: int, j: int) -> int: function binary_search (line 26) | def binary_search(nums: list[int], target: int) -> int: FILE: zh-hant/codes/python/chapter_divide_and_conquer/build_tree.py function dfs (line 14) | def dfs( function build_tree (line 37) | def build_tree(preorder: list[int], inorder: list[int]) -> TreeNode | None: FILE: zh-hant/codes/python/chapter_divide_and_conquer/hanota.py function move (line 8) | def move(src: list[int], tar: list[int]): function dfs (line 16) | def dfs(i: int, src: list[int], buf: list[int], tar: list[int]): function solve_hanota (line 30) | def solve_hanota(A: list[int], B: list[int], C: list[int]): FILE: zh-hant/codes/python/chapter_dynamic_programming/climbing_stairs_backtrack.py function backtrack (line 8) | def backtrack(choices: list[int], state: int, n: int, res: list[int]) ->... function climbing_stairs_backtrack (line 23) | def climbing_stairs_backtrack(n: int) -> int: FILE: zh-hant/codes/python/chapter_dynamic_programming/climbing_stairs_constraint_dp.py function climbing_stairs_constraint_dp (line 8) | def climbing_stairs_constraint_dp(n: int) -> int: FILE: zh-hant/codes/python/chapter_dynamic_programming/climbing_stairs_dfs.py function dfs (line 8) | def dfs(i: int) -> int: function climbing_stairs_dfs (line 18) | def climbing_stairs_dfs(n: int) -> int: FILE: zh-hant/codes/python/chapter_dynamic_programming/climbing_stairs_dfs_mem.py function dfs (line 8) | def dfs(i: int, mem: list[int]) -> int: function climbing_stairs_dfs_mem (line 23) | def climbing_stairs_dfs_mem(n: int) -> int: FILE: zh-hant/codes/python/chapter_dynamic_programming/climbing_stairs_dp.py function climbing_stairs_dp (line 8) | def climbing_stairs_dp(n: int) -> int: function climbing_stairs_dp_comp (line 22) | def climbing_stairs_dp_comp(n: int) -> int: FILE: zh-hant/codes/python/chapter_dynamic_programming/coin_change.py function coin_change_dp (line 8) | def coin_change_dp(coins: list[int], amt: int) -> int: function coin_change_dp_comp (line 29) | def coin_change_dp_comp(coins: list[int], amt: int) -> int: FILE: zh-hant/codes/python/chapter_dynamic_programming/coin_change_ii.py function coin_change_ii_dp (line 8) | def coin_change_ii_dp(coins: list[int], amt: int) -> int: function coin_change_ii_dp_comp (line 28) | def coin_change_ii_dp_comp(coins: list[int], amt: int) -> int: FILE: zh-hant/codes/python/chapter_dynamic_programming/edit_distance.py function edit_distance_dfs (line 8) | def edit_distance_dfs(s: str, t: str, i: int, j: int) -> int: function edit_distance_dfs_mem (line 30) | def edit_distance_dfs_mem(s: str, t: str, mem: list[list[int]], i: int, ... function edit_distance_dp (line 56) | def edit_distance_dp(s: str, t: str) -> int: function edit_distance_dp_comp (line 77) | def edit_distance_dp_comp(s: str, t: str) -> int: FILE: zh-hant/codes/python/chapter_dynamic_programming/knapsack.py function knapsack_dfs (line 8) | def knapsack_dfs(wgt: list[int], val: list[int], i: int, c: int) -> int: function knapsack_dfs_mem (line 23) | def knapsack_dfs_mem( function knapsack_dp (line 44) | def knapsack_dp(wgt: list[int], val: list[int], cap: int) -> int: function knapsack_dp_comp (line 61) | def knapsack_dp_comp(wgt: list[int], val: list[int], cap: int) -> int: FILE: zh-hant/codes/python/chapter_dynamic_programming/min_cost_climbing_stairs_dp.py function min_cost_climbing_stairs_dp (line 8) | def min_cost_climbing_stairs_dp(cost: list[int]) -> int: function min_cost_climbing_stairs_dp_comp (line 23) | def min_cost_climbing_stairs_dp_comp(cost: list[int]) -> int: FILE: zh-hant/codes/python/chapter_dynamic_programming/min_path_sum.py function min_path_sum_dfs (line 10) | def min_path_sum_dfs(grid: list[list[int]], i: int, j: int) -> int: function min_path_sum_dfs_mem (line 25) | def min_path_sum_dfs_mem( function min_path_sum_dp (line 46) | def min_path_sum_dp(grid: list[list[int]]) -> int: function min_path_sum_dp_comp (line 65) | def min_path_sum_dp_comp(grid: list[list[int]]) -> int: FILE: zh-hant/codes/python/chapter_dynamic_programming/unbounded_knapsack.py function unbounded_knapsack_dp (line 8) | def unbounded_knapsack_dp(wgt: list[int], val: list[int], cap: int) -> int: function unbounded_knapsack_dp_comp (line 25) | def unbounded_knapsack_dp_comp(wgt: list[int], val: list[int], cap: int)... FILE: zh-hant/codes/python/chapter_graph/graph_adjacency_list.py class GraphAdjList (line 14) | class GraphAdjList: method __init__ (line 17) | def __init__(self, edges: list[list[Vertex]]): method size (line 27) | def size(self) -> int: method add_edge (line 31) | def add_edge(self, vet1: Vertex, vet2: Vertex): method remove_edge (line 39) | def remove_edge(self, vet1: Vertex, vet2: Vertex): method add_vertex (line 47) | def add_vertex(self, vet: Vertex): method remove_vertex (line 54) | def remove_vertex(self, vet: Vertex): method print (line 65) | def print(self): FILE: zh-hant/codes/python/chapter_graph/graph_adjacency_matrix.py class GraphAdjMat (line 14) | class GraphAdjMat: method __init__ (line 17) | def __init__(self, vertices: list[int], edges: list[list[int]]): method size (line 31) | def size(self) -> int: method add_vertex (line 35) | def add_vertex(self, val: int): method remove_vertex (line 47) | def remove_vertex(self, index: int): method add_edge (line 59) | def add_edge(self, i: int, j: int): method remove_edge (line 69) | def remove_edge(self, i: int, j: int): method print (line 78) | def print(self): FILE: zh-hant/codes/python/chapter_graph/graph_bfs.py function graph_bfs (line 16) | def graph_bfs(graph: GraphAdjList, start_vet: Vertex) -> list[Vertex]: FILE: zh-hant/codes/python/chapter_graph/graph_dfs.py function dfs (line 15) | def dfs(graph: GraphAdjList, visited: set[Vertex], res: list[Vertex], ve... function graph_dfs (line 27) | def graph_dfs(graph: GraphAdjList, start_vet: Vertex) -> list[Vertex]: FILE: zh-hant/codes/python/chapter_greedy/coin_change_greedy.py function coin_change_greedy (line 8) | def coin_change_greedy(coins: list[int], amt: int) -> int: FILE: zh-hant/codes/python/chapter_greedy/fractional_knapsack.py class Item (line 8) | class Item: method __init__ (line 11) | def __init__(self, w: int, v: int): function fractional_knapsack (line 16) | def fractional_knapsack(wgt: list[int], val: list[int], cap: int) -> int: FILE: zh-hant/codes/python/chapter_greedy/max_capacity.py function max_capacity (line 8) | def max_capacity(ht: list[int]) -> int: FILE: zh-hant/codes/python/chapter_greedy/max_product_cutting.py function max_product_cutting (line 10) | def max_product_cutting(n: int) -> int: FILE: zh-hant/codes/python/chapter_hashing/array_hash_map.py class Pair (line 8) | class Pair: method __init__ (line 11) | def __init__(self, key: int, val: str): class ArrayHashMap (line 16) | class ArrayHashMap: method __init__ (line 19) | def __init__(self): method hash_func (line 24) | def hash_func(self, key: int) -> int: method get (line 29) | def get(self, key: int) -> str | None: method put (line 37) | def put(self, key: int, val: str): method remove (line 43) | def remove(self, key: int): method entry_set (line 49) | def entry_set(self) -> list[Pair]: method key_set (line 57) | def key_set(self) -> list[int]: method value_set (line 65) | def value_set(self) -> list[str]: method print (line 73) | def print(self): FILE: zh-hant/codes/python/chapter_hashing/hash_map_chaining.py class HashMapChaining (line 14) | class HashMapChaining: method __init__ (line 17) | def __init__(self): method hash_func (line 25) | def hash_func(self, key: int) -> int: method load_factor (line 29) | def load_factor(self) -> float: method get (line 33) | def get(self, key: int) -> str | None: method put (line 44) | def put(self, key: int, val: str): method remove (line 61) | def remove(self, key: int): method extend (line 72) | def extend(self): method print (line 85) | def print(self): FILE: zh-hant/codes/python/chapter_hashing/hash_map_open_addressing.py class HashMapOpenAddressing (line 14) | class HashMapOpenAddressing: method __init__ (line 17) | def __init__(self): method hash_func (line 26) | def hash_func(self, key: int) -> int: method load_factor (line 30) | def load_factor(self) -> float: method find_bucket (line 34) | def find_bucket(self, key: int) -> int: method get (line 56) | def get(self, key: int) -> str: method put (line 66) | def put(self, key: int, val: str): method remove (line 81) | def remove(self, key: int): method extend (line 90) | def extend(self): method print (line 103) | def print(self): FILE: zh-hant/codes/python/chapter_hashing/simple_hash.py function add_hash (line 8) | def add_hash(key: str) -> int: function mul_hash (line 17) | def mul_hash(key: str) -> int: function xor_hash (line 26) | def xor_hash(key: str) -> int: function rot_hash (line 35) | def rot_hash(key: str) -> int: FILE: zh-hant/codes/python/chapter_heap/heap.py function test_push (line 16) | def test_push(heap: list, val: int, flag: int = 1): function test_pop (line 22) | def test_pop(heap: list, flag: int = 1): FILE: zh-hant/codes/python/chapter_heap/my_heap.py class MaxHeap (line 14) | class MaxHeap: method __init__ (line 17) | def __init__(self, nums: list[int]): method left (line 25) | def left(self, i: int) -> int: method right (line 29) | def right(self, i: int) -> int: method parent (line 33) | def parent(self, i: int) -> int: method swap (line 37) | def swap(self, i: int, j: int): method size (line 41) | def size(self) -> int: method is_empty (line 45) | def is_empty(self) -> bool: method peek (line 49) | def peek(self) -> int: method push (line 53) | def push(self, val: int): method sift_up (line 60) | def sift_up(self, i: int): method pop (line 73) | def pop(self) -> int: method sift_down (line 87) | def sift_down(self, i: int): method print (line 104) | def print(self): FILE: zh-hant/codes/python/chapter_heap/top_k.py function top_k_heap (line 16) | def top_k_heap(nums: list[int], k: int) -> list[int]: FILE: zh-hant/codes/python/chapter_searching/binary_search.py function binary_search (line 8) | def binary_search(nums: list[int], target: int) -> int: function binary_search_lcro (line 25) | def binary_search_lcro(nums: list[int], target: int) -> int: FILE: zh-hant/codes/python/chapter_searching/binary_search_edge.py function binary_search_left_edge (line 14) | def binary_search_left_edge(nums: list[int], target: int) -> int: function binary_search_right_edge (line 25) | def binary_search_right_edge(nums: list[int], target: int) -> int: FILE: zh-hant/codes/python/chapter_searching/binary_search_insertion.py function binary_search_insertion_simple (line 8) | def binary_search_insertion_simple(nums: list[int], target: int) -> int: function binary_search_insertion (line 23) | def binary_search_insertion(nums: list[int], target: int) -> int: FILE: zh-hant/codes/python/chapter_searching/hashing_search.py function hashing_search_array (line 14) | def hashing_search_array(hmap: dict[int, int], target: int) -> int: function hashing_search_linkedlist (line 21) | def hashing_search_linkedlist( FILE: zh-hant/codes/python/chapter_searching/linear_search.py function linear_search_array (line 14) | def linear_search_array(nums: list[int], target: int) -> int: function linear_search_linkedlist (line 23) | def linear_search_linkedlist(head: ListNode, target: int) -> ListNode | ... FILE: zh-hant/codes/python/chapter_searching/two_sum.py function two_sum_brute_force (line 8) | def two_sum_brute_force(nums: list[int], target: int) -> list[int]: function two_sum_hash_table (line 18) | def two_sum_hash_table(nums: list[int], target: int) -> list[int]: FILE: zh-hant/codes/python/chapter_sorting/bubble_sort.py function bubble_sort (line 8) | def bubble_sort(nums: list[int]): function bubble_sort_with_flag (line 20) | def bubble_sort_with_flag(nums: list[int]): FILE: zh-hant/codes/python/chapter_sorting/bucket_sort.py function bucket_sort (line 8) | def bucket_sort(nums: list[float]): FILE: zh-hant/codes/python/chapter_sorting/counting_sort.py function counting_sort_naive (line 8) | def counting_sort_naive(nums: list[int]): function counting_sort (line 26) | def counting_sort(nums: list[int]): FILE: zh-hant/codes/python/chapter_sorting/heap_sort.py function sift_down (line 8) | def sift_down(nums: list[int], n: int, i: int): function heap_sort (line 28) | def heap_sort(nums: list[int]): FILE: zh-hant/codes/python/chapter_sorting/insertion_sort.py function insertion_sort (line 8) | def insertion_sort(nums: list[int]): FILE: zh-hant/codes/python/chapter_sorting/merge_sort.py function merge (line 8) | def merge(nums: list[int], left: int, mid: int, right: int): function merge_sort (line 38) | def merge_sort(nums: list[int], left: int, right: int): FILE: zh-hant/codes/python/chapter_sorting/quick_sort.py class QuickSort (line 8) | class QuickSort: method partition (line 11) | def partition(self, nums: list[int], left: int, right: int) -> int: method quick_sort (line 26) | def quick_sort(self, nums: list[int], left: int, right: int): class QuickSortMedian (line 38) | class QuickSortMedian: method median_three (line 41) | def median_three(self, nums: list[int], left: int, mid: int, right: in... method partition (line 50) | def partition(self, nums: list[int], left: int, right: int) -> int: method quick_sort (line 69) | def quick_sort(self, nums: list[int], left: int, right: int): class QuickSortTailCall (line 81) | class QuickSortTailCall: method partition (line 84) | def partition(self, nums: list[int], left: int, right: int) -> int: method quick_sort (line 99) | def quick_sort(self, nums: list[int], left: int, right: int): FILE: zh-hant/codes/python/chapter_sorting/radix_sort.py function digit (line 8) | def digit(num: int, exp: int) -> int: function counting_sort_digit (line 14) | def counting_sort_digit(nums: list[int], exp: int): function radix_sort (line 38) | def radix_sort(nums: list[int]): FILE: zh-hant/codes/python/chapter_sorting/selection_sort.py function selection_sort (line 8) | def selection_sort(nums: list[int]): FILE: zh-hant/codes/python/chapter_stack_and_queue/array_deque.py class ArrayDeque (line 8) | class ArrayDeque: method __init__ (line 11) | def __init__(self, capacity: int): method capacity (line 17) | def capacity(self) -> int: method size (line 21) | def size(self) -> int: method is_empty (line 25) | def is_empty(self) -> bool: method index (line 29) | def index(self, i: int) -> int: method push_first (line 36) | def push_first(self, num: int): method push_last (line 48) | def push_last(self, num: int): method pop_first (line 59) | def pop_first(self) -> int: method pop_last (line 67) | def pop_last(self) -> int: method peek_first (line 73) | def peek_first(self) -> int: method peek_last (line 79) | def peek_last(self) -> int: method to_array (line 87) | def to_array(self) -> list[int]: FILE: zh-hant/codes/python/chapter_stack_and_queue/array_queue.py class ArrayQueue (line 8) | class ArrayQueue: method __init__ (line 11) | def __init__(self, size: int): method capacity (line 17) | def capacity(self) -> int: method size (line 21) | def size(self) -> int: method is_empty (line 25) | def is_empty(self) -> bool: method push (line 29) | def push(self, num: int): method pop (line 40) | def pop(self) -> int: method peek (line 48) | def peek(self) -> int: method to_list (line 54) | def to_list(self) -> list[int]: FILE: zh-hant/codes/python/chapter_stack_and_queue/array_stack.py class ArrayStack (line 8) | class ArrayStack: method __init__ (line 11) | def __init__(self): method size (line 15) | def size(self) -> int: method is_empty (line 19) | def is_empty(self) -> bool: method push (line 23) | def push(self, item: int): method pop (line 27) | def pop(self) -> int: method peek (line 33) | def peek(self) -> int: method to_list (line 39) | def to_list(self) -> list[int]: FILE: zh-hant/codes/python/chapter_stack_and_queue/linkedlist_deque.py class ListNode (line 8) | class ListNode: method __init__ (line 11) | def __init__(self, val: int): class LinkedListDeque (line 18) | class LinkedListDeque: method __init__ (line 21) | def __init__(self): method size (line 27) | def size(self) -> int: method is_empty (line 31) | def is_empty(self) -> bool: method push (line 35) | def push(self, num: int, is_front: bool): method push_first (line 55) | def push_first(self, num: int): method push_last (line 59) | def push_last(self, num: int): method pop (line 63) | def pop(self, is_front: bool) -> int: method pop_first (line 88) | def pop_first(self) -> int: method pop_last (line 92) | def pop_last(self) -> int: method peek_first (line 96) | def peek_first(self) -> int: method peek_last (line 102) | def peek_last(self) -> int: method to_array (line 108) | def to_array(self) -> list[int]: FILE: zh-hant/codes/python/chapter_stack_and_queue/linkedlist_queue.py class LinkedListQueue (line 14) | class LinkedListQueue: method __init__ (line 17) | def __init__(self): method size (line 23) | def size(self) -> int: method is_empty (line 27) | def is_empty(self) -> bool: method push (line 31) | def push(self, num: int): method pop (line 45) | def pop(self) -> int: method peek (line 53) | def peek(self) -> int: method to_list (line 59) | def to_list(self) -> list[int]: FILE: zh-hant/codes/python/chapter_stack_and_queue/linkedlist_stack.py class LinkedListStack (line 14) | class LinkedListStack: method __init__ (line 17) | def __init__(self): method size (line 22) | def size(self) -> int: method is_empty (line 26) | def is_empty(self) -> bool: method push (line 30) | def push(self, val: int): method pop (line 37) | def pop(self) -> int: method peek (line 44) | def peek(self) -> int: method to_list (line 50) | def to_list(self) -> list[int]: FILE: zh-hant/codes/python/chapter_tree/array_binary_tree.py class ArrayBinaryTree (line 14) | class ArrayBinaryTree: method __init__ (line 17) | def __init__(self, arr: list[int | None]): method size (line 21) | def size(self): method val (line 25) | def val(self, i: int) -> int | None: method left (line 32) | def left(self, i: int) -> int | None: method right (line 36) | def right(self, i: int) -> int | None: method parent (line 40) | def parent(self, i: int) -> int | None: method level_order (line 44) | def level_order(self) -> list[int]: method dfs (line 53) | def dfs(self, i: int, order: str): method pre_order (line 69) | def pre_order(self) -> list[int]: method in_order (line 75) | def in_order(self) -> list[int]: method post_order (line 81) | def post_order(self) -> list[int]: FILE: zh-hant/codes/python/chapter_tree/avl_tree.py class AVLTree (line 14) | class AVLTree: method __init__ (line 17) | def __init__(self): method get_root (line 21) | def get_root(self) -> TreeNode | None: method height (line 25) | def height(self, node: TreeNode | None) -> int: method update_height (line 32) | def update_height(self, node: TreeNode | None): method balance_factor (line 37) | def balance_factor(self, node: TreeNode | None) -> int: method right_rotate (line 45) | def right_rotate(self, node: TreeNode | None) -> TreeNode | None: method left_rotate (line 58) | def left_rotate(self, node: TreeNode | None) -> TreeNode | None: method rotate (line 71) | def rotate(self, node: TreeNode | None) -> TreeNode | None: method insert (line 96) | def insert(self, val): method insert_helper (line 100) | def insert_helper(self, node: TreeNode | None, val: int) -> TreeNode: method remove (line 117) | def remove(self, val: int): method remove_helper (line 121) | def remove_helper(self, node: TreeNode | None, val: int) -> TreeNode |... method search (line 151) | def search(self, val: int) -> TreeNode | None: function test_insert (line 172) | def test_insert(tree: AVLTree, val: int): function test_remove (line 177) | def test_remove(tree: AVLTree, val: int): FILE: zh-hant/codes/python/chapter_tree/binary_search_tree.py class BinarySearchTree (line 14) | class BinarySearchTree: method __init__ (line 17) | def __init__(self): method get_root (line 22) | def get_root(self) -> TreeNode | None: method search (line 26) | def search(self, num: int) -> TreeNode | None: method insert (line 42) | def insert(self, num: int): method remove (line 68) | def remove(self, num: int): FILE: zh-hant/codes/python/chapter_tree/binary_tree_bfs.py function level_order (line 15) | def level_order(root: TreeNode | None) -> list[int]: FILE: zh-hant/codes/python/chapter_tree/binary_tree_dfs.py function pre_order (line 14) | def pre_order(root: TreeNode | None): function in_order (line 24) | def in_order(root: TreeNode | None): function post_order (line 34) | def post_order(root: TreeNode | None): FILE: zh-hant/codes/python/modules/list_node.py class ListNode (line 8) | class ListNode: method __init__ (line 11) | def __init__(self, val: int): function list_to_linked_list (line 16) | def list_to_linked_list(arr: list[int]) -> ListNode | None: function linked_list_to_list (line 26) | def linked_list_to_list(head: ListNode | None) -> list[int]: FILE: zh-hant/codes/python/modules/print_util.py function print_matrix (line 11) | def print_matrix(mat: list[list[int]]): function print_linked_list (line 19) | def print_linked_list(head: ListNode | None): class Trunk (line 25) | class Trunk: method __init__ (line 26) | def __init__(self, prev, string: str | None = None): function show_trunks (line 31) | def show_trunks(p: Trunk | None): function print_tree (line 38) | def print_tree( function print_dict (line 70) | def print_dict(hmap: dict): function print_heap (line 76) | def print_heap(heap: list[int]): FILE: zh-hant/codes/python/modules/tree_node.py class TreeNode (line 10) | class TreeNode: method __init__ (line 13) | def __init__(self, val: int = 0): function list_to_tree_dfs (line 36) | def list_to_tree_dfs(arr: list[int], i: int) -> TreeNode | None: function list_to_tree (line 49) | def list_to_tree(arr: list[int]) -> TreeNode | None: function tree_to_list_dfs (line 54) | def tree_to_list_dfs(root: TreeNode, i: int, res: list[int]) -> list[int]: function tree_to_list (line 65) | def tree_to_list(root: TreeNode | None) -> list[int]: FILE: zh-hant/codes/python/modules/vertex.py class Vertex (line 6) | class Vertex: method __init__ (line 9) | def __init__(self, val: int): function vals_to_vets (line 13) | def vals_to_vets(vals: list[int]) -> list["Vertex"]: function vets_to_vals (line 18) | def vets_to_vals(vets: list["Vertex"]) -> list[int]: FILE: zh-hant/codes/ruby/chapter_array_and_linkedlist/array.rb function random_access (line 8) | def random_access(nums) function extend (line 20) | def extend(nums, enlarge) function insert (line 34) | def insert(nums, num, index) function remove (line 46) | def remove(nums, index) function traverse (line 54) | def traverse(nums) function find (line 69) | def find(nums, target) FILE: zh-hant/codes/ruby/chapter_array_and_linkedlist/linked_list.rb function insert (line 12) | def insert(n0, _p) function remove (line 19) | def remove(n0) function access (line 29) | def access(head, index) function find (line 39) | def find(head, target) FILE: zh-hant/codes/ruby/chapter_array_and_linkedlist/my_list.rb class MyList (line 8) | class MyList method initialize (line 13) | def initialize method get (line 21) | def get(index) method set (line 28) | def set(index, num) method add (line 34) | def add(num) method insert (line 44) | def insert(index, num) method remove (line 61) | def remove(index) method extend_capacity (line 78) | def extend_capacity method to_array (line 86) | def to_array FILE: zh-hant/codes/ruby/chapter_backtracking/n_queens.rb function backtrack (line 8) | def backtrack(row, n, state, res, cols, diags1, diags2) function n_queens (line 35) | def n_queens(n) FILE: zh-hant/codes/ruby/chapter_backtracking/permutations_i.rb function backtrack (line 8) | def backtrack(state, choices, selected, res) function permutations_i (line 32) | def permutations_i(nums) FILE: zh-hant/codes/ruby/chapter_backtracking/permutations_ii.rb function backtrack (line 8) | def backtrack(state, choices, selected, res) function permutations_ii (line 34) | def permutations_ii(nums) FILE: zh-hant/codes/ruby/chapter_backtracking/preorder_traversal_i_compact.rb function pre_order (line 11) | def pre_order(root) FILE: zh-hant/codes/ruby/chapter_backtracking/preorder_traversal_ii_compact.rb function pre_order (line 11) | def pre_order(root) FILE: zh-hant/codes/ruby/chapter_backtracking/preorder_traversal_iii_compact.rb function pre_order (line 11) | def pre_order(root) FILE: zh-hant/codes/ruby/chapter_backtracking/preorder_traversal_iii_template.rb function is_solution? (line 11) | def is_solution?(state) function record_solution (line 16) | def record_solution(state, res) function is_valid? (line 21) | def is_valid?(state, choice) function make_choice (line 26) | def make_choice(state, choice) function undo_choice (line 31) | def undo_choice(state, choice) function backtrack (line 36) | def backtrack(state, choices, res) FILE: zh-hant/codes/ruby/chapter_backtracking/subset_sum_i.rb function backtrack (line 8) | def backtrack(state, target, choices, start, res) function subset_sum_i (line 30) | def subset_sum_i(nums, target) FILE: zh-hant/codes/ruby/chapter_backtracking/subset_sum_i_naive.rb function backtrack (line 8) | def backtrack(state, target, total, choices, res) function subset_sum_i_naive (line 29) | def subset_sum_i_naive(nums, target) FILE: zh-hant/codes/ruby/chapter_backtracking/subset_sum_ii.rb function backtrack (line 8) | def backtrack(state, target, choices, start, res) function subset_sum_ii (line 34) | def subset_sum_ii(nums, target) FILE: zh-hant/codes/ruby/chapter_computational_complexity/iteration.rb function for_loop (line 8) | def for_loop(n) function while_loop (line 20) | def while_loop(n) function while_loop_ii (line 34) | def while_loop_ii(n) function nested_for_loop (line 50) | def nested_for_loop(n) FILE: zh-hant/codes/ruby/chapter_computational_complexity/recursion.rb function recur (line 8) | def recur(n) function for_loop_recur (line 18) | def for_loop_recur(n) function tail_recur (line 38) | def tail_recur(n, res) function fib (line 46) | def fib(n) FILE: zh-hant/codes/ruby/chapter_computational_complexity/space_complexity.rb function function (line 12) | def function function constant (line 18) | def constant(n) function linear (line 31) | def linear(n) function linear_recur (line 43) | def linear_recur(n) function quadratic (line 50) | def quadratic(n) function quadratic_recur (line 56) | def quadratic_recur(n) function build_tree (line 65) | def build_tree(n) FILE: zh-hant/codes/ruby/chapter_computational_complexity/time_complexity.rb function constant (line 8) | def constant(n) function linear (line 18) | def linear(n) function array_traversal (line 25) | def array_traversal(nums) function quadratic (line 37) | def quadratic(n) function bubble_sort (line 51) | def bubble_sort(nums) function exponential (line 72) | def exponential(n) function exp_recur (line 86) | def exp_recur(n) function logarithmic (line 92) | def logarithmic(n) function log_recur (line 104) | def log_recur(n) function linear_log_recur (line 110) | def linear_log_recur(n) function factorial_recur (line 120) | def factorial_recur(n) FILE: zh-hant/codes/ruby/chapter_computational_complexity/worst_best_time_complexity.rb function random_numbers (line 8) | def random_numbers(n) function find_one (line 16) | def find_one(nums) FILE: zh-hant/codes/ruby/chapter_divide_and_conquer/binary_search_recur.rb function dfs (line 8) | def dfs(nums, target, i, j) function binary_search (line 28) | def binary_search(nums, target) FILE: zh-hant/codes/ruby/chapter_divide_and_conquer/build_tree.rb function dfs (line 11) | def dfs(preorder, inorder_map, i, l, r) function build_tree (line 29) | def build_tree(preorder, inorder) FILE: zh-hant/codes/ruby/chapter_divide_and_conquer/hanota.rb function move (line 8) | def move(src, tar) function dfs (line 16) | def dfs(i, src, buf, tar) function solve_hanota (line 32) | def solve_hanota(_A, _B, _C) FILE: zh-hant/codes/ruby/chapter_dynamic_programming/climbing_stairs_backtrack.rb function backtrack (line 8) | def backtrack(choices, state, n, res) function climbing_stairs_backtrack (line 23) | def climbing_stairs_backtrack(n) FILE: zh-hant/codes/ruby/chapter_dynamic_programming/climbing_stairs_constraint_dp.rb function climbing_stairs_constraint_dp (line 8) | def climbing_stairs_constraint_dp(n) FILE: zh-hant/codes/ruby/chapter_dynamic_programming/climbing_stairs_dfs.rb function dfs (line 8) | def dfs(i) function climbing_stairs_dfs (line 16) | def climbing_stairs_dfs(n) FILE: zh-hant/codes/ruby/chapter_dynamic_programming/climbing_stairs_dfs_mem.rb function dfs (line 8) | def dfs(i, mem) function climbing_stairs_dfs_mem (line 21) | def climbing_stairs_dfs_mem(n) FILE: zh-hant/codes/ruby/chapter_dynamic_programming/climbing_stairs_dp.rb function climbing_stairs_dp (line 8) | def climbing_stairs_dp(n) function climbing_stairs_dp_comp (line 22) | def climbing_stairs_dp_comp(n) FILE: zh-hant/codes/ruby/chapter_dynamic_programming/coin_change.rb function coin_change_dp (line 8) | def coin_change_dp(coins, amt) function coin_change_dp_comp (line 31) | def coin_change_dp_comp(coins, amt) FILE: zh-hant/codes/ruby/chapter_dynamic_programming/coin_change_ii.rb function coin_change_ii_dp (line 8) | def coin_change_ii_dp(coins, amt) function coin_change_ii_dp_comp (line 30) | def coin_change_ii_dp_comp(coins, amt) FILE: zh-hant/codes/ruby/chapter_dynamic_programming/edit_distance.rb function edit_distance_dfs (line 8) | def edit_distance_dfs(s, t, i, j) function edit_distance_dfs_mem (line 25) | def edit_distance_dfs_mem(s, t, mem, i, j) function edit_distance_dp (line 45) | def edit_distance_dp(s, t) function edit_distance_dp_comp (line 67) | def edit_distance_dp_comp(s, t) FILE: zh-hant/codes/ruby/chapter_dynamic_programming/knapsack.rb function knapsack_dfs (line 8) | def knapsack_dfs(wgt, val, i, c) function knapsack_dfs_mem (line 21) | def knapsack_dfs_mem(wgt, val, mem, i, c) function knapsack_dp (line 36) | def knapsack_dp(wgt, val, cap) function knapsack_dp_comp (line 56) | def knapsack_dp_comp(wgt, val, cap) FILE: zh-hant/codes/ruby/chapter_dynamic_programming/min_cost_climbing_stairs_dp.rb function min_cost_climbing_stairs_dp (line 8) | def min_cost_climbing_stairs_dp(cost) function min_cost_climbing_stairs_dp_comp (line 21) | def min_cost_climbing_stairs_dp_comp(cost) FILE: zh-hant/codes/ruby/chapter_dynamic_programming/min_path_sum.rb function min_path_sum_dfs (line 8) | def min_path_sum_dfs(grid, i, j) function min_path_sum_dfs_mem (line 21) | def min_path_sum_dfs_mem(grid, mem, i, j) function min_path_sum_dp (line 36) | def min_path_sum_dp(grid) function min_path_sum_dp_comp (line 55) | def min_path_sum_dp_comp(grid) FILE: zh-hant/codes/ruby/chapter_dynamic_programming/unbounded_knapsack.rb function unbounded_knapsack_dp (line 8) | def unbounded_knapsack_dp(wgt, val, cap) function unbounded_knapsack_dp_comp (line 28) | def unbounded_knapsack_dp_comp(wgt, val, cap) FILE: zh-hant/codes/ruby/chapter_graph/graph_adjacency_list.rb class GraphAdjList (line 10) | class GraphAdjList method initialize (line 14) | def initialize(edges) method size (line 26) | def size method add_edge (line 31) | def add_edge(vet1, vet2) method remove_edge (line 39) | def remove_edge(vet1, vet2) method add_vertex (line 48) | def add_vertex(vet) method remove_vertex (line 56) | def remove_vertex(vet) method __print__ (line 68) | def __print__ FILE: zh-hant/codes/ruby/chapter_graph/graph_adjacency_matrix.rb class GraphAdjMat (line 10) | class GraphAdjMat method initialize (line 11) | def initialize(vertices, edges) method size (line 25) | def size method add_vertex (line 30) | def add_vertex(val) method remove_vertex (line 42) | def remove_vertex(index) method add_edge (line 54) | def add_edge(i, j) method remove_edge (line 66) | def remove_edge(i, j) method __print__ (line 77) | def __print__ FILE: zh-hant/codes/ruby/chapter_graph/graph_bfs.rb function graph_bfs (line 12) | def graph_bfs(graph, start_vet) FILE: zh-hant/codes/ruby/chapter_graph/graph_dfs.rb function dfs (line 12) | def dfs(graph, visited, res, vet) function graph_dfs (line 24) | def graph_dfs(graph, start_vet) FILE: zh-hant/codes/ruby/chapter_greedy/coin_change_greedy.rb function coin_change_greedy (line 8) | def coin_change_greedy(coins, amt) FILE: zh-hant/codes/ruby/chapter_greedy/fractional_knapsack.rb class Item (line 8) | class Item method initialize (line 12) | def initialize(w, v) function fractional_knapsack (line 19) | def fractional_knapsack(wgt, val, cap) FILE: zh-hant/codes/ruby/chapter_greedy/max_capacity.rb function max_capacity (line 8) | def max_capacity(ht) FILE: zh-hant/codes/ruby/chapter_greedy/max_product_cutting.rb function max_product_cutting (line 8) | def max_product_cutting(n) FILE: zh-hant/codes/ruby/chapter_hashing/array_hash_map.rb class Pair (line 8) | class Pair method initialize (line 11) | def initialize(key, val) class ArrayHashMap (line 18) | class ArrayHashMap method initialize (line 20) | def initialize method hash_func (line 26) | def hash_func(key) method get (line 31) | def get(key) method put (line 40) | def put(key, val) method remove (line 47) | def remove(key) method entry_set (line 54) | def entry_set method key_set (line 61) | def key_set method value_set (line 68) | def value_set method print (line 75) | def print FILE: zh-hant/codes/ruby/chapter_hashing/hash_map_chaining.rb class HashMapChaining (line 10) | class HashMapChaining method initialize (line 12) | def initialize method hash_func (line 21) | def hash_func(key) method load_factor (line 26) | def load_factor method get (line 31) | def get(key) method put (line 43) | def put(key, val) method remove (line 62) | def remove(key) method extend (line 76) | def extend method print (line 92) | def print FILE: zh-hant/codes/ruby/chapter_hashing/hash_map_open_addressing.rb class HashMapOpenAddressing (line 10) | class HashMapOpenAddressing method initialize (line 14) | def initialize method hash_func (line 23) | def hash_func(key) method load_factor (line 28) | def load_factor method find_bucket (line 33) | def find_bucket(key) method get (line 58) | def get(key) method put (line 68) | def put(key, val) method remove (line 84) | def remove(key) method extend (line 95) | def extend method print (line 109) | def print FILE: zh-hant/codes/ruby/chapter_hashing/simple_hash.rb function add_hash (line 8) | def add_hash(key) function mul_hash (line 18) | def mul_hash(key) function xor_hash (line 28) | def xor_hash(key) function rot_hash (line 38) | def rot_hash(key) FILE: zh-hant/codes/ruby/chapter_heap/my_heap.rb class MaxHeap (line 10) | class MaxHeap method initialize (line 14) | def initialize(nums) method left (line 24) | def left(i) method right (line 29) | def right(i) method parent (line 34) | def parent(i) method swap (line 39) | def swap(i, j) method size (line 44) | def size method is_empty? (line 49) | def is_empty? method peek (line 54) | def peek method push (line 59) | def push(val) method sift_up (line 67) | def sift_up(i) method pop (line 81) | def pop method sift_down (line 95) | def sift_down(i) method __print__ (line 113) | def __print__ FILE: zh-hant/codes/ruby/chapter_heap/top_k.rb function push_min_heap (line 10) | def push_min_heap(heap, val) function pop_min_heap (line 16) | def pop_min_heap(heap) function peek_min_heap (line 22) | def peek_min_heap(heap) function get_min_heap (line 28) | def get_min_heap(heap) function top_k_heap (line 34) | def top_k_heap(nums, k) FILE: zh-hant/codes/ruby/chapter_searching/binary_search.rb function binary_search (line 8) | def binary_search(nums, target) function binary_search_lcro (line 30) | def binary_search_lcro(nums, target) FILE: zh-hant/codes/ruby/chapter_searching/binary_search_edge.rb function binary_search_left_edge (line 10) | def binary_search_left_edge(nums, target) function binary_search_right_edge (line 21) | def binary_search_right_edge(nums, target) FILE: zh-hant/codes/ruby/chapter_searching/binary_search_insertion.rb function binary_search_insertion_simple (line 8) | def binary_search_insertion_simple(nums, target) function binary_search_insertion (line 29) | def binary_search_insertion(nums, target) FILE: zh-hant/codes/ruby/chapter_searching/hashing_search.rb function hashing_search_array (line 10) | def hashing_search_array(hmap, target) function hashing_search_linkedlist (line 17) | def hashing_search_linkedlist(hmap, target) FILE: zh-hant/codes/ruby/chapter_searching/linear_search.rb function linear_search_array (line 10) | def linear_search_array(nums, target) function linear_search_linkedlist (line 20) | def linear_search_linkedlist(head, target) FILE: zh-hant/codes/ruby/chapter_searching/two_sum.rb function two_sum_brute_force (line 8) | def two_sum_brute_force(nums, target) function two_sum_hash_table (line 20) | def two_sum_hash_table(nums, target) FILE: zh-hant/codes/ruby/chapter_sorting/bubble_sort.rb function bubble_sort (line 8) | def bubble_sort(nums) function bubble_sort_with_flag (line 23) | def bubble_sort_with_flag(nums) FILE: zh-hant/codes/ruby/chapter_sorting/bucket_sort.rb function bucket_sort (line 8) | def bucket_sort(nums) FILE: zh-hant/codes/ruby/chapter_sorting/counting_sort.rb function counting_sort_naive (line 8) | def counting_sort_naive(nums) function counting_sort (line 28) | def counting_sort(nums) FILE: zh-hant/codes/ruby/chapter_sorting/heap_sort.rb function sift_down (line 8) | def sift_down(nums, n, i) function heap_sort (line 26) | def heap_sort(nums) FILE: zh-hant/codes/ruby/chapter_sorting/insertion_sort.rb function insertion_sort (line 8) | def insertion_sort(nums) FILE: zh-hant/codes/ruby/chapter_sorting/merge_sort.rb function merge (line 8) | def merge(nums, left, mid, right) function merge_sort (line 43) | def merge_sort(nums, left, right) FILE: zh-hant/codes/ruby/chapter_sorting/quick_sort.rb class QuickSort (line 8) | class QuickSort method partition (line 11) | def partition(nums, left, right) method quick_sort (line 30) | def quick_sort(nums, left, right) class QuickSortMedian (line 45) | class QuickSortMedian method median_three (line 48) | def median_three(nums, left, mid, right) method partition (line 59) | def partition(nums, left, right) method quick_sort (line 81) | def quick_sort(nums, left, right) class QuickSortTailCall (line 96) | class QuickSortTailCall method partition (line 99) | def partition(nums, left, right) method quick_sort (line 119) | def quick_sort(nums, left, right) FILE: zh-hant/codes/ruby/chapter_sorting/radix_sort.rb function digit (line 8) | def digit(num, exp) function counting_sort_digit (line 14) | def counting_sort_digit(nums, exp) function radix_sort (line 38) | def radix_sort(nums) FILE: zh-hant/codes/ruby/chapter_sorting/selection_sort.rb function selection_sort (line 8) | def selection_sort(nums) FILE: zh-hant/codes/ruby/chapter_stack_and_queue/array_deque.rb class ArrayDeque (line 8) | class ArrayDeque method initialize (line 13) | def initialize(capacity) method capacity (line 20) | def capacity method is_empty? (line 25) | def is_empty? method push_first (line 30) | def push_first(num) method push_last (line 45) | def push_last(num) method pop_first (line 59) | def pop_first method pop_last (line 68) | def pop_last method peek_first (line 75) | def peek_first method peek_last (line 82) | def peek_last method to_array (line 91) | def to_array method index (line 103) | def index(i) FILE: zh-hant/codes/ruby/chapter_stack_and_queue/array_queue.rb class ArrayQueue (line 8) | class ArrayQueue method initialize (line 13) | def initialize(size) method capacity (line 20) | def capacity method is_empty? (line 25) | def is_empty? method push (line 30) | def push(num) method pop (line 42) | def pop method peek (line 51) | def peek method to_array (line 58) | def to_array FILE: zh-hant/codes/ruby/chapter_stack_and_queue/array_stack.rb class ArrayStack (line 8) | class ArrayStack method initialize (line 10) | def initialize method size (line 15) | def size method is_empty? (line 20) | def is_empty? method push (line 25) | def push(item) method pop (line 30) | def pop method peek (line 37) | def peek method to_array (line 44) | def to_array FILE: zh-hant/codes/ruby/chapter_stack_and_queue/linkedlist_deque.rb class ListNode (line 8) | class ListNode method initialize (line 14) | def initialize(val) class LinkedListDeque (line 20) | class LinkedListDeque method initialize (line 25) | def initialize method is_empty? (line 32) | def is_empty? method push (line 37) | def push(num, is_front) method push_first (line 59) | def push_first(num) method push_last (line 64) | def push_last(num) method pop (line 69) | def pop(is_front) method pop_first (line 99) | def pop_first method pop_last (line 104) | def pop_last method peek_first (line 109) | def peek_first method peek_last (line 116) | def peek_last method to_array (line 123) | def to_array FILE: zh-hant/codes/ruby/chapter_stack_and_queue/linkedlist_queue.rb class LinkedListQueue (line 10) | class LinkedListQueue method initialize (line 15) | def initialize method is_empty? (line 22) | def is_empty? method push (line 27) | def push(num) method pop (line 45) | def pop method peek (line 54) | def peek method to_array (line 61) | def to_array FILE: zh-hant/codes/ruby/chapter_stack_and_queue/linkedlist_stack.rb class LinkedListStack (line 10) | class LinkedListStack method initialize (line 14) | def initialize method is_empty? (line 19) | def is_empty? method push (line 24) | def push(val) method pop (line 32) | def pop method peek (line 40) | def peek method to_array (line 47) | def to_array FILE: zh-hant/codes/ruby/chapter_tree/array_binary_tree.rb class ArrayBinaryTree (line 11) | class ArrayBinaryTree method initialize (line 13) | def initialize(arr) method size (line 18) | def size method val (line 23) | def val(i) method left (line 31) | def left(i) method right (line 36) | def right(i) method parent (line 41) | def parent(i) method level_order (line 46) | def level_order method dfs (line 58) | def dfs(i, order) method pre_order (line 71) | def pre_order method in_order (line 78) | def in_order method post_order (line 85) | def post_order FILE: zh-hant/codes/ruby/chapter_tree/avl_tree.rb class AVLTree (line 11) | class AVLTree method initialize (line 13) | def initialize method get_root (line 18) | def get_root method height (line 23) | def height(node) method update_height (line 31) | def update_height(node) method balance_factor (line 37) | def balance_factor(node) method right_rotate (line 46) | def right_rotate(node) method left_rotate (line 60) | def left_rotate(node) method rotate (line 74) | def rotate(node) method insert (line 103) | def insert(val) method insert_helper (line 108) | def insert_helper(node, val) method remove (line 126) | def remove(val) method remove_helper (line 131) | def remove_helper(node, val) method search (line 162) | def search(val) function test_insert (line 184) | def test_insert(tree, val) function test_remove (line 190) | def test_remove(tree, val) FILE: zh-hant/codes/ruby/chapter_tree/binary_search_tree.rb class BinarySearchTree (line 11) | class BinarySearchTree method initialize (line 13) | def initialize method get_root (line 19) | def get_root method search (line 24) | def search(num) method insert (line 45) | def insert(num) method remove (line 78) | def remove(num) FILE: zh-hant/codes/ruby/chapter_tree/binary_tree_bfs.rb function level_order (line 11) | def level_order(root) FILE: zh-hant/codes/ruby/chapter_tree/binary_tree_dfs.rb function pre_order (line 11) | def pre_order(root) function in_order (line 21) | def in_order(root) function post_order (line 31) | def post_order(root) FILE: zh-hant/codes/ruby/utils/list_node.rb class ListNode (line 8) | class ListNode method initialize (line 12) | def initialize(val=0, next_node=nil) function arr_to_linked_list (line 19) | def arr_to_linked_list(arr) function linked_list_to_arr (line 31) | def linked_list_to_arr(head) FILE: zh-hant/codes/ruby/utils/print_util.rb function print_matrix (line 10) | def print_matrix(mat) function print_linked_list (line 17) | def print_linked_list(head) class Trunk (line 26) | class Trunk method initialize (line 29) | def initialize(prev, str) function show_trunk (line 35) | def show_trunk(p) function print_tree (line 45) | def print_tree(root, prev=nil, is_right=false) function print_hash_map (line 70) | def print_hash_map(hmap) function print_heap (line 75) | def print_heap(heap) FILE: zh-hant/codes/ruby/utils/tree_node.rb class TreeNode (line 8) | class TreeNode method initialize (line 14) | def initialize(val=0) function arr_to_tree_dfs (line 21) | def arr_to_tree_dfs(arr, i) function arr_to_tree (line 33) | def arr_to_tree(arr) function tree_to_arr_dfs (line 38) | def tree_to_arr_dfs(root, i, res) function tree_to_arr (line 49) | def tree_to_arr(root) FILE: zh-hant/codes/ruby/utils/vertex.rb class Vertex (line 8) | class Vertex method initialize (line 11) | def initialize(val) function vals_to_vets (line 17) | def vals_to_vets(vals) function vets_to_vals (line 22) | def vets_to_vals(vets) FILE: zh-hant/codes/rust/chapter_array_and_linkedlist/array.rs function random_access (line 11) | fn random_access(nums: &[i32]) -> i32 { function extend (line 20) | fn extend(nums: &[i32], enlarge: usize) -> Vec { function insert (line 31) | fn insert(nums: &mut [i32], num: i32, index: usize) { function remove (line 41) | fn remove(nums: &mut [i32], index: usize) { function traverse (line 49) | fn traverse(nums: &[i32]) { function find (line 63) | fn find(nums: &[i32], target: i32) -> Option { function main (line 73) | fn main() { FILE: zh-hant/codes/rust/chapter_array_and_linkedlist/linked_list.rs function insert (line 13) | pub fn insert(n0: &Rc>>, P: Rc(n0: &Rc>>) { function access (line 31) | pub fn access(head: Rc>>, index: i32) -> Option(head: Rc>>, target: T) -> ... function main (line 67) | fn main() { FILE: zh-hant/codes/rust/chapter_array_and_linkedlist/list.rs function main (line 9) | fn main() { FILE: zh-hant/codes/rust/chapter_array_and_linkedlist/my_list.rs type MyList (line 11) | struct MyList { method new (line 21) | pub fn new(capacity: usize) -> Self { method size (line 32) | pub fn size(&self) -> usize { method capacity (line 37) | pub fn capacity(&self) -> usize { method get (line 42) | pub fn get(&self, index: usize) -> i32 { method set (line 51) | pub fn set(&mut self, index: usize, num: i32) { method add (line 59) | pub fn add(&mut self, num: i32) { method insert (line 70) | pub fn insert(&mut self, index: usize, num: i32) { method remove (line 88) | pub fn remove(&mut self, index: usize) -> i32 { method extend_capacity (line 104) | pub fn extend_capacity(&mut self) { method to_array (line 113) | pub fn to_array(&self) -> Vec { function main (line 124) | fn main() { FILE: zh-hant/codes/rust/chapter_backtracking/n_queens.rs function backtrack (line 8) | fn backtrack( function n_queens (line 42) | fn n_queens(n: usize) -> Vec>> { function main (line 64) | pub fn main() { FILE: zh-hant/codes/rust/chapter_backtracking/permutations_i.rs function backtrack (line 8) | fn backtrack(mut state: Vec, choices: &[i32], selected: &mut [bool]... function permutations_i (line 32) | fn permutations_i(nums: &mut [i32]) -> Vec> { function main (line 39) | pub fn main() { FILE: zh-hant/codes/rust/chapter_backtracking/permutations_ii.rs function backtrack (line 10) | fn backtrack(mut state: Vec, choices: &[i32], selected: &mut [bool]... function permutations_ii (line 36) | fn permutations_ii(nums: &mut [i32]) -> Vec> { function main (line 43) | pub fn main() { FILE: zh-hant/codes/rust/chapter_backtracking/preorder_traversal_i_compact.rs function pre_order (line 11) | fn pre_order(res: &mut Vec>>, root: Option<&Rc>>) -> bool { function record_solution (line 16) | fn record_solution( function is_valid (line 24) | fn is_valid(_: &mut Vec>>, choice: Option<&Rc>>, choice: Rc>>, _: Rc Vec> { function main (line 48) | pub fn main() { FILE: zh-hant/codes/rust/chapter_backtracking/subset_sum_i_naive.rs function backtrack (line 8) | fn backtrack( function subset_sum_i_naive (line 36) | fn subset_sum_i_naive(nums: &[i32], target: i32) -> Vec> { function main (line 45) | pub fn main() { FILE: zh-hant/codes/rust/chapter_backtracking/subset_sum_ii.rs function backtrack (line 8) | fn backtrack( function subset_sum_ii (line 43) | fn subset_sum_ii(nums: &mut [i32], target: i32) -> Vec> { function main (line 53) | pub fn main() { FILE: zh-hant/codes/rust/chapter_computational_complexity/iteration.rs function for_loop (line 8) | fn for_loop(n: i32) -> i32 { function while_loop (line 18) | fn while_loop(n: i32) -> i32 { function while_loop_ii (line 31) | fn while_loop_ii(n: i32) -> i32 { function nested_for_loop (line 46) | fn nested_for_loop(n: i32) -> String { function main (line 59) | fn main() { FILE: zh-hant/codes/rust/chapter_computational_complexity/recursion.rs function recur (line 8) | fn recur(n: i32) -> i32 { function for_loop_recur (line 20) | fn for_loop_recur(n: i32) -> i32 { function tail_recur (line 39) | fn tail_recur(n: i32, res: i32) -> i32 { function fib (line 49) | fn fib(n: i32) -> i32 { function main (line 61) | fn main() { FILE: zh-hant/codes/rust/chapter_computational_complexity/space_complexity.rs function function (line 13) | fn function() -> i32 { function constant (line 20) | fn constant(n: i32) { function linear (line 38) | fn linear(n: i32) { function linear_recur (line 54) | fn linear_recur(n: i32) { function quadratic (line 64) | fn quadratic(n: i32) { function quadratic_recur (line 79) | fn quadratic_recur(n: i32) -> i32 { function build_tree (line 90) | fn build_tree(n: i32) -> Option>> { function main (line 101) | fn main() { FILE: zh-hant/codes/rust/chapter_computational_complexity/time_complexity.rs function constant (line 8) | fn constant(n: i32) -> i32 { function linear (line 19) | fn linear(n: i32) -> i32 { function array_traversal (line 28) | fn array_traversal(nums: &[i32]) -> i32 { function quadratic (line 38) | fn quadratic(n: i32) -> i32 { function bubble_sort (line 50) | fn bubble_sort(nums: &mut [i32]) -> i32 { function exponential (line 70) | fn exponential(n: i32) -> i32 { function exp_recur (line 85) | fn exp_recur(n: i32) -> i32 { function logarithmic (line 93) | fn logarithmic(mut n: i32) -> i32 { function log_recur (line 103) | fn log_recur(n: i32) -> i32 { function linear_log_recur (line 111) | fn linear_log_recur(n: i32) -> i32 { function factorial_recur (line 123) | fn factorial_recur(n: i32) -> i32 { function main (line 136) | fn main() { FILE: zh-hant/codes/rust/chapter_computational_complexity/worst_best_time_complexity.rs function random_numbers (line 12) | fn random_numbers(n: i32) -> Vec { function find_one (line 21) | fn find_one(nums: &[i32]) -> Option { function main (line 33) | fn main() { FILE: zh-hant/codes/rust/chapter_divide_and_conquer/binary_search_recur.rs function dfs (line 8) | fn dfs(nums: &[i32], target: i32, i: i32, j: i32) -> i32 { function binary_search (line 27) | fn binary_search(nums: &[i32], target: i32) -> i32 { function main (line 34) | pub fn main() { FILE: zh-hant/codes/rust/chapter_divide_and_conquer/build_tree.rs function dfs (line 12) | fn dfs( function build_tree (line 36) | fn build_tree(preorder: &[i32], inorder: &[i32]) -> Option, tar: &mut Vec) { function dfs (line 18) | fn dfs(i: i32, src: &mut Vec, buf: &mut Vec, tar: &mut Vec, B: &mut Vec, C: &mut Vec) { function main (line 40) | pub fn main() { FILE: zh-hant/codes/rust/chapter_dynamic_programming/climbing_stairs_backtrack.rs function backtrack (line 8) | fn backtrack(choices: &[i32], state: i32, n: i32, res: &mut [i32]) { function climbing_stairs_backtrack (line 26) | fn climbing_stairs_backtrack(n: usize) -> i32 { function main (line 36) | pub fn main() { FILE: zh-hant/codes/rust/chapter_dynamic_programming/climbing_stairs_constraint_dp.rs function climbing_stairs_constraint_dp (line 8) | fn climbing_stairs_constraint_dp(n: usize) -> i32 { function main (line 28) | pub fn main() { FILE: zh-hant/codes/rust/chapter_dynamic_programming/climbing_stairs_dfs.rs function dfs (line 8) | fn dfs(i: usize) -> i32 { function climbing_stairs_dfs (line 19) | fn climbing_stairs_dfs(n: usize) -> i32 { function main (line 24) | pub fn main() { FILE: zh-hant/codes/rust/chapter_dynamic_programming/climbing_stairs_dfs_mem.rs function dfs (line 8) | fn dfs(i: usize, mem: &mut [i32]) -> i32 { function climbing_stairs_dfs_mem (line 25) | fn climbing_stairs_dfs_mem(n: usize) -> i32 { function main (line 32) | pub fn main() { FILE: zh-hant/codes/rust/chapter_dynamic_programming/climbing_stairs_dp.rs function climbing_stairs_dp (line 8) | fn climbing_stairs_dp(n: usize) -> i32 { function climbing_stairs_dp_comp (line 26) | fn climbing_stairs_dp_comp(n: usize) -> i32 { function main (line 40) | pub fn main() { FILE: zh-hant/codes/rust/chapter_dynamic_programming/coin_change.rs function coin_change_dp (line 8) | fn coin_change_dp(coins: &[i32], amt: usize) -> i32 { function coin_change_dp_comp (line 37) | fn coin_change_dp_comp(coins: &[i32], amt: usize) -> i32 { function main (line 64) | pub fn main() { FILE: zh-hant/codes/rust/chapter_dynamic_programming/coin_change_ii.rs function coin_change_ii_dp (line 8) | fn coin_change_ii_dp(coins: &[i32], amt: usize) -> i32 { function coin_change_ii_dp_comp (line 32) | fn coin_change_ii_dp_comp(coins: &[i32], amt: usize) -> i32 { function main (line 53) | pub fn main() { FILE: zh-hant/codes/rust/chapter_dynamic_programming/edit_distance.rs function edit_distance_dfs (line 8) | fn edit_distance_dfs(s: &str, t: &str, i: usize, j: usize) -> i32 { function edit_distance_dfs_mem (line 34) | fn edit_distance_dfs_mem(s: &str, t: &str, mem: &mut Vec>, i: u... function edit_distance_dp (line 65) | fn edit_distance_dp(s: &str, t: &str) -> i32 { function edit_distance_dp_comp (line 92) | fn edit_distance_dp_comp(s: &str, t: &str) -> i32 { function main (line 121) | pub fn main() { FILE: zh-hant/codes/rust/chapter_dynamic_programming/knapsack.rs function knapsack_dfs (line 8) | fn knapsack_dfs(wgt: &[i32], val: &[i32], i: usize, c: usize) -> i32 { function knapsack_dfs_mem (line 25) | fn knapsack_dfs_mem(wgt: &[i32], val: &[i32], mem: &mut Vec>, i... function knapsack_dp (line 47) | fn knapsack_dp(wgt: &[i32], val: &[i32], cap: usize) -> i32 { function knapsack_dp_comp (line 70) | fn knapsack_dp_comp(wgt: &[i32], val: &[i32], cap: usize) -> i32 { function main (line 88) | pub fn main() { FILE: zh-hant/codes/rust/chapter_dynamic_programming/min_cost_climbing_stairs_dp.rs function min_cost_climbing_stairs_dp (line 10) | fn min_cost_climbing_stairs_dp(cost: &[i32]) -> i32 { function min_cost_climbing_stairs_dp_comp (line 28) | fn min_cost_climbing_stairs_dp_comp(cost: &[i32]) -> i32 { function main (line 43) | pub fn main() { FILE: zh-hant/codes/rust/chapter_dynamic_programming/min_path_sum.rs function min_path_sum_dfs (line 8) | fn min_path_sum_dfs(grid: &Vec>, i: i32, j: i32) -> i32 { function min_path_sum_dfs_mem (line 25) | fn min_path_sum_dfs_mem(grid: &Vec>, mem: &mut Vec>, i... function min_path_sum_dp (line 47) | fn min_path_sum_dp(grid: &Vec>) -> i32 { function min_path_sum_dp_comp (line 70) | fn min_path_sum_dp_comp(grid: &Vec>) -> i32 { function main (line 92) | pub fn main() { FILE: zh-hant/codes/rust/chapter_dynamic_programming/unbounded_knapsack.rs function unbounded_knapsack_dp (line 8) | fn unbounded_knapsack_dp(wgt: &[i32], val: &[i32], cap: usize) -> i32 { function unbounded_knapsack_dp_comp (line 28) | fn unbounded_knapsack_dp_comp(wgt: &[i32], val: &[i32], cap: usize) -> i... function main (line 48) | pub fn main() { FILE: zh-hant/codes/rust/chapter_graph/graph_adjacency_list.rs type GraphAdjList (line 12) | pub struct GraphAdjList { method new (line 19) | pub fn new(edges: Vec<[Vertex; 2]>) -> Self { method size (line 35) | pub fn size(&self) -> usize { method add_edge (line 40) | pub fn add_edge(&mut self, vet1: Vertex, vet2: Vertex) { method remove_edge (line 51) | pub fn remove_edge(&mut self, vet1: Vertex, vet2: Vertex) { method add_vertex (line 65) | pub fn add_vertex(&mut self, vet: Vertex) { method remove_vertex (line 75) | pub fn remove_vertex(&mut self, vet: Vertex) { method print (line 85) | pub fn print(&self) { function main (line 96) | fn main() { FILE: zh-hant/codes/rust/chapter_graph/graph_adjacency_matrix.rs type GraphAdjMat (line 8) | pub struct GraphAdjMat { method new (line 17) | pub fn new(vertices: Vec, edges: Vec<[usize; 2]>) -> Self { method size (line 36) | pub fn size(&self) -> usize { method add_vertex (line 41) | pub fn add_vertex(&mut self, val: i32) { method remove_vertex (line 54) | pub fn remove_vertex(&mut self, index: usize) { method add_edge (line 69) | pub fn add_edge(&mut self, i: usize, j: usize) { method remove_edge (line 82) | pub fn remove_edge(&mut self, i: usize, j: usize) { method print (line 93) | pub fn print(&self) { function main (line 105) | fn main() { FILE: zh-hant/codes/rust/chapter_graph/graph_bfs.rs function graph_bfs (line 15) | fn graph_bfs(graph: GraphAdjList, start_vet: Vertex) -> Vec { function main (line 44) | fn main() { FILE: zh-hant/codes/rust/chapter_graph/graph_dfs.rs function dfs (line 14) | fn dfs(graph: &GraphAdjList, visited: &mut HashSet, res: &mut Ve... function graph_dfs (line 31) | fn graph_dfs(graph: GraphAdjList, start_vet: Vertex) -> Vec { function main (line 42) | fn main() { FILE: zh-hant/codes/rust/chapter_greedy/coin_change_greedy.rs function coin_change_greedy (line 8) | fn coin_change_greedy(coins: &[i32], mut amt: i32) -> i32 { function main (line 31) | fn main() { FILE: zh-hant/codes/rust/chapter_greedy/fractional_knapsack.rs type Item (line 8) | struct Item { method new (line 14) | fn new(w: i32, v: i32) -> Self { function fractional_knapsack (line 20) | fn fractional_knapsack(wgt: &[i32], val: &[i32], mut cap: i32) -> f64 { function main (line 51) | fn main() { FILE: zh-hant/codes/rust/chapter_greedy/max_capacity.rs function max_capacity (line 8) | fn max_capacity(ht: &[i32]) -> i32 { function main (line 30) | fn main() { FILE: zh-hant/codes/rust/chapter_greedy/max_product_cutting.rs function max_product_cutting (line 8) | fn max_product_cutting(n: i32) -> i32 { function main (line 29) | fn main() { FILE: zh-hant/codes/rust/chapter_hashing/array_hash_map.rs type Pair (line 9) | pub struct Pair { type ArrayHashMap (line 14) | pub struct ArrayHashMap { method new (line 19) | pub fn new() -> ArrayHashMap { method hash_func (line 27) | fn hash_func(&self, key: i32) -> usize { method get (line 32) | pub fn get(&self, key: i32) -> Option<&String> { method put (line 38) | pub fn put(&mut self, key: i32, val: &str) { method remove (line 47) | pub fn remove(&mut self, key: i32) { method entry_set (line 54) | pub fn entry_set(&self) -> Vec<&Pair> { method key_set (line 62) | pub fn key_set(&self) -> Vec<&i32> { method value_set (line 70) | pub fn value_set(&self) -> Vec<&String> { method print (line 78) | pub fn print(&self) { function main (line 85) | fn main() { FILE: zh-hant/codes/rust/chapter_hashing/build_in_hash.rs function main (line 13) | fn main() { FILE: zh-hant/codes/rust/chapter_hashing/hash_map.rs function main (line 12) | pub fn main() { FILE: zh-hant/codes/rust/chapter_hashing/hash_map_chaining.rs type Pair (line 9) | struct Pair { type HashMapChaining (line 15) | struct HashMapChaining { method new (line 25) | fn new() -> Self { method hash_func (line 36) | fn hash_func(&self, key: i32) -> usize { method load_factor (line 41) | fn load_factor(&self) -> f32 { method remove (line 46) | fn remove(&mut self, key: i32) -> Option { method extend (line 63) | fn extend(&mut self) { method print (line 81) | fn print(&self) { method put (line 92) | fn put(&mut self, key: i32, val: String) { method get (line 115) | fn get(&self, key: i32) -> Option<&str> { function main (line 131) | pub fn main() { FILE: zh-hant/codes/rust/chapter_hashing/hash_map_open_addressing.rs type HashMapOpenAddressing (line 14) | struct HashMapOpenAddressing { method new (line 25) | fn new() -> Self { method hash_func (line 40) | fn hash_func(&self, key: i32) -> usize { method load_factor (line 45) | fn load_factor(&self) -> f64 { method find_bucket (line 50) | fn find_bucket(&mut self, key: i32) -> usize { method get (line 81) | fn get(&mut self, key: i32) -> Option<&str> { method put (line 93) | fn put(&mut self, key: i32, val: String) { method remove (line 111) | fn remove(&mut self, key: i32) { method extend (line 122) | fn extend(&mut self) { method print (line 141) | fn print(&self) { function main (line 156) | fn main() { FILE: zh-hant/codes/rust/chapter_hashing/simple_hash.rs function add_hash (line 8) | fn add_hash(key: &str) -> i32 { function mul_hash (line 20) | fn mul_hash(key: &str) -> i32 { function xor_hash (line 32) | fn xor_hash(key: &str) -> i32 { function rot_hash (line 44) | fn rot_hash(key: &str) -> i32 { function main (line 56) | fn main() { FILE: zh-hant/codes/rust/chapter_heap/heap.rs function test_push_max (line 11) | fn test_push_max(heap: &mut BinaryHeap, val: i32) { function test_pop_max (line 17) | fn test_pop_max(heap: &mut BinaryHeap) { function main (line 24) | fn main() { FILE: zh-hant/codes/rust/chapter_heap/my_heap.rs type MaxHeap (line 10) | struct MaxHeap { method new (line 17) | fn new(nums: Vec) -> Self { method left (line 28) | fn left(i: usize) -> usize { method right (line 33) | fn right(i: usize) -> usize { method parent (line 38) | fn parent(i: usize) -> usize { method swap (line 43) | fn swap(&mut self, i: usize, j: usize) { method size (line 48) | fn size(&self) -> usize { method is_empty (line 53) | fn is_empty(&self) -> bool { method peek (line 58) | fn peek(&self) -> Option { method push (line 63) | fn push(&mut self, val: i32) { method sift_up (line 71) | fn sift_up(&mut self, mut i: usize) { method pop (line 91) | fn pop(&mut self) -> i32 { method sift_down (line 107) | fn sift_down(&mut self, mut i: usize) { method print (line 129) | fn print(&self) { function main (line 135) | fn main() { FILE: zh-hant/codes/rust/chapter_heap/top_k.rs function top_k_heap (line 13) | fn top_k_heap(nums: Vec, k: usize) -> BinaryHeap> { function main (line 32) | fn main() { FILE: zh-hant/codes/rust/chapter_searching/binary_search.rs function binary_search (line 8) | fn binary_search(nums: &[i32], target: i32) -> i32 { function binary_search_lcro (line 31) | fn binary_search_lcro(nums: &[i32], target: i32) -> i32 { function main (line 54) | pub fn main() { FILE: zh-hant/codes/rust/chapter_searching/binary_search_edge.rs function binary_search_left_edge (line 12) | fn binary_search_left_edge(nums: &[i32], target: i32) -> i32 { function binary_search_right_edge (line 24) | fn binary_search_right_edge(nums: &[i32], target: i32) -> i32 { function main (line 38) | fn main() { FILE: zh-hant/codes/rust/chapter_searching/binary_search_insertion.rs function binary_search_insertion_simple (line 9) | fn binary_search_insertion_simple(nums: &[i32], target: i32) -> i32 { function binary_search_insertion (line 26) | pub fn binary_search_insertion(nums: &[i32], target: i32) -> i32 { function main (line 43) | fn main() { FILE: zh-hant/codes/rust/chapter_searching/hashing_search.rs function hashing_search_array (line 13) | fn hashing_search_array<'a>(map: &'a HashMap, target: i32) -... function hashing_search_linked_list (line 20) | fn hashing_search_linked_list( function main (line 30) | pub fn main() { FILE: zh-hant/codes/rust/chapter_searching/linear_search.rs function linear_search_array (line 12) | fn linear_search_array(nums: &[i32], target: i32) -> i32 { function linear_search_linked_list (line 25) | fn linear_search_linked_list( function main (line 42) | pub fn main() { FILE: zh-hant/codes/rust/chapter_searching/two_sum.rs function two_sum_brute_force (line 11) | pub fn two_sum_brute_force(nums: &Vec, target: i32) -> Option, target: i32) -> Option usize { method quick_sort (line 29) | pub fn quick_sort(left: i32, right: i32, nums: &mut [i32]) { type QuickSortMedian (line 43) | struct QuickSortMedian; method median_three (line 47) | fn median_three(nums: &mut [i32], left: usize, mid: usize, right: usiz... method partition (line 59) | fn partition(nums: &mut [i32], left: usize, right: usize) -> usize { method quick_sort (line 80) | pub fn quick_sort(left: i32, right: i32, nums: &mut [i32]) { type QuickSortTailCall (line 94) | struct QuickSortTailCall; method partition (line 98) | fn partition(nums: &mut [i32], left: usize, right: usize) -> usize { method quick_sort (line 115) | pub fn quick_sort(mut left: i32, mut right: i32, nums: &mut [i32]) { function main (line 133) | fn main() { FILE: zh-hant/codes/rust/chapter_sorting/radix_sort.rs function digit (line 10) | fn digit(num: i32, exp: i32) -> usize { function counting_sort_digit (line 16) | fn counting_sort_digit(nums: &mut [i32], exp: i32) { function radix_sort (line 42) | fn radix_sort(nums: &mut [i32]) { function main (line 54) | fn main() { FILE: zh-hant/codes/rust/chapter_sorting/selection_sort.rs function selection_sort (line 10) | fn selection_sort(nums: &mut [i32]) { function main (line 30) | pub fn main() { FILE: zh-hant/codes/rust/chapter_stack_and_queue/array_deque.rs type ArrayDeque (line 8) | struct ArrayDeque { function new (line 16) | pub fn new(capacity: usize) -> Self { function capacity (line 25) | pub fn capacity(&self) -> usize { function size (line 30) | pub fn size(&self) -> usize { function is_empty (line 35) | pub fn is_empty(&self) -> bool { function index (line 40) | fn index(&self, i: i32) -> usize { function push_first (line 48) | pub fn push_first(&mut self, num: T) { function push_last (line 62) | pub fn push_last(&mut self, num: T) { function pop_first (line 75) | fn pop_first(&mut self) -> T { function pop_last (line 84) | fn pop_last(&mut self) -> T { function peek_first (line 91) | fn peek_first(&self) -> T { function peek_last (line 99) | fn peek_last(&self) -> T { function to_array (line 109) | fn to_array(&self) -> Vec { function main (line 122) | fn main() { FILE: zh-hant/codes/rust/chapter_stack_and_queue/array_queue.rs type ArrayQueue (line 8) | struct ArrayQueue { function new (line 17) | fn new(capacity: i32) -> ArrayQueue { function capacity (line 27) | fn capacity(&self) -> i32 { function size (line 32) | fn size(&self) -> i32 { function is_empty (line 37) | fn is_empty(&self) -> bool { function push (line 42) | fn push(&mut self, num: T) { function pop (line 56) | fn pop(&mut self) -> T { function peek (line 65) | fn peek(&self) -> T { function to_vector (line 73) | fn to_vector(&self) -> Vec { function main (line 86) | fn main() { FILE: zh-hant/codes/rust/chapter_stack_and_queue/array_stack.rs type ArrayStack (line 10) | struct ArrayStack { function new (line 16) | fn new() -> ArrayStack { function size (line 23) | fn size(&self) -> usize { function is_empty (line 28) | fn is_empty(&self) -> bool { function push (line 33) | fn push(&mut self, num: T) { function pop (line 38) | fn pop(&mut self) -> Option { function peek (line 43) | fn peek(&self) -> Option<&T> { function to_array (line 51) | fn to_array(&self) -> &Vec { function main (line 57) | fn main() { FILE: zh-hant/codes/rust/chapter_stack_and_queue/deque.rs function main (line 11) | pub fn main() { FILE: zh-hant/codes/rust/chapter_stack_and_queue/linkedlist_deque.rs type ListNode (line 13) | pub struct ListNode { function new (line 20) | pub fn new(val: T) -> Rc>> { type LinkedListDeque (line 31) | pub struct LinkedListDeque { function new (line 38) | pub fn new() -> Self { function size (line 47) | pub fn size(&self) -> usize { function is_empty (line 52) | pub fn is_empty(&self) -> bool { function push (line 57) | fn push(&mut self, num: T, is_front: bool) { function push_first (line 95) | pub fn push_first(&mut self, num: T) { function push_last (line 100) | pub fn push_last(&mut self, num: T) { function pop (line 105) | fn pop(&mut self, is_front: bool) -> Option { function pop_first (line 145) | pub fn pop_first(&mut self) -> Option { function pop_last (line 150) | pub fn pop_last(&mut self) -> Option { function peek_first (line 155) | pub fn peek_first(&self) -> Option<&Rc>>> { function peek_last (line 160) | pub fn peek_last(&self) -> Option<&Rc>>> { function to_array (line 165) | pub fn to_array(&self, head: Option<&Rc>>>) -> Vec { function main (line 180) | fn main() { FILE: zh-hant/codes/rust/chapter_stack_and_queue/linkedlist_queue.rs type LinkedListQueue (line 14) | pub struct LinkedListQueue { function new (line 21) | pub fn new() -> Self { function size (line 30) | pub fn size(&self) -> usize { function is_empty (line 35) | pub fn is_empty(&self) -> bool { function push (line 40) | pub fn push(&mut self, num: T) { function pop (line 59) | pub fn pop(&mut self) -> Option { function peek (line 75) | pub fn peek(&self) -> Option<&Rc>>> { function to_array (line 80) | pub fn to_array(&self, head: Option<&Rc>>>) -> Vec { function main (line 97) | fn main() { FILE: zh-hant/codes/rust/chapter_stack_and_queue/linkedlist_stack.rs type LinkedListStack (line 14) | pub struct LinkedListStack { function new (line 20) | pub fn new() -> Self { function size (line 28) | pub fn size(&self) -> usize { function is_empty (line 33) | pub fn is_empty(&self) -> bool { function push (line 38) | pub fn push(&mut self, num: T) { function pop (line 46) | pub fn pop(&mut self) -> Option { function peek (line 56) | pub fn peek(&self) -> Option<&Rc>>> { function to_array (line 61) | pub fn to_array(&self) -> Vec { function main (line 76) | fn main() { FILE: zh-hant/codes/rust/chapter_stack_and_queue/queue.rs function main (line 12) | pub fn main() { FILE: zh-hant/codes/rust/chapter_stack_and_queue/stack.rs function main (line 10) | pub fn main() { FILE: zh-hant/codes/rust/chapter_tree/array_binary_tree.rs type ArrayBinaryTree (line 10) | struct ArrayBinaryTree { method new (line 16) | fn new(arr: Vec>) -> Self { method size (line 21) | fn size(&self) -> i32 { method val (line 26) | fn val(&self, i: i32) -> Option { method left (line 36) | fn left(&self, i: i32) -> i32 { method right (line 41) | fn right(&self, i: i32) -> i32 { method parent (line 46) | fn parent(&self, i: i32) -> i32 { method level_order (line 51) | fn level_order(&self) -> Vec { method dfs (line 56) | fn dfs(&self, i: i32, order: &'static str, res: &mut Vec) { method pre_order (line 78) | fn pre_order(&self) -> Vec { method in_order (line 85) | fn in_order(&self) -> Vec { method post_order (line 92) | fn post_order(&self) -> Vec { function main (line 100) | fn main() { FILE: zh-hant/codes/rust/chapter_tree/avl_tree.rs type OptionTreeNodeRc (line 13) | type OptionTreeNodeRc = Option>>; type AVLTree (line 16) | struct AVLTree { method new (line 22) | fn new() -> Self { method height (line 27) | fn height(node: OptionTreeNodeRc) -> i32 { method update_height (line 36) | fn update_height(node: OptionTreeNodeRc) { method balance_factor (line 46) | fn balance_factor(node: OptionTreeNodeRc) -> i32 { method right_rotate (line 58) | fn right_rotate(node: OptionTreeNodeRc) -> OptionTreeNodeRc { method left_rotate (line 77) | fn left_rotate(node: OptionTreeNodeRc) -> OptionTreeNodeRc { method rotate (line 96) | fn rotate(node: OptionTreeNodeRc) -> OptionTreeNodeRc { method insert (line 131) | fn insert(&mut self, val: i32) { method insert_helper (line 136) | fn insert_helper(node: OptionTreeNodeRc, val: i32) -> OptionTreeNodeRc { method remove (line 170) | fn remove(&self, val: i32) { method remove_helper (line 175) | fn remove_helper(node: OptionTreeNodeRc, val: i32) -> OptionTreeNodeRc { method search (line 225) | fn search(&self, val: i32) -> OptionTreeNodeRc { function main (line 250) | fn main() { FILE: zh-hant/codes/rust/chapter_tree/binary_search_tree.rs type OptionTreeNodeRc (line 15) | type OptionTreeNodeRc = Option>>; type BinarySearchTree (line 18) | pub struct BinarySearchTree { method new (line 24) | pub fn new() -> Self { method get_root (line 30) | pub fn get_root(&self) -> OptionTreeNodeRc { method search (line 35) | pub fn search(&self, num: i32) -> OptionTreeNodeRc { method insert (line 54) | pub fn insert(&mut self, num: i32) { method remove (line 90) | pub fn remove(&mut self, num: i32) { function main (line 161) | fn main() { FILE: zh-hant/codes/rust/chapter_tree/binary_tree.rs function main (line 10) | fn main() { FILE: zh-hant/codes/rust/chapter_tree/binary_tree_bfs.rs function level_order (line 14) | fn level_order(root: &Rc>) -> Vec { function main (line 35) | fn main() { FILE: zh-hant/codes/rust/chapter_tree/binary_tree_dfs.rs function pre_order (line 14) | fn pre_order(root: Option<&Rc>>) -> Vec { function in_order (line 32) | fn in_order(root: Option<&Rc>>) -> Vec { function post_order (line 50) | fn post_order(root: Option<&Rc>>) -> Vec { function main (line 69) | fn main() { FILE: zh-hant/codes/rust/include/list_node.rs type ListNode (line 12) | pub struct ListNode { function new (line 18) | pub fn new(val: T) -> Rc>> { function arr_to_linked_list (line 23) | pub fn arr_to_linked_list(array: &[T]) -> Option>>> function linked_list_to_hashmap (line 40) | pub fn linked_list_to_hashmap( FILE: zh-hant/codes/rust/include/print_util.rs type Trunk (line 15) | struct Trunk<'a, 'b> { function print_array (line 21) | pub fn print_array(nums: &[T]) { function print_hash_map (line 33) | pub fn print_hash_map(map: &HashMap(queue: &VecDeque) { function print_linked_list (line 49) | pub fn print_linked_list(head: &Rc>>) { function print_tree (line 57) | pub fn print_tree(root: &Rc>) { function _print_tree (line 62) | fn _print_tree(root: Option<&Rc>>, prev: Option<&Trunk... function show_trunks (line 89) | fn show_trunks(trunk: Option<&Trunk>) { function print_heap (line 97) | pub fn print_heap(heap: Vec) { FILE: zh-hant/codes/rust/include/tree_node.rs type TreeNode (line 12) | pub struct TreeNode { method new (line 22) | pub fn new(val: i32) -> Rc> { function vec_to_tree_dfs (line 59) | fn vec_to_tree_dfs(arr: &[Option], i: usize) -> Option>) -> Option... function tree_to_vec_dfs (line 75) | fn tree_to_vec_dfs(root: Option<&Rc>>, i: usize, res: ... function tree_to_vec (line 88) | pub fn tree_to_vec(root: Option>>) -> Vec) -> Vec { function vets_to_vals (line 19) | pub fn vets_to_vals(vets: Vec) -> Vec { FILE: zh-hant/codes/rust/src/include/list_node.rs type ListNode (line 12) | pub struct ListNode { function new (line 18) | pub fn new(val: T) -> Rc>> { function arr_to_linked_list (line 23) | pub fn arr_to_linked_list(array: &[T]) -> Option>>> function linked_list_to_hashmap (line 40) | pub fn linked_list_to_hashmap( FILE: zh-hant/codes/rust/src/include/print_util.rs type Trunk (line 15) | struct Trunk<'a, 'b> { function print_array (line 21) | pub fn print_array(nums: &[T]) { function print_hash_map (line 33) | pub fn print_hash_map(map: &HashMap(queue: &VecDeque) { function print_linked_list (line 49) | pub fn print_linked_list(head: &Rc>>) { function print_tree (line 57) | pub fn print_tree(root: &Rc>) { function _print_tree (line 62) | fn _print_tree(root: Option<&Rc>>, prev: Option<&Trunk... function show_trunks (line 89) | fn show_trunks(trunk: Option<&Trunk>) { function print_heap (line 97) | pub fn print_heap(heap: Vec) { FILE: zh-hant/codes/rust/src/include/tree_node.rs type TreeNode (line 12) | pub struct TreeNode { method new (line 22) | pub fn new(val: i32) -> Rc> { function vec_to_tree_dfs (line 59) | fn vec_to_tree_dfs(arr: &[Option], i: usize) -> Option>) -> Option... function tree_to_vec_dfs (line 75) | fn tree_to_vec_dfs(root: Option<&Rc>>, i: usize, res: ... function tree_to_vec (line 88) | pub fn tree_to_vec(root: Option>>) -> Vec Self { function vals_to_vets (line 20) | pub fn vals_to_vets(vals: Vec) -> Vec { function vets_to_vals (line 25) | pub fn vets_to_vals(vets: Vec) -> Vec { FILE: zh-hant/codes/typescript/chapter_array_and_linkedlist/array.ts function randomAccess (line 8) | function randomAccess(nums: number[]): number { function extend (line 19) | function extend(nums: number[], enlarge: number): number[] { function insert (line 31) | function insert(nums: number[], num: number, index: number): void { function remove (line 41) | function remove(nums: number[], index: number): void { function traverse (line 49) | function traverse(nums: number[]): void { function find (line 62) | function find(nums: number[], target: number): number { FILE: zh-hant/codes/typescript/chapter_array_and_linkedlist/linked_list.ts function insert (line 11) | function insert(n0: ListNode, P: ListNode): void { function remove (line 18) | function remove(n0: ListNode): void { function access (line 29) | function access(head: ListNode | null, index: number): ListNode | null { function find (line 40) | function find(head: ListNode | null, target: number): number { FILE: zh-hant/codes/typescript/chapter_array_and_linkedlist/my_list.ts class MyList (line 8) | class MyList { method constructor (line 15) | constructor() { method size (line 20) | public size(): number { method capacity (line 25) | public capacity(): number { method get (line 30) | public get(index: number): number { method set (line 37) | public set(index: number, num: number): void { method add (line 43) | public add(num: number): void { method insert (line 52) | public insert(index: number, num: number): void { method remove (line 68) | public remove(index: number): number { method extendCapacity (line 82) | public extendCapacity(): void { method toArray (line 92) | public toArray(): number[] { FILE: zh-hant/codes/typescript/chapter_backtracking/n_queens.ts function backtrack (line 8) | function backtrack( function nQueens (line 42) | function nQueens(n: number): string[][][] { FILE: zh-hant/codes/typescript/chapter_backtracking/permutations_i.ts function backtrack (line 8) | function backtrack( function permutationsI (line 36) | function permutationsI(nums: number[]): number[][] { FILE: zh-hant/codes/typescript/chapter_backtracking/permutations_ii.ts function backtrack (line 8) | function backtrack( function permutationsII (line 38) | function permutationsII(nums: number[]): number[][] { FILE: zh-hant/codes/typescript/chapter_backtracking/preorder_traversal_i_compact.ts function preOrder (line 12) | function preOrder(root: TreeNode | null, res: TreeNode[]): void { FILE: zh-hant/codes/typescript/chapter_backtracking/preorder_traversal_ii_compact.ts function preOrder (line 12) | function preOrder( FILE: zh-hant/codes/typescript/chapter_backtracking/preorder_traversal_iii_compact.ts function preOrder (line 12) | function preOrder( FILE: zh-hant/codes/typescript/chapter_backtracking/preorder_traversal_iii_template.ts function isSolution (line 12) | function isSolution(state: TreeNode[]): boolean { function recordSolution (line 17) | function recordSolution(state: TreeNode[], res: TreeNode[][]): void { function isValid (line 22) | function isValid(state: TreeNode[], choice: TreeNode): boolean { function makeChoice (line 27) | function makeChoice(state: TreeNode[], choice: TreeNode): void { function undoChoice (line 32) | function undoChoice(state: TreeNode[]): void { function backtrack (line 37) | function backtrack( FILE: zh-hant/codes/typescript/chapter_backtracking/subset_sum_i.ts function backtrack (line 8) | function backtrack( function subsetSumI (line 38) | function subsetSumI(nums: number[], target: number): number[][] { FILE: zh-hant/codes/typescript/chapter_backtracking/subset_sum_i_naive.ts function backtrack (line 8) | function backtrack( function subsetSumINaive (line 36) | function subsetSumINaive(nums: number[], target: number): number[][] { FILE: zh-hant/codes/typescript/chapter_backtracking/subset_sum_ii.ts function backtrack (line 8) | function backtrack( function subsetSumII (line 43) | function subsetSumII(nums: number[], target: number): number[][] { FILE: zh-hant/codes/typescript/chapter_computational_complexity/iteration.ts function forLoop (line 8) | function forLoop(n: number): number { function whileLoop (line 18) | function whileLoop(n: number): number { function whileLoopII (line 30) | function whileLoopII(n: number): number { function nestedForLoop (line 44) | function nestedForLoop(n: number): string { FILE: zh-hant/codes/typescript/chapter_computational_complexity/recursion.ts function recur (line 8) | function recur(n: number): number { function forLoopRecur (line 18) | function forLoopRecur(n: number): number { function tailRecur (line 37) | function tailRecur(n: number, res: number): number { function fib (line 45) | function fib(n: number): number { FILE: zh-hant/codes/typescript/chapter_computational_complexity/space_complexity.ts function constFunc (line 12) | function constFunc(): number { function constant (line 18) | function constant(n: number): void { function linear (line 35) | function linear(n: number): void { function linearRecur (line 51) | function linearRecur(n: number): void { function quadratic (line 58) | function quadratic(n: number): void { function quadraticRecur (line 75) | function quadraticRecur(n: number): number { function buildTree (line 83) | function buildTree(n: number): TreeNode | null { FILE: zh-hant/codes/typescript/chapter_computational_complexity/time_complexity.ts function constant (line 8) | function constant(n: number): number { function linear (line 16) | function linear(n: number): number { function arrayTraversal (line 23) | function arrayTraversal(nums: number[]): number { function quadratic (line 33) | function quadratic(n: number): number { function bubbleSort (line 45) | function bubbleSort(nums: number[]): number { function exponential (line 64) | function exponential(n: number): number { function expRecur (line 79) | function expRecur(n: number): number { function logarithmic (line 85) | function logarithmic(n: number): number { function logRecur (line 95) | function logRecur(n: number): number { function linearLogRecur (line 101) | function linearLogRecur(n: number): number { function factorialRecur (line 111) | function factorialRecur(n: number): number { FILE: zh-hant/codes/typescript/chapter_computational_complexity/worst_best_time_complexity.ts function randomNumbers (line 8) | function randomNumbers(n: number): number[] { function findOne (line 25) | function findOne(nums: number[]): number { FILE: zh-hant/codes/typescript/chapter_divide_and_conquer/binary_search_recur.ts function dfs (line 8) | function dfs(nums: number[], target: number, i: number, j: number): numb... function binarySearch (line 28) | function binarySearch(nums: number[], target: number): number { FILE: zh-hant/codes/typescript/chapter_divide_and_conquer/build_tree.ts function dfs (line 11) | function dfs( function buildTree (line 33) | function buildTree(preorder: number[], inorder: number[]): TreeNode | nu... FILE: zh-hant/codes/typescript/chapter_divide_and_conquer/hanota.ts function move (line 8) | function move(src: number[], tar: number[]): void { function dfs (line 16) | function dfs(i: number, src: number[], buf: number[], tar: number[]): vo... function solveHanota (line 31) | function solveHanota(A: number[], B: number[], C: number[]): void { FILE: zh-hant/codes/typescript/chapter_dynamic_programming/climbing_stairs_backtrack.ts function backtrack (line 8) | function backtrack( function climbingStairsBacktrack (line 27) | function climbingStairsBacktrack(n: number): number { FILE: zh-hant/codes/typescript/chapter_dynamic_programming/climbing_stairs_constraint_dp.ts function climbingStairsConstraintDP (line 8) | function climbingStairsConstraintDP(n: number): number { FILE: zh-hant/codes/typescript/chapter_dynamic_programming/climbing_stairs_dfs.ts function dfs (line 8) | function dfs(i: number): number { function climbingStairsDFS (line 17) | function climbingStairsDFS(n: number): number { FILE: zh-hant/codes/typescript/chapter_dynamic_programming/climbing_stairs_dfs_mem.ts function dfs (line 8) | function dfs(i: number, mem: number[]): number { function climbingStairsDFSMem (line 21) | function climbingStairsDFSMem(n: number): number { FILE: zh-hant/codes/typescript/chapter_dynamic_programming/climbing_stairs_dp.ts function climbingStairsDP (line 8) | function climbingStairsDP(n: number): number { function climbingStairsDPComp (line 23) | function climbingStairsDPComp(n: number): number { FILE: zh-hant/codes/typescript/chapter_dynamic_programming/coin_change.ts function coinChangeDP (line 8) | function coinChangeDP(coins: Array, amt: number): number { function coinChangeDPComp (line 35) | function coinChangeDPComp(coins: Array, amt: number): number { FILE: zh-hant/codes/typescript/chapter_dynamic_programming/coin_change_ii.ts function coinChangeIIDP (line 8) | function coinChangeIIDP(coins: Array, amt: number): number { function coinChangeIIDPComp (line 34) | function coinChangeIIDPComp(coins: Array, amt: number): number { FILE: zh-hant/codes/typescript/chapter_dynamic_programming/edit_distance.ts function editDistanceDFS (line 8) | function editDistanceDFS(s: string, t: string, i: number, j: number): nu... function editDistanceDFSMem (line 31) | function editDistanceDFSMem( function editDistanceDP (line 64) | function editDistanceDP(s: string, t: string): number { function editDistanceDPComp (line 94) | function editDistanceDPComp(s: string, t: string): number { FILE: zh-hant/codes/typescript/chapter_dynamic_programming/knapsack.ts function knapsackDFS (line 8) | function knapsackDFS( function knapsackDFSMem (line 30) | function knapsackDFSMem( function knapsackDP (line 59) | function knapsackDP( function knapsackDPComp (line 88) | function knapsackDPComp( FILE: zh-hant/codes/typescript/chapter_dynamic_programming/min_cost_climbing_stairs_dp.ts function minCostClimbingStairsDP (line 8) | function minCostClimbingStairsDP(cost: Array): number { function minCostClimbingStairsDPComp (line 26) | function minCostClimbingStairsDPComp(cost: Array): number { FILE: zh-hant/codes/typescript/chapter_dynamic_programming/min_path_sum.ts function minPathSumDFS (line 8) | function minPathSumDFS( function minPathSumDFSMem (line 29) | function minPathSumDFSMem( function minPathSumDP (line 56) | function minPathSumDP(grid: Array>): number { function minPathSumDPComp (line 82) | function minPathSumDPComp(grid: Array>): number { FILE: zh-hant/codes/typescript/chapter_dynamic_programming/unbounded_knapsack.ts function unboundedKnapsackDP (line 8) | function unboundedKnapsackDP( function unboundedKnapsackDPComp (line 37) | function unboundedKnapsackDPComp( FILE: zh-hant/codes/typescript/chapter_graph/graph_adjacency_list.ts class GraphAdjList (line 10) | class GraphAdjList { method constructor (line 15) | constructor(edges: Vertex[][]) { method size (line 26) | size(): number { method addEdge (line 31) | addEdge(vet1: Vertex, vet2: Vertex): void { method removeEdge (line 45) | removeEdge(vet1: Vertex, vet2: Vertex): void { method addVertex (line 60) | addVertex(vet: Vertex): void { method removeVertex (line 67) | removeVertex(vet: Vertex): void { method print (line 83) | print(): void { FILE: zh-hant/codes/typescript/chapter_graph/graph_adjacency_matrix.ts class GraphAdjMat (line 8) | class GraphAdjMat { method constructor (line 13) | constructor(vertices: number[], edges: number[][]) { method size (line 28) | size(): number { method addVertex (line 33) | addVertex(val: number): void { method removeVertex (line 50) | removeVertex(index: number): void { method addEdge (line 67) | addEdge(i: number, j: number): void { method removeEdge (line 79) | removeEdge(i: number, j: number): void { method print (line 89) | print(): void { FILE: zh-hant/codes/typescript/chapter_graph/graph_bfs.ts function graphBFS (line 12) | function graphBFS(graph: GraphAdjList, startVet: Vertex): Vertex[] { FILE: zh-hant/codes/typescript/chapter_graph/graph_dfs.ts function dfs (line 11) | function dfs( function graphDFS (line 31) | function graphDFS(graph: GraphAdjList, startVet: Vertex): Vertex[] { FILE: zh-hant/codes/typescript/chapter_greedy/coin_change_greedy.ts function coinChangeGreedy (line 8) | function coinChangeGreedy(coins: number[], amt: number): number { FILE: zh-hant/codes/typescript/chapter_greedy/fractional_knapsack.ts class Item (line 8) | class Item { method constructor (line 12) | constructor(w: number, v: number) { function fractionalKnapsack (line 19) | function fractionalKnapsack(wgt: number[], val: number[], cap: number): ... FILE: zh-hant/codes/typescript/chapter_greedy/max_capacity.ts function maxCapacity (line 8) | function maxCapacity(ht: number[]): number { FILE: zh-hant/codes/typescript/chapter_greedy/max_product_cutting.ts function maxProductCutting (line 8) | function maxProductCutting(n: number): number { FILE: zh-hant/codes/typescript/chapter_hashing/array_hash_map.ts class Pair (line 8) | class Pair { method constructor (line 12) | constructor(key: number, val: string) { class ArrayHashMap (line 19) | class ArrayHashMap { method constructor (line 22) | constructor() { method hashFunc (line 28) | private hashFunc(key: number): number { method get (line 33) | public get(key: number): string | null { method set (line 41) | public set(key: number, val: string) { method delete (line 47) | public delete(key: number) { method entries (line 54) | public entries(): (Pair | null)[] { method keys (line 65) | public keys(): (number | undefined)[] { method values (line 76) | public values(): (string | undefined)[] { method print (line 87) | public print() { FILE: zh-hant/codes/typescript/chapter_hashing/hash_map_chaining.ts class Pair (line 8) | class Pair { method constructor (line 11) | constructor(key: number, val: string) { class HashMapChaining (line 18) | class HashMapChaining { method constructor (line 26) | constructor() { method #hashFunc (line 35) | #hashFunc(key: number): number { method #loadFactor (line 40) | #loadFactor(): number { method get (line 45) | get(key: number): string | null { method put (line 59) | put(key: number, val: string): void { method remove (line 80) | remove(key: number): void { method #extend (line 94) | #extend(): void { method print (line 110) | print(): void { FILE: zh-hant/codes/typescript/chapter_hashing/hash_map_open_addressing.ts class Pair (line 8) | class Pair { method constructor (line 12) | constructor(key: number, val: string) { class HashMapOpenAddressing (line 19) | class HashMapOpenAddressing { method constructor (line 28) | constructor() { method hashFunc (line 38) | private hashFunc(key: number): number { method loadFactor (line 43) | private loadFactor(): number { method findBucket (line 48) | private findBucket(key: number): number { method get (line 78) | get(key: number): string | null { method put (line 93) | put(key: number, val: string): void { method remove (line 114) | remove(key: number): void { method extend (line 128) | private extend(): void { method print (line 144) | print(): void { FILE: zh-hant/codes/typescript/chapter_hashing/simple_hash.ts function addHash (line 8) | function addHash(key: string): number { function mulHash (line 18) | function mulHash(key: string): number { function xorHash (line 28) | function xorHash(key: string): number { function rotHash (line 38) | function rotHash(key: string): number { FILE: zh-hant/codes/typescript/chapter_heap/my_heap.ts class MaxHeap (line 10) | class MaxHeap { method constructor (line 13) | constructor(nums?: number[]) { method left (line 23) | private left(i: number): number { method right (line 28) | private right(i: number): number { method parent (line 33) | private parent(i: number): number { method swap (line 38) | private swap(i: number, j: number): void { method size (line 45) | public size(): number { method isEmpty (line 50) | public isEmpty(): boolean { method peek (line 55) | public peek(): number { method push (line 60) | public push(val: number): void { method siftUp (line 68) | private siftUp(i: number): void { method pop (line 82) | public pop(): number { method siftDown (line 96) | private siftDown(i: number): void { method print (line 114) | public print(): void { method getMaxHeap (line 119) | public getMaxHeap(): number[] { FILE: zh-hant/codes/typescript/chapter_heap/top_k.ts function pushMinHeap (line 10) | function pushMinHeap(maxHeap: MaxHeap, val: number): void { function popMinHeap (line 16) | function popMinHeap(maxHeap: MaxHeap): number { function peekMinHeap (line 22) | function peekMinHeap(maxHeap: MaxHeap): number { function getMinHeap (line 28) | function getMinHeap(maxHeap: MaxHeap): number[] { function topKHeap (line 34) | function topKHeap(nums: number[], k: number): number[] { FILE: zh-hant/codes/typescript/chapter_searching/binary_search.ts function binarySearch (line 8) | function binarySearch(nums: number[], target: number): number { function binarySearchLCRO (line 31) | function binarySearchLCRO(nums: number[], target: number): number { FILE: zh-hant/codes/typescript/chapter_searching/binary_search_edge.ts function binarySearchLeftEdge (line 9) | function binarySearchLeftEdge(nums: Array, target: number): numb... function binarySearchRightEdge (line 21) | function binarySearchRightEdge(nums: Array, target: number): num... FILE: zh-hant/codes/typescript/chapter_searching/binary_search_insertion.ts function binarySearchInsertionSimple (line 8) | function binarySearchInsertionSimple( function binarySearchInsertion (line 29) | function binarySearchInsertion(nums: Array, target: number): num... FILE: zh-hant/codes/typescript/chapter_searching/hashing_search.ts function hashingSearchArray (line 10) | function hashingSearchArray(map: Map, target: number): n... function hashingSearchLinkedList (line 17) | function hashingSearchLinkedList( FILE: zh-hant/codes/typescript/chapter_searching/linear_search.ts function linearSearchArray (line 10) | function linearSearchArray(nums: number[], target: number): number { function linearSearchLinkedList (line 23) | function linearSearchLinkedList( FILE: zh-hant/codes/typescript/chapter_searching/two_sum.ts function twoSumBruteForce (line 8) | function twoSumBruteForce(nums: number[], target: number): number[] { function twoSumHashTable (line 22) | function twoSumHashTable(nums: number[], target: number): number[] { FILE: zh-hant/codes/typescript/chapter_sorting/bubble_sort.ts function bubbleSort (line 8) | function bubbleSort(nums: number[]): void { function bubbleSortWithFlag (line 24) | function bubbleSortWithFlag(nums: number[]): void { FILE: zh-hant/codes/typescript/chapter_sorting/bucket_sort.ts function bucketSort (line 8) | function bucketSort(nums: number[]): void { FILE: zh-hant/codes/typescript/chapter_sorting/counting_sort.ts function countingSortNaive (line 9) | function countingSortNaive(nums: number[]): void { function countingSort (line 29) | function countingSort(nums: number[]): void { FILE: zh-hant/codes/typescript/chapter_sorting/heap_sort.ts function siftDown (line 8) | function siftDown(nums: number[], n: number, i: number): void { function heapSort (line 32) | function heapSort(nums: number[]): void { FILE: zh-hant/codes/typescript/chapter_sorting/insertion_sort.ts function insertionSort (line 8) | function insertionSort(nums: number[]): void { FILE: zh-hant/codes/typescript/chapter_sorting/merge_sort.ts function merge (line 8) | function merge(nums: number[], left: number, mid: number, right: number)... function mergeSort (line 38) | function mergeSort(nums: number[], left: number, right: number): void { FILE: zh-hant/codes/typescript/chapter_sorting/quick_sort.ts class QuickSort (line 8) | class QuickSort { method swap (line 10) | swap(nums: number[], i: number, j: number): void { method partition (line 17) | partition(nums: number[], left: number, right: number): number { method quickSort (line 36) | quickSort(nums: number[], left: number, right: number): void { class QuickSortMedian (line 50) | class QuickSortMedian { method swap (line 52) | swap(nums: number[], i: number, j: number): void { method medianThree (line 59) | medianThree( method partition (line 76) | partition(nums: number[], left: number, right: number): number { method quickSort (line 103) | quickSort(nums: number[], left: number, right: number): void { class QuickSortTailCall (line 117) | class QuickSortTailCall { method swap (line 119) | swap(nums: number[], i: number, j: number): void { method partition (line 126) | partition(nums: number[], left: number, right: number): number { method quickSort (line 144) | quickSort(nums: number[], left: number, right: number): void { FILE: zh-hant/codes/typescript/chapter_sorting/radix_sort.ts function digit (line 8) | function digit(num: number, exp: number): number { function countingSortDigit (line 14) | function countingSortDigit(nums: number[], exp: number): void { function radixSort (line 42) | function radixSort(nums: number[]): void { FILE: zh-hant/codes/typescript/chapter_sorting/selection_sort.ts function selectionSort (line 8) | function selectionSort(nums: number[]): void { FILE: zh-hant/codes/typescript/chapter_stack_and_queue/array_deque.ts class ArrayDeque (line 8) | class ArrayDeque { method constructor (line 14) | constructor(capacity: number) { method capacity (line 21) | capacity(): number { method size (line 26) | size(): number { method isEmpty (line 31) | isEmpty(): boolean { method index (line 36) | index(i: number): number { method pushFirst (line 44) | pushFirst(num: number): void { method pushLast (line 58) | pushLast(num: number): void { method popFirst (line 71) | popFirst(): number { method popLast (line 80) | popLast(): number { method peekFirst (line 87) | peekFirst(): number { method peekLast (line 93) | peekLast(): number { method toArray (line 101) | toArray(): number[] { FILE: zh-hant/codes/typescript/chapter_stack_and_queue/array_queue.ts class ArrayQueue (line 8) | class ArrayQueue { method constructor (line 13) | constructor(capacity: number) { method capacity (line 19) | get capacity(): number { method size (line 24) | get size(): number { method isEmpty (line 29) | isEmpty(): boolean { method push (line 34) | push(num: number): void { method pop (line 48) | pop(): number { method peek (line 57) | peek(): number { method toArray (line 63) | toArray(): number[] { FILE: zh-hant/codes/typescript/chapter_stack_and_queue/array_stack.ts class ArrayStack (line 8) | class ArrayStack { method constructor (line 10) | constructor() { method size (line 15) | get size(): number { method isEmpty (line 20) | isEmpty(): boolean { method push (line 25) | push(num: number): void { method pop (line 30) | pop(): number | undefined { method top (line 36) | top(): number | undefined { method toArray (line 42) | toArray() { FILE: zh-hant/codes/typescript/chapter_stack_and_queue/linkedlist_deque.ts class ListNode (line 8) | class ListNode { method constructor (line 13) | constructor(val: number) { class LinkedListDeque (line 21) | class LinkedListDeque { method constructor (line 26) | constructor() { method pushLast (line 33) | pushLast(val: number): void { method pushFirst (line 49) | pushFirst(val: number): void { method popLast (line 65) | popLast(): number { method popFirst (line 82) | popFirst(): number { method peekLast (line 99) | peekLast(): number { method peekFirst (line 104) | peekFirst(): number { method size (line 109) | size(): number { method isEmpty (line 114) | isEmpty(): boolean { method print (line 119) | print(): void { FILE: zh-hant/codes/typescript/chapter_stack_and_queue/linkedlist_queue.ts class LinkedListQueue (line 10) | class LinkedListQueue { method constructor (line 15) | constructor() { method size (line 21) | get size(): number { method isEmpty (line 26) | isEmpty(): boolean { method push (line 31) | push(num: number): void { method pop (line 47) | pop(): number { method peek (line 57) | peek(): number { method toArray (line 63) | toArray(): number[] { FILE: zh-hant/codes/typescript/chapter_stack_and_queue/linkedlist_stack.ts class LinkedListStack (line 10) | class LinkedListStack { method constructor (line 14) | constructor() { method size (line 19) | get size(): number { method isEmpty (line 24) | isEmpty(): boolean { method push (line 29) | push(num: number): void { method pop (line 37) | pop(): number { method peek (line 46) | peek(): number { method toArray (line 52) | toArray(): number[] { FILE: zh-hant/codes/typescript/chapter_tree/array_binary_tree.ts type Order (line 10) | type Order = 'pre' | 'in' | 'post'; class ArrayBinaryTree (line 13) | class ArrayBinaryTree { method constructor (line 17) | constructor(arr: (number | null)[]) { method size (line 22) | size(): number { method val (line 27) | val(i: number): number | null { method left (line 34) | left(i: number): number { method right (line 39) | right(i: number): number { method parent (line 44) | parent(i: number): number { method levelOrder (line 49) | levelOrder(): number[] { method #dfs (line 59) | #dfs(i: number, order: Order, res: (number | null)[]): void { method preOrder (line 73) | preOrder(): (number | null)[] { method inOrder (line 80) | inOrder(): (number | null)[] { method postOrder (line 87) | postOrder(): (number | null)[] { FILE: zh-hant/codes/typescript/chapter_tree/avl_tree.ts class AVLTree (line 11) | class AVLTree { method constructor (line 14) | constructor() { method height (line 19) | height(node: TreeNode): number { method updateHeight (line 25) | private updateHeight(node: TreeNode): void { method balanceFactor (line 32) | balanceFactor(node: TreeNode): number { method rightRotate (line 40) | private rightRotate(node: TreeNode): TreeNode { method leftRotate (line 54) | private leftRotate(node: TreeNode): TreeNode { method rotate (line 68) | private rotate(node: TreeNode): TreeNode { method insert (line 98) | insert(val: number): void { method insertHelper (line 103) | private insertHelper(node: TreeNode, val: number): TreeNode { method remove (line 121) | remove(val: number): void { method removeHelper (line 126) | private removeHelper(node: TreeNode, val: number): TreeNode { method search (line 161) | search(val: number): TreeNode { function testInsert (line 181) | function testInsert(tree: AVLTree, val: number): void { function testRemove (line 187) | function testRemove(tree: AVLTree, val: number): void { FILE: zh-hant/codes/typescript/chapter_tree/binary_search_tree.ts class BinarySearchTree (line 11) | class BinarySearchTree { method constructor (line 15) | constructor() { method getRoot (line 21) | getRoot(): TreeNode | null { method search (line 26) | search(num: number): TreeNode | null { method insert (line 42) | insert(num: number): void { method remove (line 67) | remove(num: number): void { FILE: zh-hant/codes/typescript/chapter_tree/binary_tree_bfs.ts function levelOrder (line 12) | function levelOrder(root: TreeNode | null): number[] { FILE: zh-hant/codes/typescript/chapter_tree/binary_tree_dfs.ts function preOrder (line 15) | function preOrder(root: TreeNode | null): void { function inOrder (line 26) | function inOrder(root: TreeNode | null): void { function postOrder (line 37) | function postOrder(root: TreeNode | null): void { FILE: zh-hant/codes/typescript/modules/ListNode.ts class ListNode (line 8) | class ListNode { method constructor (line 11) | constructor(val?: number, next?: ListNode | null) { function arrToLinkedList (line 18) | function arrToLinkedList(arr: number[]): ListNode | null { FILE: zh-hant/codes/typescript/modules/PrintUtil.ts function printLinkedList (line 11) | function printLinkedList(head: ListNode | null): void { class Trunk (line 20) | class Trunk { method constructor (line 24) | constructor(prev: Trunk | null, str: string) { function printTree (line 35) | function printTree(root: TreeNode | null) { function printTreeHelper (line 40) | function printTreeHelper( function showTrunks (line 75) | function showTrunks(p: Trunk | null) { function printHeap (line 85) | function printHeap(arr: number[]): void { FILE: zh-hant/codes/typescript/modules/TreeNode.ts class TreeNode (line 8) | class TreeNode { method constructor (line 13) | constructor( function arrToTree (line 27) | function arrToTree(arr: (number | null)[], i: number = 0): TreeNode | nu... FILE: zh-hant/codes/typescript/modules/Vertex.ts class Vertex (line 8) | class Vertex { method constructor (line 10) | constructor(val: number) { method valsToVets (line 15) | public static valsToVets(vals: number[]): Vertex[] { method vetsToVals (line 24) | public static vetsToVals(vets: Vertex[]): number[] {