# LeetCode 面试题

## [八大算法算](/docs/SortingAlgorithm/README.md)

![](/images/SortingAlgorithm/八大排序算法性能.png)

| 名称 | 动图 | 代码 |
| --- | --- | --- |
| 冒泡排序 | ![](/images/SortingAlgorithm/冒泡排序.gif) | [BubbleSort.py](/opt/git/LeetCode/docs/src/py2.x/SortingAlgorithm/BubbleSort.py) |
| 插入排序 | ![](/images/SortingAlgorithm/直接插入排序.gif) | [InsertSort.py](/opt/git/LeetCode/docs/src/py2.x/SortingAlgorithm/InsertSort.py) |
| 选择排序 | ![](/images/SortingAlgorithm/简单选择排序.gif) | [SelectionSort.py](/opt/git/LeetCode/docs/src/py2.x/SortingAlgorithm/SelectionSort.py) |
| 快速排序 | ![](/images/SortingAlgorithm/快速排序.gif) | [QuickSort.py](/opt/git/LeetCode/docs/src/py2.x/SortingAlgorithm/QuickSort.py) |
| 希尔排序 | ![](/images/SortingAlgorithm/希尔排序.png) | [ShellSort.py](/opt/git/LeetCode/docs/src/py2.x/SortingAlgorithm/ShellSort.py) |
| 归并排序 | ![](/images/SortingAlgorithm/归并排序.gif) | [MergeSort.py](/opt/git/LeetCode/docs/src/py2.x/SortingAlgorithm/MergeSort.py) |
| 基数排序 | ![](/images/SortingAlgorithm/基数排序.gif) |  |

## 面试问答

* [Google面试题](/docs/interview/Google/Google.md)
* [pocketgems 面试题](/docs/interview/pocketgems/pocketgems.md)
* [WePay 面试题](/docs/interview/WePay/WePay.md)

## LeetCode算法题

* [](docs/LeetCode/001._two_sum.md)
* [](/docs/LeetCode/002._add_two_numbers.md)
* [](/docs/LeetCode/003._longest_substring_without_repeating_characters.md)
* [](/docs/LeetCode/004._median_of_two_sorted_arrays.md)
* [](/docs/LeetCode/005._longest_palindromic_substring.md)
* [](/docs/LeetCode/007._Reverse_Integer.md)
* [](/docs/LeetCode/008._string_to_integer_(atoi).md)
* [](/docs/LeetCode/010._regular_expression_matching.md)
* [](/docs/LeetCode/011._container_with_most_water.md)
* [](/docs/LeetCode/012._Integer_to_Roman.md)
* [](/docs/LeetCode/013._Roman_to_Integer.md)
* [](/docs/LeetCode/014._longest_common_prefix.md)
* [](/docs/LeetCode/015._3sum.md)
* [](/docs/LeetCode/016._3sum_closest.md)
* [](/docs/LeetCode/017._letter_combinations_of_a_phone_number.md)
* [](/docs/LeetCode/018._4sum.md)
* [](/docs/LeetCode/019._remove_nth_node_from_end_of_list.md)
* [](/docs/LeetCode/020._valid_parentheses.md)
* [](/docs/LeetCode/021._merge_two_sorted_lists.md)
* [](/docs/LeetCode/022._generate_parentheses.md)
* [](/docs/LeetCode/023._merge_k_sorted_lists.md)
* [](/docs/LeetCode/024._swap_nodes_in_pairs.md)
* [](/docs/LeetCode/026._Remove_Duplicates_from_Sorted_Array.md)
* [](/docs/LeetCode/027._Remove_Element.md)
* [](/docs/LeetCode/028._implement_strstr().md)
* [](/docs/LeetCode/030._Substring_with_Concatenation_of_All_Words.md)
* [](/docs/LeetCode/031._next_permutation.md)
* [](/docs/LeetCode/033._search_in_rotated_sorted_array.md)
* [](/docs/LeetCode/034._SearchforaRange.md)
* [](/docs/LeetCode/035._search_insert_position.md)
* [](/docs/LeetCode/038._Count_and_Say.md)
* [](/docs/LeetCode/039._combination_sum.md)
* [](/docs/LeetCode/040._combination_sum_ii.md)
* [](/docs/LeetCode/042._trapping_rain_water.md)
* [](/docs/LeetCode/043._multiply_strings.md)
* [](/docs/LeetCode/044._wildcard_matching.md)
* [](/docs/LeetCode/045._Jump_Game_II.md)
* [](/docs/LeetCode/046._permutations.md)
* [](/docs/LeetCode/047._permutations_ii.md)
* [](/docs/LeetCode/048._rotate_image.md)
* [](/docs/LeetCode/049._group_anagrams_python.md)
* [](/docs/LeetCode/050._pow(x,_n).md)
* [](/docs/LeetCode/051._n-queens.md)
* [](/docs/LeetCode/052._n-queens_ii.md)
* [](/docs/LeetCode/053._maximum_subarray.md)
* [](/docs/LeetCode/054._spiral_matrix.md)
* [](/docs/LeetCode/055._jump_game.md)
* [](/docs/LeetCode/056._Merge_Intervals.md)
* [](/docs/LeetCode/058._length_of_last_word.md)
* [](/docs/LeetCode/059._spiral_matrix_ii.md)
* [](/docs/LeetCode/060._permutation_sequence.md)
* [](/docs/LeetCode/061._rotate_list.md)
* [](/docs/LeetCode/064._minimum_path_sum.md)
* [](/docs/LeetCode/065.unique_paths_ii.md)
* [](/docs/LeetCode/066._plus_one.md)
* [](/docs/LeetCode/067._add_binary.md)
* [](/docs/LeetCode/069._sqrt(x).md)
* [](/docs/LeetCode/070.ClimbingStairs.md)
* [](/docs/LeetCode/072._edit_distance.md)
* [](/docs/LeetCode/073.SetMatrixZeroes.md)
* [](/docs/LeetCode/074._search_a_2d_matrix.md)
* [](/docs/LeetCode/075._sort_colors.md)
* [](/docs/LeetCode/076._Minimum_Window_Substring.md)
* [](/docs/LeetCode/077._combinations.md)
* [](/docs/LeetCode/078.Subsets.md)
* [](/docs/LeetCode/079._word_search.md)
* [](/docs/LeetCode/082._remove_duplicates_from_sorted_list_ii.md)
* [](/docs/LeetCode/083._remove_duplicates_from_sorted_list.md)
* [](/docs/LeetCode/086._partition_list.md)
* [](/docs/LeetCode/088._merge_sorted_array.md)
* [](/docs/LeetCode/089._gray_code.md)
* [](/docs/LeetCode/090._subsets_ii.md)
* [](/docs/LeetCode/091._decode_ways.md)
* [](/docs/LeetCode/092._reverse_linked_list_ii.md)
* [](/docs/LeetCode/093._restore_ip_addresses.md)
* [](/docs/LeetCode/094._binary_tree_inorder_traversal.md)
* [](/docs/LeetCode/096._unique_binary_search_trees.md)
* [](/docs/LeetCode/098._validate_binary_search_tree.md)
* [](/docs/LeetCode/100._same_tree.md)
* [](/docs/LeetCode/101._symmetric_tree.md)
* [](/docs/LeetCode/102._binary_tree_level_order_traversal.md)
* [](/docs/LeetCode/103._binary_tree_zigzag_level_order_traversal.md)
* [](/docs/LeetCode/104._maximum_depth_of_binary_tree.md)
* [](/docs/LeetCode/105._construct_binary_tree_from_preorder_and_inorder_traversal.md)
* [](/docs/LeetCode/106._construct_binary_tree_from_inorder_and_postorder_traversal.md)
* [](/docs/LeetCode/107._binary_tree_level_order_traversal_ii.md)
* [](/docs/LeetCode/108._convert_sorted_array_to_binary_search_tree.md)
* [](/docs/LeetCode/109._convert_sorted_list_to_binary_search_tree.md)
* [](/docs/LeetCode/110._balanced_binary_tree.md)
* [](/docs/LeetCode/111._minimum_depth_of_binary_tree.md)
* [](/docs/LeetCode/112._path_sum.md)
* [](/docs/LeetCode/113._path_sum_ii.md)
* [](/docs/LeetCode/114._flatten_binary_tree_to_linked_list.md)
* [](/docs/LeetCode/116._populating_next_right_pointers_in_each_node.md)
* [](/docs/LeetCode/118._pascal's_triangle.md)
* [](/docs/LeetCode/119.Pascal'sTriangleII.md)
* [](/docs/LeetCode/120.Triangle.md)
* [](/docs/LeetCode/121._Best_Time_to_Buy_and_Sell_Stock.md)
* [](/docs/LeetCode/125._valid_palindrome.md)
* [](/docs/LeetCode/126.WordLadderII.md)
* [](/docs/LeetCode/127._word_ladder.md)
* [](/docs/LeetCode/128._Longest_Consecutive_Sequence.md)
* [](/docs/LeetCode/129._sum_root_to_leaf_numbers.md)
* [](/docs/LeetCode/130._surrounded_regions.md)
* [](/docs/LeetCode/131._palindrome_partitioning.md)
* [](/docs/LeetCode/133._clone_graph.md)
* [](/docs/LeetCode/136._single_number.md)
* [](/docs/LeetCode/139._word_break.md)
* [](/docs/LeetCode/140._word_break_ii.md)
* [](/docs/LeetCode/141._linked_list_cycle.md)
* [](/docs/LeetCode/142_Linked_List_Cycle_II.md)
* [](/docs/LeetCode/143._reorder_list.md)
* [](/docs/LeetCode/144._binary_tree_preorder_traversal.md)
* [](/docs/LeetCode/145._binary_tree_postorder_traversal.md)
* [](/docs/LeetCode/147._insertion_sort_list.md)
* [](/docs/LeetCode/148._sort_list.md)
* [](/docs/LeetCode/150._evaluate_reverse_polish_notation.md)
* [](/docs/LeetCode/151._reverse_words_in_a_string.md)
* [](/docs/LeetCode/152._maximum_product_subarray.md)
* [](/docs/LeetCode/153._find_minimum_in_rotated_sorted_array.md)
* [](/docs/LeetCode/155._min_stack.md)
* [](/docs/LeetCode/159._Longest_Substring_with_At_Most_Two_Distinct_Characters.md)
* [](/docs/LeetCode/160._intersection_of_two_linked_lists.md)
* [](/docs/LeetCode/162._find_peak_element.md)
* [](/docs/LeetCode/165._compare_version_numbers.md)
* [](/docs/LeetCode/166._Fraction_to_Recurring_Decimal.md)
* [](/docs/LeetCode/167._two_sum_ii_-_input_array_is_sorted.md)
* [](/docs/LeetCode/168._excel_sheet_column_title.md)
* [](/docs/LeetCode/169._majority_element.md)
* [](/docs/LeetCode/171._excel_sheet_column_number.md)
* [](/docs/LeetCode/173._binary_search_tree_iterator.md)
* [](/docs/LeetCode/189._rotate_array.md)
* [](/docs/LeetCode/191._number_of_1_bits.md)
* [](/docs/LeetCode/198._house_robber.md)
* [](/docs/LeetCode/199._binary_tree_right_side_view.md)
* [](/docs/LeetCode/200._number_of_islands.md)
* [](/docs/LeetCode/203._remove_linked_list_elements.md)
* [](/docs/LeetCode/204._count_primes.md)
* [](/docs/LeetCode/205._isomorphic_strings.md)
* [](/docs/LeetCode/206._reverse_linked_list.md)
* [](/docs/LeetCode/207._course_schedule.md)
* [](/docs/LeetCode/208._implement_trie_(prefix_tree).md)
* [](/docs/LeetCode/210._course_schedule_ii.md)
* [](/docs/LeetCode/211.AddandSearchWord-Datastructuredesign.md)
* [](/docs/LeetCode/213._house_robber_ii.md)
* [](/docs/LeetCode/216._combination_sum_iii.md)
* [](/docs/LeetCode/217._contains_duplicate.md)
* [](/docs/LeetCode/218._The_Skyline_Problem.md)
* [](/docs/LeetCode/219._contains_duplicate_ii.md)
* [](/docs/LeetCode/221._maximal_square.md)
* [](/docs/LeetCode/222._count_complete_tree_nodes.md)
* [](/docs/LeetCode/223._rectangle_area.md)
* [](/docs/LeetCode/224.BasicCalculator.md)
* [](/docs/LeetCode/225._implement_stack_using_queues.md)
* [](/docs/LeetCode/226._invert_binary_tree.md)
* [](/docs/LeetCode/227._basic_calculator_ii.md)
* [](/docs/LeetCode/228._summary_ranges.md)
* [](/docs/LeetCode/229._majority_element_ii.md)
* [](/docs/LeetCode/230._kth_smallest_element_in_a_bst.md)
* [](/docs/LeetCode/231._Power_of_Two.md)
* [](/docs/LeetCode/232._implement_queue_using_stacks.md)
* [](/docs/LeetCode/234._palindrome_linked_list.md)
* [](/docs/LeetCode/235._lowest_common_ancestor_of_a_binary_search_tree.md)
* [](/docs/LeetCode/236._lowest_common_ancestor_of_a_binary_tree.md)
* [](/docs/LeetCode/237._delete_node_in_a_linked_list.md)
* [](/docs/LeetCode/238._product_of_array_except_self.md)
* [](/docs/LeetCode/240._search_a_2d_matrix_ii.md)
* [](/docs/LeetCode/242._valid_anagram.md)
* [](/docs/LeetCode/252.MeetingRooms.md)
* [](/docs/LeetCode/255._Verify_Preorder_Sequence_in_Binary_Search_Tree.md)
* [](/docs/LeetCode/256.PaintHouse.md)
* [](/docs/LeetCode/257._binary_tree_paths.md)
* [](/docs/LeetCode/258_Add_Digits.md)
* [](/docs/LeetCode/261.GraphValidTree.md)
* [](/docs/LeetCode/263._ugly_number.md)
* [](/docs/LeetCode/264._ugly_number_ii.md)
* [](/docs/LeetCode/265.PaintHouseII.md)
* [](/docs/LeetCode/266.PalindromePermutation.md)
* [](/docs/LeetCode/267.PalindromePermutationII.md)
* [](/docs/LeetCode/268._missing_number.md)
* [](/docs/LeetCode/270.ClosestBinarySearchTreeValue.md)
* [](/docs/LeetCode/276.PaintFence.md)
* [](/docs/LeetCode/277.FindtheCelebrity.md)
* [](/docs/LeetCode/278._First_Bad_Version.md)
* [](/docs/LeetCode/279._perfect_squares.md)
* [](/docs/LeetCode/280._Wiggle_Sort.md)
* [](/docs/LeetCode/283._move_zeroes.md)
* [](/docs/LeetCode/285._inorder_successor_in_bst.md)
* [](/docs/LeetCode/286.WallsandGates.md)
* [](/docs/LeetCode/289._game_of_life.md)
* [](/docs/LeetCode/290._word_pattern.md)
* [](/docs/LeetCode/292._nim_game.md)
* [](/docs/LeetCode/296.BestMeetingPoint.md)
* [](/docs/LeetCode/298.BinaryTreeLongestConsecutiveSequence.md)
* [](/docs/LeetCode/299._bulls_and_cows.md)
* [](/docs/LeetCode/300._longest_increasing_subsequence.md)
* [](/docs/LeetCode/303._range_sum_query_-_immutable.md)
* [](/docs/LeetCode/316._Remove_Duplicate_Letters.md)
* [](/docs/LeetCode/319._Bulb_Switcher.md)
* [](/docs/LeetCode/322.CoinChange.md)
* [](/docs/LeetCode/323.NumberofConnectedComponentsinanUndirectedGraph.md)
* [](/docs/LeetCode/324._Wiggle_Sort_II.md)
* [](/docs/LeetCode/326._power_of_three.md)
* [](/docs/LeetCode/328._odd_even_linked_list.md)
* [](/docs/LeetCode/334._increasing_triplet_subsequence.md)
* [](/docs/LeetCode/337._house_robber_iii.md)
* [](/docs/LeetCode/338.CountingBits.md)
* [](/docs/LeetCode/339.NestedListWeightSum.md)
* [](/docs/LeetCode/341._Flatten_Nested_List_Iterator.md)
* [](/docs/LeetCode/342._Power_of_Four.md)
* [](/docs/LeetCode/344._reverse_string.md)
* [](/docs/LeetCode/345._Reverse_Vowels_of_a_String.md)
* [](/docs/LeetCode/349._intersection_of_two_arrays.md)
* [](/docs/LeetCode/350._intersection_of_two_arrays_ii.md)
* [](/docs/LeetCode/353.DesignSnakeGame.md)
* [](/docs/LeetCode/364.NestedListWeightSumII.md)
* [](/docs/LeetCode/366.FindLeavesofBinaryTree.md)
* [](/docs/LeetCode/367._valid_perfect_square.md)
* [](/docs/LeetCode/369.PlusOneLinkedList.md)
* [](/docs/LeetCode/371._sum_of_two_integers.md)
* [](/docs/LeetCode/374._Guess_Number_Higher_or_Lower.md)
* [](/docs/LeetCode/377._combination_sum_iv.md)
* [](/docs/LeetCode/378._kth_smallest_element_in_a_sorted_matrix.md)
* [](/docs/LeetCode/380.InsertDeleteGetRandomO(1).md)
* [](/docs/LeetCode/381.InsertDeleteGetRandomO(1)-Duplicatesallowed.md)
* [](/docs/LeetCode/382._linked_list_random_node.md)
* [](/docs/LeetCode/383._ransom_note.md)
* [](/docs/LeetCode/384.ShuffleanArray.md)
* [](/docs/LeetCode/387._first_unique_character_in_a_string.md)
* [](/docs/LeetCode/388._Longest_Absolute_File_Path.md)
* [](/docs/LeetCode/389._find_the_difference.md)
* [](/docs/LeetCode/392._is_subsequence.md)
* [](/docs/LeetCode/394._decode_string.md)
* [](/docs/LeetCode/400.NthDigit.md)
* [](/docs/LeetCode/401._binary_watch.md)
* [](/docs/LeetCode/404._sum_of_left_leaves.md)
* [](/docs/LeetCode/405.ConvertaNumbertoHexadecimal.md)
* [](/docs/LeetCode/406._Queue_Reconstruction_by_Height.md)
* [](/docs/LeetCode/412._fizz_buzz.md)
* [](/docs/LeetCode/413.ArithmeticSlices.md)
* [](/docs/LeetCode/414._third_maximum_number.md)
* [](/docs/LeetCode/415._add_strings.md)
* [](/docs/LeetCode/416.PartitionEqualSubsetSum.md)
* [](/docs/LeetCode/421._Maximum_XOR_of_Two_Numbers_in_an_Array.md)
* [](/docs/LeetCode/422.ValidWordSquare.md)
* [](/docs/LeetCode/434._number_of_segments_in_a_string.md)
* [](/docs/LeetCode/437._path_sum_iii.md)
* [](/docs/LeetCode/438._Find_All_Anagrams_in_a_String.md)
* [](/docs/LeetCode/439.TernaryExpressionParser.md)
* [](/docs/LeetCode/441._arranging_coins.md)
* [](/docs/LeetCode/448._Find_All_Numbers_Disappeared_in_an_Array.md)
* [](/docs/LeetCode/450.DeleteNodeinaBST.md)
* [](/docs/LeetCode/453._Minimum_Moves_to_Equal_Array_Elements.md)
* [](/docs/LeetCode/459._Repeated_Substring_Pattern.md)
* [](/docs/LeetCode/461._HammingDistance.md)
* [](/docs/LeetCode/463._Island_Perimeter.md)
* [](/docs/LeetCode/467._Unique_Substrings_in_Wraparound_String.md)
* [](/docs/LeetCode/469.ConvexPolygon.md)
* [](/docs/LeetCode/476._Number_Complement.md)
* [](/docs/LeetCode/477._Total_Hamming_Distance.md)
* [](/docs/LeetCode/485._Max_Consecutive_Ones.md)
* [](/docs/LeetCode/587._Erect_the_Fence.md)
* [](/docs/LeetCode/599._Minimum_Index_Sum_of_Two_Lists.md)
* [](/docs/LeetCode/647._Palindromic_Substrings.md)
* [](/docs/LeetCode/657._Judge_Route_Circle.md)
* [](/docs/LeetCode/665._Non-decreasing_Array.md)
* [](/docs/LeetCode/672._Bulb_Switcher_II.md)
* [](/docs/LeetCode/681._Next_Closest_Time.md)
* [](/docs/LeetCode/682._Baseball_Game.md)
* [](/docs/LeetCode/687._Longest_Univalue_Path.md)
* [](/docs/LeetCode/740._delete_and_earn.md)
* [](/docs/LeetCode/760._Find_Anagram_Mappings.md)

## 推荐的一些LeetCode网站

1. [KrisYu的GItuhub](https://github.com/KrisYu/LeetCode-CLRS-Python)
2. [kamyu104的Github](https://github.com/kamyu104/LeetCode)
3. [数据结构与算法/leetcode/lintcode题解](https://algorithm.yuanbin.me/zh-hans/)
4. [Leetcode 讨论区](https://discuss.leetcode.com/)
5. [visualgo算法可视化网站](https://visualgo.net/en)
6. [Data Structure Visualization](https://www.cs.usfca.edu/~galles/visualization/Algorithms.html)
7. [我的算法学习之路 - Lucida](http://zh.lucida.me/blog/on-learning-algorithms/)
8. [HiredInTech](https://www.hiredintech.com/) System Design 的总结特别适合入门
9. [mitcc的Github](https://github.com/mitcc/AlgoSolutions)
10. [小土刀的面试刷题笔记](http://wdxtub.com/interview/14520594642530.html)

 - 💪就是干！
 
 





