├── .gitignore ├── 1d_dynamic_programming ├── climbing_stairs.py ├── coin_change.py ├── decode_ways.py ├── house_robber.py ├── house_robber_ii.py ├── longest_increasing_subsequence.py ├── longest_palindromic_substring.py ├── max_product_subarray.py ├── palindromic_substrings.py └── word_break.py ├── LICENSE ├── README.md ├── arrays_and_hashing ├── contains_duplicate.py ├── encode_decode_strings.py ├── group_anagrams.py ├── longest_consecutive_sequence.py ├── product_of_array_except_self.py ├── top_k_frequent_elements.py ├── two_sum.py ├── valid_anagram.py └── valid_sudoku.py ├── backtracking ├── combination_sum.py └── word_search.py ├── binary_search └── min_in_rotated_array.py ├── bit_manipulation ├── counting_bits.py ├── missing_number.py ├── number_of_1_bits.py └── reverse_bits.py ├── graphs ├── clone_graph.py ├── course_schedule.py ├── number_of_islands.py └── pacific_atlantic_water_flow.py ├── greedy ├── jump_game.py └── maximum_subarray.py ├── intervals ├── insert_interval.py └── merge_intervals.py ├── linked_lists ├── linked_list_cycle.py ├── merge_k_sorted_lists.py ├── merge_two_sorted_lists.py ├── remove_nth_node_from_end_of_list.py └── reverse_linked_list.py ├── questions_list.md ├── setup.py ├── sliding_window ├── best_buy_sell_stock.py ├── longest_repeating_character_replacement.py ├── longest_substring_without_repeating_chars.py ├── minimum_window_substring.py ├── permutation_in_strings.py └── sliding_window_maximum.py ├── stack └── valid_parentheses.py ├── trees ├── binary_tree_level_order_traversal.py ├── invert_binary_tree.py ├── lowest_common_ancestor_of_bst.py ├── max_depth_of_binary_tree.py ├── same_tree.py ├── subtree_of_another_tree.py └── valid_bst.py ├── tries ├── add_search_word.py ├── implement_trie_prefix_tree.py └── word_search_ii.py ├── two_pointers ├── container_with_most_water.py ├── three_sum.py ├── trapping_rain_water.py ├── two_sum_ii_input_sorted.py └── valid_palindrome.py └── utils └── get_time_complexity.py /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/.gitignore -------------------------------------------------------------------------------- /1d_dynamic_programming/climbing_stairs.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/1d_dynamic_programming/climbing_stairs.py -------------------------------------------------------------------------------- /1d_dynamic_programming/coin_change.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/1d_dynamic_programming/coin_change.py -------------------------------------------------------------------------------- /1d_dynamic_programming/decode_ways.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/1d_dynamic_programming/decode_ways.py -------------------------------------------------------------------------------- /1d_dynamic_programming/house_robber.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/1d_dynamic_programming/house_robber.py -------------------------------------------------------------------------------- /1d_dynamic_programming/house_robber_ii.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/1d_dynamic_programming/house_robber_ii.py -------------------------------------------------------------------------------- /1d_dynamic_programming/longest_increasing_subsequence.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/1d_dynamic_programming/longest_increasing_subsequence.py -------------------------------------------------------------------------------- /1d_dynamic_programming/longest_palindromic_substring.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/1d_dynamic_programming/longest_palindromic_substring.py -------------------------------------------------------------------------------- /1d_dynamic_programming/max_product_subarray.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/1d_dynamic_programming/max_product_subarray.py -------------------------------------------------------------------------------- /1d_dynamic_programming/palindromic_substrings.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/1d_dynamic_programming/palindromic_substrings.py -------------------------------------------------------------------------------- /1d_dynamic_programming/word_break.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/1d_dynamic_programming/word_break.py -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/README.md -------------------------------------------------------------------------------- /arrays_and_hashing/contains_duplicate.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/arrays_and_hashing/contains_duplicate.py -------------------------------------------------------------------------------- /arrays_and_hashing/encode_decode_strings.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/arrays_and_hashing/encode_decode_strings.py -------------------------------------------------------------------------------- /arrays_and_hashing/group_anagrams.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/arrays_and_hashing/group_anagrams.py -------------------------------------------------------------------------------- /arrays_and_hashing/longest_consecutive_sequence.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/arrays_and_hashing/longest_consecutive_sequence.py -------------------------------------------------------------------------------- /arrays_and_hashing/product_of_array_except_self.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/arrays_and_hashing/product_of_array_except_self.py -------------------------------------------------------------------------------- /arrays_and_hashing/top_k_frequent_elements.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/arrays_and_hashing/top_k_frequent_elements.py -------------------------------------------------------------------------------- /arrays_and_hashing/two_sum.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/arrays_and_hashing/two_sum.py -------------------------------------------------------------------------------- /arrays_and_hashing/valid_anagram.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/arrays_and_hashing/valid_anagram.py -------------------------------------------------------------------------------- /arrays_and_hashing/valid_sudoku.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/arrays_and_hashing/valid_sudoku.py -------------------------------------------------------------------------------- /backtracking/combination_sum.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/backtracking/combination_sum.py -------------------------------------------------------------------------------- /backtracking/word_search.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/backtracking/word_search.py -------------------------------------------------------------------------------- /binary_search/min_in_rotated_array.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/binary_search/min_in_rotated_array.py -------------------------------------------------------------------------------- /bit_manipulation/counting_bits.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/bit_manipulation/counting_bits.py -------------------------------------------------------------------------------- /bit_manipulation/missing_number.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/bit_manipulation/missing_number.py -------------------------------------------------------------------------------- /bit_manipulation/number_of_1_bits.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/bit_manipulation/number_of_1_bits.py -------------------------------------------------------------------------------- /bit_manipulation/reverse_bits.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/bit_manipulation/reverse_bits.py -------------------------------------------------------------------------------- /graphs/clone_graph.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/graphs/clone_graph.py -------------------------------------------------------------------------------- /graphs/course_schedule.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/graphs/course_schedule.py -------------------------------------------------------------------------------- /graphs/number_of_islands.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/graphs/number_of_islands.py -------------------------------------------------------------------------------- /graphs/pacific_atlantic_water_flow.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/graphs/pacific_atlantic_water_flow.py -------------------------------------------------------------------------------- /greedy/jump_game.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/greedy/jump_game.py -------------------------------------------------------------------------------- /greedy/maximum_subarray.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/greedy/maximum_subarray.py -------------------------------------------------------------------------------- /intervals/insert_interval.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/intervals/insert_interval.py -------------------------------------------------------------------------------- /intervals/merge_intervals.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/intervals/merge_intervals.py -------------------------------------------------------------------------------- /linked_lists/linked_list_cycle.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/linked_lists/linked_list_cycle.py -------------------------------------------------------------------------------- /linked_lists/merge_k_sorted_lists.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/linked_lists/merge_k_sorted_lists.py -------------------------------------------------------------------------------- /linked_lists/merge_two_sorted_lists.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/linked_lists/merge_two_sorted_lists.py -------------------------------------------------------------------------------- /linked_lists/remove_nth_node_from_end_of_list.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/linked_lists/remove_nth_node_from_end_of_list.py -------------------------------------------------------------------------------- /linked_lists/reverse_linked_list.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/linked_lists/reverse_linked_list.py -------------------------------------------------------------------------------- /questions_list.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/questions_list.md -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/setup.py -------------------------------------------------------------------------------- /sliding_window/best_buy_sell_stock.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/sliding_window/best_buy_sell_stock.py -------------------------------------------------------------------------------- /sliding_window/longest_repeating_character_replacement.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/sliding_window/longest_repeating_character_replacement.py -------------------------------------------------------------------------------- /sliding_window/longest_substring_without_repeating_chars.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/sliding_window/longest_substring_without_repeating_chars.py -------------------------------------------------------------------------------- /sliding_window/minimum_window_substring.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/sliding_window/minimum_window_substring.py -------------------------------------------------------------------------------- /sliding_window/permutation_in_strings.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/sliding_window/permutation_in_strings.py -------------------------------------------------------------------------------- /sliding_window/sliding_window_maximum.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/sliding_window/sliding_window_maximum.py -------------------------------------------------------------------------------- /stack/valid_parentheses.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/stack/valid_parentheses.py -------------------------------------------------------------------------------- /trees/binary_tree_level_order_traversal.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/trees/binary_tree_level_order_traversal.py -------------------------------------------------------------------------------- /trees/invert_binary_tree.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/trees/invert_binary_tree.py -------------------------------------------------------------------------------- /trees/lowest_common_ancestor_of_bst.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/trees/lowest_common_ancestor_of_bst.py -------------------------------------------------------------------------------- /trees/max_depth_of_binary_tree.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/trees/max_depth_of_binary_tree.py -------------------------------------------------------------------------------- /trees/same_tree.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/trees/same_tree.py -------------------------------------------------------------------------------- /trees/subtree_of_another_tree.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/trees/subtree_of_another_tree.py -------------------------------------------------------------------------------- /trees/valid_bst.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/trees/valid_bst.py -------------------------------------------------------------------------------- /tries/add_search_word.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/tries/add_search_word.py -------------------------------------------------------------------------------- /tries/implement_trie_prefix_tree.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/tries/implement_trie_prefix_tree.py -------------------------------------------------------------------------------- /tries/word_search_ii.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/tries/word_search_ii.py -------------------------------------------------------------------------------- /two_pointers/container_with_most_water.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/two_pointers/container_with_most_water.py -------------------------------------------------------------------------------- /two_pointers/three_sum.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/two_pointers/three_sum.py -------------------------------------------------------------------------------- /two_pointers/trapping_rain_water.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/two_pointers/trapping_rain_water.py -------------------------------------------------------------------------------- /two_pointers/two_sum_ii_input_sorted.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/two_pointers/two_sum_ii_input_sorted.py -------------------------------------------------------------------------------- /two_pointers/valid_palindrome.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/two_pointers/valid_palindrome.py -------------------------------------------------------------------------------- /utils/get_time_complexity.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darpan-jain/neetcode-solutions/HEAD/utils/get_time_complexity.py --------------------------------------------------------------------------------