├── .github └── workflows │ └── pages.yml ├── .gitignore ├── LICENSE ├── README.md ├── bitwise XOR ├── complement of base 10 numbers.py ├── flip and invert matrix.py ├── intro.py ├── single number.py └── two single numbers.py ├── breadth first search ├── binary tree level order traveral.py ├── connect all level order siblings.py ├── connect level order siblings.py ├── level averages in a binary tree.py ├── level order successor.py ├── minimum depth of a binary tree.py ├── reverse level order traversal.py ├── right view of a binary tree.py └── zigzag traversal.py ├── cyclic sort ├── cyclic sort.py ├── find all duplicate numbers.py ├── find all missing numbers.py ├── find the corrupt pair.py ├── find the duplicate number.py ├── find the first k missing positive numbers.py ├── find the missing number.py └── find the smallest missing positive number.py ├── depth first search ├── all paths for a sum.py ├── binary tree path sum.py ├── count paths for a sum.py ├── path with given sequence.py ├── path with maximum sum.py ├── sum of path numbers.py └── tree diameter.py ├── dynamic programming ├── 01 knapsack.py ├── count of subset sum.py ├── equal subset sum partition.py ├── minimum subset sum difference.py ├── subset sum.py └── target sum.py ├── fast_slow pointers ├── cycle in a circular array.py ├── happy number.py ├── linkedlist cycle.py ├── middle of linkedlist.py ├── palindorme linkedlist.py ├── rearrange a linkedlist.py └── start of linkedlist cycle.py ├── in-place reversal of a linkedlist ├── reverse a linkedlist.py ├── reverse a sub list.py ├── reverse alternating k element sub list.py ├── reverse every k element sub list.py └── rotate a linkedlist.py ├── k way merge ├── k pairs with largest sums.py ├── kth smallest number in a sorted matrix.py ├── kth smallest number in m sorted lists.py ├── merge k sorted lists.py └── smallest number range.py ├── merge intervals ├── conflicting appointment.py ├── employee free time.py ├── insert interval.py ├── interval intersection.py ├── maximum cpu load.py ├── merge intervals.py └── minimum meeting room.py ├── miscellaneous └── kth smallest number.py ├── modified binary search ├── bitonic array maximum.py ├── ceiling of a number.py ├── minimum difference element.py ├── next letter.py ├── number range.py ├── order agnostic binary search.py ├── rotation count.py ├── search bitonic array.py ├── search in a sorted infinite array.py └── search in rotated array.py ├── scripts ├── finddir.sh ├── fixlinks.sh └── generate_md.sh ├── sliding window ├── fruits into baskets.py ├── intro.py ├── longest substring with K distinct characters.py ├── longest_substring_with_ones_after_replacement.py ├── longest_substring_with_same_letters_after_replacement.py ├── maximum sum subarrays of size k.py ├── no-repeat substring.py ├── permutation in a string.py ├── smallest subarray with a given sum.py ├── smallest window containing substring.py ├── string anagrams.py └── word concatenation.py ├── subsets ├── balanced parentheses.py ├── evaluate expression.py ├── permutations.py ├── string permutations by changing case.py ├── structurally unique binary search trees.py ├── subsets with duplicates.py ├── subsets.py └── unique generalized abbreviations.py ├── top k elements ├── connect ropes.py ├── frequency sort.py ├── frequency stack.py ├── k closest numbers.py ├── k closest points to the origin.py ├── kth largest number in a stream.py ├── kth smallest number.py ├── maximum distinct elements.py ├── rearrange string k distance apart.py ├── rearrange string.py ├── scheduling tasks.py ├── sum of elements.py ├── top k frequent numbers.py └── top k numbers.py ├── topological sort ├── alien dictionary.py ├── all tasks scheduling orders.py ├── minimum height trees.py ├── reconstructing a sequence.py ├── task scheduling order.py ├── tasks scheduling.py └── topological sort.py ├── two heaps ├── find the median of a number stream.py ├── maximize capital.py ├── next interval.py └── sliding window median.py └── two pointers ├── comparing strings containing backspaces.py ├── dutch national flag problem.py ├── minimum window sort.py ├── pair with target sum.py ├── quadruple sum to target.py ├── remove duplicates.py ├── squaring a sorted array.py ├── triplet sum close to target.py ├── triplet sum to zero.py └── triplet with smaller sum.py /.github/workflows/pages.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/.github/workflows/pages.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/.gitignore -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/README.md -------------------------------------------------------------------------------- /bitwise XOR/complement of base 10 numbers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/bitwise XOR/complement of base 10 numbers.py -------------------------------------------------------------------------------- /bitwise XOR/flip and invert matrix.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/bitwise XOR/flip and invert matrix.py -------------------------------------------------------------------------------- /bitwise XOR/intro.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/bitwise XOR/intro.py -------------------------------------------------------------------------------- /bitwise XOR/single number.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/bitwise XOR/single number.py -------------------------------------------------------------------------------- /bitwise XOR/two single numbers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/bitwise XOR/two single numbers.py -------------------------------------------------------------------------------- /breadth first search/binary tree level order traveral.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/breadth first search/binary tree level order traveral.py -------------------------------------------------------------------------------- /breadth first search/connect all level order siblings.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/breadth first search/connect all level order siblings.py -------------------------------------------------------------------------------- /breadth first search/connect level order siblings.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/breadth first search/connect level order siblings.py -------------------------------------------------------------------------------- /breadth first search/level averages in a binary tree.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/breadth first search/level averages in a binary tree.py -------------------------------------------------------------------------------- /breadth first search/level order successor.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/breadth first search/level order successor.py -------------------------------------------------------------------------------- /breadth first search/minimum depth of a binary tree.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/breadth first search/minimum depth of a binary tree.py -------------------------------------------------------------------------------- /breadth first search/reverse level order traversal.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/breadth first search/reverse level order traversal.py -------------------------------------------------------------------------------- /breadth first search/right view of a binary tree.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/breadth first search/right view of a binary tree.py -------------------------------------------------------------------------------- /breadth first search/zigzag traversal.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/breadth first search/zigzag traversal.py -------------------------------------------------------------------------------- /cyclic sort/cyclic sort.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/cyclic sort/cyclic sort.py -------------------------------------------------------------------------------- /cyclic sort/find all duplicate numbers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/cyclic sort/find all duplicate numbers.py -------------------------------------------------------------------------------- /cyclic sort/find all missing numbers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/cyclic sort/find all missing numbers.py -------------------------------------------------------------------------------- /cyclic sort/find the corrupt pair.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/cyclic sort/find the corrupt pair.py -------------------------------------------------------------------------------- /cyclic sort/find the duplicate number.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/cyclic sort/find the duplicate number.py -------------------------------------------------------------------------------- /cyclic sort/find the first k missing positive numbers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/cyclic sort/find the first k missing positive numbers.py -------------------------------------------------------------------------------- /cyclic sort/find the missing number.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/cyclic sort/find the missing number.py -------------------------------------------------------------------------------- /cyclic sort/find the smallest missing positive number.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/cyclic sort/find the smallest missing positive number.py -------------------------------------------------------------------------------- /depth first search/all paths for a sum.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/depth first search/all paths for a sum.py -------------------------------------------------------------------------------- /depth first search/binary tree path sum.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/depth first search/binary tree path sum.py -------------------------------------------------------------------------------- /depth first search/count paths for a sum.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/depth first search/count paths for a sum.py -------------------------------------------------------------------------------- /depth first search/path with given sequence.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/depth first search/path with given sequence.py -------------------------------------------------------------------------------- /depth first search/path with maximum sum.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/depth first search/path with maximum sum.py -------------------------------------------------------------------------------- /depth first search/sum of path numbers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/depth first search/sum of path numbers.py -------------------------------------------------------------------------------- /depth first search/tree diameter.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/depth first search/tree diameter.py -------------------------------------------------------------------------------- /dynamic programming/01 knapsack.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/dynamic programming/01 knapsack.py -------------------------------------------------------------------------------- /dynamic programming/count of subset sum.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/dynamic programming/count of subset sum.py -------------------------------------------------------------------------------- /dynamic programming/equal subset sum partition.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/dynamic programming/equal subset sum partition.py -------------------------------------------------------------------------------- /dynamic programming/minimum subset sum difference.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/dynamic programming/minimum subset sum difference.py -------------------------------------------------------------------------------- /dynamic programming/subset sum.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/dynamic programming/subset sum.py -------------------------------------------------------------------------------- /dynamic programming/target sum.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/dynamic programming/target sum.py -------------------------------------------------------------------------------- /fast_slow pointers/cycle in a circular array.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/fast_slow pointers/cycle in a circular array.py -------------------------------------------------------------------------------- /fast_slow pointers/happy number.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/fast_slow pointers/happy number.py -------------------------------------------------------------------------------- /fast_slow pointers/linkedlist cycle.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/fast_slow pointers/linkedlist cycle.py -------------------------------------------------------------------------------- /fast_slow pointers/middle of linkedlist.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/fast_slow pointers/middle of linkedlist.py -------------------------------------------------------------------------------- /fast_slow pointers/palindorme linkedlist.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/fast_slow pointers/palindorme linkedlist.py -------------------------------------------------------------------------------- /fast_slow pointers/rearrange a linkedlist.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/fast_slow pointers/rearrange a linkedlist.py -------------------------------------------------------------------------------- /fast_slow pointers/start of linkedlist cycle.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/fast_slow pointers/start of linkedlist cycle.py -------------------------------------------------------------------------------- /in-place reversal of a linkedlist/reverse a linkedlist.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/in-place reversal of a linkedlist/reverse a linkedlist.py -------------------------------------------------------------------------------- /in-place reversal of a linkedlist/reverse a sub list.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/in-place reversal of a linkedlist/reverse a sub list.py -------------------------------------------------------------------------------- /in-place reversal of a linkedlist/reverse alternating k element sub list.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/in-place reversal of a linkedlist/reverse alternating k element sub list.py -------------------------------------------------------------------------------- /in-place reversal of a linkedlist/reverse every k element sub list.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/in-place reversal of a linkedlist/reverse every k element sub list.py -------------------------------------------------------------------------------- /in-place reversal of a linkedlist/rotate a linkedlist.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/in-place reversal of a linkedlist/rotate a linkedlist.py -------------------------------------------------------------------------------- /k way merge/k pairs with largest sums.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/k way merge/k pairs with largest sums.py -------------------------------------------------------------------------------- /k way merge/kth smallest number in a sorted matrix.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/k way merge/kth smallest number in a sorted matrix.py -------------------------------------------------------------------------------- /k way merge/kth smallest number in m sorted lists.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/k way merge/kth smallest number in m sorted lists.py -------------------------------------------------------------------------------- /k way merge/merge k sorted lists.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/k way merge/merge k sorted lists.py -------------------------------------------------------------------------------- /k way merge/smallest number range.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/k way merge/smallest number range.py -------------------------------------------------------------------------------- /merge intervals/conflicting appointment.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/merge intervals/conflicting appointment.py -------------------------------------------------------------------------------- /merge intervals/employee free time.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/merge intervals/employee free time.py -------------------------------------------------------------------------------- /merge intervals/insert interval.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/merge intervals/insert interval.py -------------------------------------------------------------------------------- /merge intervals/interval intersection.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/merge intervals/interval intersection.py -------------------------------------------------------------------------------- /merge intervals/maximum cpu load.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/merge intervals/maximum cpu load.py -------------------------------------------------------------------------------- /merge intervals/merge intervals.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/merge intervals/merge intervals.py -------------------------------------------------------------------------------- /merge intervals/minimum meeting room.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/merge intervals/minimum meeting room.py -------------------------------------------------------------------------------- /miscellaneous/kth smallest number.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/miscellaneous/kth smallest number.py -------------------------------------------------------------------------------- /modified binary search/bitonic array maximum.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/modified binary search/bitonic array maximum.py -------------------------------------------------------------------------------- /modified binary search/ceiling of a number.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/modified binary search/ceiling of a number.py -------------------------------------------------------------------------------- /modified binary search/minimum difference element.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/modified binary search/minimum difference element.py -------------------------------------------------------------------------------- /modified binary search/next letter.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/modified binary search/next letter.py -------------------------------------------------------------------------------- /modified binary search/number range.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/modified binary search/number range.py -------------------------------------------------------------------------------- /modified binary search/order agnostic binary search.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/modified binary search/order agnostic binary search.py -------------------------------------------------------------------------------- /modified binary search/rotation count.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/modified binary search/rotation count.py -------------------------------------------------------------------------------- /modified binary search/search bitonic array.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/modified binary search/search bitonic array.py -------------------------------------------------------------------------------- /modified binary search/search in a sorted infinite array.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/modified binary search/search in a sorted infinite array.py -------------------------------------------------------------------------------- /modified binary search/search in rotated array.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/modified binary search/search in rotated array.py -------------------------------------------------------------------------------- /scripts/finddir.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/scripts/finddir.sh -------------------------------------------------------------------------------- /scripts/fixlinks.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/scripts/fixlinks.sh -------------------------------------------------------------------------------- /scripts/generate_md.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/scripts/generate_md.sh -------------------------------------------------------------------------------- /sliding window/fruits into baskets.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/sliding window/fruits into baskets.py -------------------------------------------------------------------------------- /sliding window/intro.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/sliding window/intro.py -------------------------------------------------------------------------------- /sliding window/longest substring with K distinct characters.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/sliding window/longest substring with K distinct characters.py -------------------------------------------------------------------------------- /sliding window/longest_substring_with_ones_after_replacement.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/sliding window/longest_substring_with_ones_after_replacement.py -------------------------------------------------------------------------------- /sliding window/longest_substring_with_same_letters_after_replacement.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/sliding window/longest_substring_with_same_letters_after_replacement.py -------------------------------------------------------------------------------- /sliding window/maximum sum subarrays of size k.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/sliding window/maximum sum subarrays of size k.py -------------------------------------------------------------------------------- /sliding window/no-repeat substring.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/sliding window/no-repeat substring.py -------------------------------------------------------------------------------- /sliding window/permutation in a string.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/sliding window/permutation in a string.py -------------------------------------------------------------------------------- /sliding window/smallest subarray with a given sum.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/sliding window/smallest subarray with a given sum.py -------------------------------------------------------------------------------- /sliding window/smallest window containing substring.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/sliding window/smallest window containing substring.py -------------------------------------------------------------------------------- /sliding window/string anagrams.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/sliding window/string anagrams.py -------------------------------------------------------------------------------- /sliding window/word concatenation.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/sliding window/word concatenation.py -------------------------------------------------------------------------------- /subsets/balanced parentheses.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/subsets/balanced parentheses.py -------------------------------------------------------------------------------- /subsets/evaluate expression.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/subsets/evaluate expression.py -------------------------------------------------------------------------------- /subsets/permutations.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/subsets/permutations.py -------------------------------------------------------------------------------- /subsets/string permutations by changing case.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/subsets/string permutations by changing case.py -------------------------------------------------------------------------------- /subsets/structurally unique binary search trees.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/subsets/structurally unique binary search trees.py -------------------------------------------------------------------------------- /subsets/subsets with duplicates.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/subsets/subsets with duplicates.py -------------------------------------------------------------------------------- /subsets/subsets.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/subsets/subsets.py -------------------------------------------------------------------------------- /subsets/unique generalized abbreviations.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/subsets/unique generalized abbreviations.py -------------------------------------------------------------------------------- /top k elements/connect ropes.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/top k elements/connect ropes.py -------------------------------------------------------------------------------- /top k elements/frequency sort.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/top k elements/frequency sort.py -------------------------------------------------------------------------------- /top k elements/frequency stack.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/top k elements/frequency stack.py -------------------------------------------------------------------------------- /top k elements/k closest numbers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/top k elements/k closest numbers.py -------------------------------------------------------------------------------- /top k elements/k closest points to the origin.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/top k elements/k closest points to the origin.py -------------------------------------------------------------------------------- /top k elements/kth largest number in a stream.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/top k elements/kth largest number in a stream.py -------------------------------------------------------------------------------- /top k elements/kth smallest number.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/top k elements/kth smallest number.py -------------------------------------------------------------------------------- /top k elements/maximum distinct elements.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/top k elements/maximum distinct elements.py -------------------------------------------------------------------------------- /top k elements/rearrange string k distance apart.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/top k elements/rearrange string k distance apart.py -------------------------------------------------------------------------------- /top k elements/rearrange string.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/top k elements/rearrange string.py -------------------------------------------------------------------------------- /top k elements/scheduling tasks.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/top k elements/scheduling tasks.py -------------------------------------------------------------------------------- /top k elements/sum of elements.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/top k elements/sum of elements.py -------------------------------------------------------------------------------- /top k elements/top k frequent numbers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/top k elements/top k frequent numbers.py -------------------------------------------------------------------------------- /top k elements/top k numbers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/top k elements/top k numbers.py -------------------------------------------------------------------------------- /topological sort/alien dictionary.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/topological sort/alien dictionary.py -------------------------------------------------------------------------------- /topological sort/all tasks scheduling orders.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/topological sort/all tasks scheduling orders.py -------------------------------------------------------------------------------- /topological sort/minimum height trees.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/topological sort/minimum height trees.py -------------------------------------------------------------------------------- /topological sort/reconstructing a sequence.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/topological sort/reconstructing a sequence.py -------------------------------------------------------------------------------- /topological sort/task scheduling order.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/topological sort/task scheduling order.py -------------------------------------------------------------------------------- /topological sort/tasks scheduling.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/topological sort/tasks scheduling.py -------------------------------------------------------------------------------- /topological sort/topological sort.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/topological sort/topological sort.py -------------------------------------------------------------------------------- /two heaps/find the median of a number stream.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/two heaps/find the median of a number stream.py -------------------------------------------------------------------------------- /two heaps/maximize capital.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/two heaps/maximize capital.py -------------------------------------------------------------------------------- /two heaps/next interval.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/two heaps/next interval.py -------------------------------------------------------------------------------- /two heaps/sliding window median.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/two heaps/sliding window median.py -------------------------------------------------------------------------------- /two pointers/comparing strings containing backspaces.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/two pointers/comparing strings containing backspaces.py -------------------------------------------------------------------------------- /two pointers/dutch national flag problem.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/two pointers/dutch national flag problem.py -------------------------------------------------------------------------------- /two pointers/minimum window sort.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/two pointers/minimum window sort.py -------------------------------------------------------------------------------- /two pointers/pair with target sum.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/two pointers/pair with target sum.py -------------------------------------------------------------------------------- /two pointers/quadruple sum to target.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/two pointers/quadruple sum to target.py -------------------------------------------------------------------------------- /two pointers/remove duplicates.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/two pointers/remove duplicates.py -------------------------------------------------------------------------------- /two pointers/squaring a sorted array.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/two pointers/squaring a sorted array.py -------------------------------------------------------------------------------- /two pointers/triplet sum close to target.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/two pointers/triplet sum close to target.py -------------------------------------------------------------------------------- /two pointers/triplet sum to zero.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/two pointers/triplet sum to zero.py -------------------------------------------------------------------------------- /two pointers/triplet with smaller sum.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoanWu5/Grokking-the-coding-interview/HEAD/two pointers/triplet with smaller sum.py --------------------------------------------------------------------------------