Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

570 Commits

Repository files navigation

LeetCode Solutions by illuz

Updating....

My stupid How to LeetCode.

This is my leetcode solution folder. :)
Language: C++/Java/Python/Sql/Shell Script

If there was something wrong, can contact me at iilluzen in google's email.


Links:

Leetcode Algorithms Problems
Leetcode Database Problems
Leetcode Shell Problems


Problems

There are 333 problems (54 problems for a fee).

I have solved 229 / 279 problems.=w=

#ProblemsSolutionsNote
001001.Two_SumJava Python C++Notes
002002.Add_Two_NumbersC++ Python JavaNotes
003003.Longest_Substring_Without_Repeat...Java Python C++Notes
004004.Median_of_Two_Sorted_ArraysJava Python C++Notes
005005.Longest_Palindromic_SubstringJava Python C++Notes
006006.ZigZag_ConversionC++ Python JavaNotes
007007.Reverse_IntegerC++ Python JavaNotes
008008.String_to_IntegerC++ Python JavaNotes
009009.Palindrome_NumberJava Python C++Notes
010010.Regular_Expression_MatchingC++ Python JavaNotes
011011.Container_With_Most_WaterJava Python C++Notes
012012.Integer_to_RomanJava Python C++Notes
013013.Roman_to_IntegerJava Python C++Notes
014014.Longest_Common_PrefixC++ Python JavaNotes
015015.3SumC++ Python JavaNotes
016016.3Sum_ClosestC++ Python JavaNotes
017017.Letter_Combinations_of_a_Phone_NumberC++ Python JavaNotes
018018.4SumC++ Python JavaNotes
019019.Remove_Nth_Node_From_End_of_ListPython C++Notes
020020.Valid_ParenthesesC++ Python JavaNotes
021021.Merge_Two_Sorted_ListsPython C++Notes
022022.Generate_ParenthesesC++ Python JavaNotes
023023.Merge_k_Sorted_ListsJava Python C++Notes
024024.Swap_Nodes_in_PairsPython C++Notes
025025.Reverse_Nodes_in_k-GroupJava C++Notes
026026.Remove_Duplicates_from_Sorted_ArrayC++Notes
027027.Remove_ElementC++Notes
028028.Implement_strStr()Python C++Notes
029029.Divide_Two_IntegersPython C++Notes
030030.Substring_with_Concatenation_of_...C++ JavaNotes
031031.Next_PermutationPython C++Notes
032032.Longest_Valid_ParenthesesC++Notes
033033.Search_in_Rotated_Sorted_ArrayC++Notes
034034.Search_for_a_RangeJava C++Notes
035035.Search_Insert_PositionC++Notes
036036.Valid_SudokuC++Notes
037037.Sudoku_SolverC++Notes
038038.Count_and_SayPython C++Notes
039039.Combination_SumC++Notes
040040.Combination_Sum_IIC++Notes
041041.First_Missing_PositiveC++Coming soon
042042.Trapping_Rain_WaterC++Coming soon
043043.Multiply_StringsC++Coming soon
044044.Wildcard_MatchingC++Coming soon
045045.Jump_Game_IIC++Coming soon
046046.PermutationsC++Coming soon
047047.Permutations_IIC++Coming soon
048048.Rotate_ImageC++Coming soon
049049.AnagramsC++Coming soon
050050.Pow(x,_n)C++Coming soon
051051.N-QueensC++ Python JavaComing soon
052052.N-Queens_IIC++ Python JavaComing soon
053053.Maximum_SubarrayC++Coming soon
054054.Spiral_MatrixC++Coming soon
055055.Jump_GameC++Coming soon
056056.Merge_IntervalsC++Coming soon
057057.Insert_IntervalC++Coming soon
058058.Length_of_Last_WordC++Coming soon
059059.Spiral_Matrix_IIC++Coming soon
060060.Permutation_SequenceC++Coming soon
061061.Rotate_ListC++Coming soon
062062.Unique_PathsC++Coming soon
063063.Unique_Paths_IIC++Coming soon
064064.Minimum_Path_SumC++Coming soon
065065.Valid_NumberJava Python C++Coming soon
066066.Plus_OneC++Coming soon
067067.Add_BinaryC++Coming soon
068068.Text_JustificationC++ Python JavaNotes
069069.Sqrt(x)C++ Python JavaComing soon
070070.Climbing_StairsC++Coming soon
071071.Simplify_PathC++ Python JavaComing soon
072072.Edit_DistanceC++Coming soon
073073.Set_Matrix_ZeroesC++Coming soon
074074.Search_a_2D_MatrixC++Coming soon
075075.Sort_ColorsC++Coming soon
076076.Minimum_Window_SubstringC++Notes
077077.CombinationsC++Coming soon
078078.SubsetsJava Python C++Coming soon
079079.Word_SearchC++Coming soon
080080.Remove_Duplicates_from_Sorted_Array_IIC++Coming soon
081081.Search_in_Rotated_Sorted_Array_IIC++Coming soon
082082.Remove_Duplicates_from_Sorted_List_IIC++Coming soon
083083.Remove_Duplicates_from_Sorted_ListC++Coming soon
084084.Largest_Rectangle_in_HistogramJava C++Notes
085085.Maximal_RectangleJava C++Notes
086086.Partition_ListC++ Python JavaComing soon
087087.Scramble_StringC++ Python JavaNotes
088088.Merge_Sorted_ArrayC++Coming soon
089089.Gray_CodeC++ Python JavaComing soon
090090.Subsets_IIC++ Python JavaComing soon
091091.Decode_WaysJava Python C++Coming soon
092092.Reverse_Linked_List_IIC++Coming soon
093093.Restore_IP_AddressesC++ Python JavaNotes
094094.Binary_Tree_Inorder_TraversalC++Coming soon
095095.Unique_Binary_Search_TreesC++Notes
096096.Unique_Binary_Search_Trees_IIC++Notes
097097.Interleaving_StringJava C++Notes
098098.Validate_Binary_Search_TreeJava Python C++Notes
099099.Recover_Binary_Search_TreePython C++Notes
100100.Same_TreeC++Coming soon
101101.Symmetric_TreeC++Coming soon
102102.Binary_Tree_Level_Order_TraversalPython C++Notes
103103.Binary_Tree_Zigzag_Level_Order_TraversalPython C++Notes
104104.Maximum_Depth_of_Binary_TreeC++Coming soon
105105.Construct_Binary_Tree_from_Preor...C++Notes
106106.Construct_Binary_Tree_from_Inord...C++Notes
107107.Binary_Tree_Level_Order_Traversal_IIPython C++Notes
108108.Convert_Sorted_Array_to_Binary_S...C++Notes
109109.Convert_Sorted_List_to_Binary_Se...Python C++Notes
110110.Balanced_Binary_TreeC++Coming soon
111111.Minimum_Depth_of_Binary_TreeC++Coming soon
112112.Path_SumC++Coming soon
113113.Path_Sum_IIJava Python C++Coming soon
114114.Flatten_Binary_Tree_to_Linked_ListJava C++Notes
115115.Distinct_SubsequencesPython C++Notes
116116.Populating_Next_Right_Pointers_i...C++ Python JavaComing soon
117117.Populating_Next_Right_Pointers_i...C++ Python JavaComing soon
118118.Pascal's_TriangleC++Coming soon
119119.Pascal's_Triangle_IIC++Coming soon
120120.TriangleJava Python C++Coming soon
121121.Best_Time_to_Buy_and_Sell_StockPython C++Notes
122122.Best_Time_to_Buy_and_Sell_Stock_IIPython C++Notes
123123.Best_Time_to_Buy_and_Sell_Stock_IIIPython C++Notes
124124.Binary_Tree_Maximum_Path_SumPython C++Notes
125125.Valid_PalindromeC++Coming soon
126126.Word_LadderPython C++Notes
126126.Word_Ladder_IIComing soon
127127.Word_LadderComing soon
128128.Longest_Consecutive_SequenceComing soon
129129.Sum_Root_to_Leaf_NumbersC++Coming soon
130130.Surrounded_RegionsC++Notes
131131.Palindrome_PartitioningPython C++Notes
132132.Palindrome_Partitioning_IIC++ JavaNotes
133133.Clone_GraphC++Coming soon
134134.Gas_StationC++Notes
135135.CandyComing soon
136136.Single_NumberC++Notes
137137.Single_Number_IIC++Coming soon
138138.Copy_List_with_Random_PointerJava Python C++Notes
139139.Word_BreakPython C++Notes
140140.Word_Break_IIComing soon
141141.Linked_List_CycleC++Coming soon
142142.Linked_List_Cycle_IIComing soon
143143.Reorder_ListC++Coming soon
144144.Binary_Tree_Preorder_TraversalC++Coming soon
145145.Binary_Tree_Postorder_TraversalC++Coming soon
146146.LRU_CachePython C++Notes
147147.Insertion_Sort_ListC++Coming soon
148148.Sort_ListC++Notes
149149.Max_Points_on_a_LineComing soon
150150.Evaluate_Reverse_Polish_NotationJava Python C++Notes
151151.Reverse_Words_in_a_StringC++ Python JavaNotes
152152.Maximum_Product_SubarrayC++Coming soon
153153.Find_Minimum_in_Rotated_Sorted_ArrayC++Notes
154154.Find_Minimum_in_Rotated_Sorted_Array_IIPython C++Notes
155155.Min_StackC++Notes
156156.Binary_Tree_Upside_Down $ Not Buy Not Buy
157157.Read_N_Characters_Given_Read4 $ Not Buy Not Buy
158158.Read_N_Characters_Given_Read4_II... $ Not Buy Not Buy
159159.Longest_Substring_with_At_Most_T... $ Not Buy Not Buy
160160.Intersection_of_Two_Linked_ListsC++Coming soon
161161.One_Edit_Distance $ Not Buy Not Buy
162162.Find_Peak_ElementC++ Python JavaComing soon
163163.Missing_Ranges $ Not Buy Not Buy
164164.Maximum_GapC++Notes
165165.Compare_Version_NumbersC++Coming soon
166166.Fraction_to_Recurring_DecimalC++Notes
167167.Two_Sum_II_-_Input_array_is_sorted $ Not Buy Not Buy
168168.Excel_Sheet_Column_TitleJava Python C++Coming soon
169169.Majority_ElementJava Python C++Coming soon
170170.Two_Sum_III_-_Data_structure_design $ Not Buy Not Buy
171171.Excel_Sheet_Column_NumberJava Python C++Coming soon
172172.Factorial_Trailing_ZeroesJava Python C++Coming soon
173173.Binary_Search_Tree_IteratorPython C++Notes
174174.Dungeon_GameComing soon
175175.Combine_Two_TablesSqlComing soon
176176.Second_Highest_SalarySqlComing soon
177177.Nth_Highest_SalarySqlNotes
178178.Rank_ScoresSqlNotes
179179.Largest_NumberJava Python C++Coming soon
180180.Consecutive_NumbersSqlNotes
181181.Employees_Earning_More_Than_Thei...SqlComing soon
182182.Duplicate_EmailsSqlComing soon
183183.Customers_Who_Never_OrderSqlNotes
184184.Department_Highest_SalarySqlNotes
186186.Reverse_Words_in_a_String_II $ Not Buy Not Buy
187187.Repeated_DNA_SequencesC++ Python JavaComing soon
188188.Best_Time_to_Buy_and_Sell_Stock_IVC++Notes
189189.Rotate_ArrayC++Notes
190190.Reverse_BitsC++ Python JavaNotes
191191.Number_of_1_BitsC++ JavaNotes
192192.Word_FrequencyShellNotes
193193.Valid_Phone_NumbersShellNotes
194194.Transpose_FileShellNotes
195195.Tenth_LineShellNotes
196196.Delete_Duplicate_EmailsSqlComing soon
197197.Rising_TemperatureSqlNotes
198198.House_RobberC++Notes
199199.Binary_Tree_Right_Side_ViewPython C++Notes
200200.Number_of_IslandsC++Notes
201201.Bitwise_AND_of_Numbers_RangePython C++Notes
202202.Happy_NumberPython C++Notes
203203.Remove_Linked_List_ElementsC++ Python JavaNotes
204204.Count_PrimesC++Coming soon
205205.Isomorphic_StringsPython C++Notes
206206.Reverse_Linked_ListC++Coming soon
207207.Course_SchedulePython C++Notes
208208.Implement_Trie_(Prefix_Tree)C++Notes
209209.Minimum_Size_Subarray_SumC++Coming soon
210210.Course_Schedule_IIPython C++Notes
211211.Add_and_Search_Word_-_Data_struc...Coming soon
212212.Word_Search_IIComing soon
213213.House_Robber_IIComing soon
214214.Shortest_PalindromeComing soon
215215.Kth_Largest_Element_in_an_ArrayC++ Python JavaNotes
216216.Combination_Sum_IIIC++Notes
217217.Contains_DuplicatePython C++Notes
218218.The_Skyline_ProblemComing soon
219219.Contains_Duplicate_IIC++Notes
220220.Contains_Duplicate_IIIC++ JavaNotes
221221.Maximal_SquarePython C++Notes
222222.Count_Complete_Tree_NodesPython C++Notes
223223.Rectangle_AreaC++Notes
224224.Basic_CalculatorJava C++Notes
225225.Implement_Stack_using_QueuesJava C++Notes
226226.Invert_Binary_TreePython C++Notes
227227.Basic_Calculator_IIComing soon
228228.Summary_RangesPython C++Notes
229229.Majority_Element_IIComing soon
230230.Kth_Smallest_Element_in_a_BSTC++Notes
231231.Power_of_TwoPython C++Notes
232232.Implement_Queue_using_StacksPython C++Notes
233233.Number_of_Digit_OneComing soon
234234.Palindrome_Linked_ListJava Python C++Notes
235235.Lowest_Common_Ancestor_of_a_Bina...Python C++Notes
236236.Lowest_Common_Ancestor_of_a_Binary_TreeComing soon
237237.Delete_Node_in_a_Linked_ListPython C++Notes
238238.Product_of_Array_Except_SelfJava Python C++Notes
239239.Sliding_Window_MaximumPython C++Notes
240240.Search_a_2D_Matrix_IIComing soon
241241.Different_Ways_to_Add_ParenthesesPython C++Notes
242242.Valid_AnagramPython C++Notes
243243.Shortest_Word_Distance $ Not Buy Not Buy
244244.Shortest_Word_Distance_II $ Not Buy Not Buy
245245.Shortest_Word_Distance_III $ Not Buy Not Buy
246246.Strobogrammatic_Number $ Not Buy Not Buy
247247.Strobogrammatic_Number_II $ Not Buy Not Buy
248248.Strobogrammatic_Number_III $ Not Buy Not Buy
249249.Group_Shifted_Strings $ Not Buy Not Buy
250250.Count_Univalue_Subtrees $ Not Buy Not Buy
251251.Flatten_2D_Vector $ Not Buy Not Buy
252252.Meeting_Rooms $ Not Buy Not Buy
253253.Meeting_Rooms_II $ Not Buy Not Buy
254254.Factor_Combinations $ Not Buy Not Buy
255255.Verify_Preorder_Sequence_in_Bina... $ Not Buy Not Buy
256256.Paint_House $ Not Buy Not Buy
257257.Binary_Tree_PathsPython C++Notes
258258.Add_DigitsPython C++Notes
259259.3Sum_Smaller $ Not Buy Not Buy
260260.Single_Number_IIIComing soon
261261.Graph_Valid_Tree $ Not Buy Not Buy
263263.Ugly_NumberPython C++Notes
264264.Ugly_Number_IIComing soon
265265.Paint_House_II $ Not Buy Not Buy
266266.Palindrome_Permutation $ Not Buy Not Buy
267267.Palindrome_Permutation_II $ Not Buy Not Buy
268268.Missing_NumberC++ Python JavaNotes
269269.Alien_Dictionary $ Not Buy Not Buy
270270.Closest_Binary_Search_Tree_Value $ Not Buy Not Buy
271271.Encode_and_Decode_Strings $ Not Buy Not Buy
272272.Closest_Binary_Search_Tree_Value_II $ Not Buy Not Buy
273273.Integer_to_English_WordsComing soon
274274.H-IndexComing soon
275275.H-Index_IIComing soon
276276.Paint_Fence $ Not Buy Not Buy
277277.Find_the_Celebrity $ Not Buy Not Buy
278278.First_Bad_VersionPython C++Notes
279279.Perfect_SquaresPython C++Notes
280280.Wiggle_Sort $ Not Buy Not Buy
281281.Zigzag_Iterator $ Not Buy Not Buy
282282.Expression_Add_OperatorsComing soon
283283.Move_ZeroesC++Notes
284284.Peeking_IteratorComing soon
285285.Inorder_Successor_in_BST $ Not Buy Not Buy
286286.Walls_and_Gates $ Not Buy Not Buy
287287.Find_the_Duplicate_NumberComing soon
288288.Unique_Word_Abbreviation $ Not Buy Not Buy
289289.Game_of_LifePython C++Notes
290290.Word_PatternPython C++Notes
291291.Word_Pattern_II $ Not Buy Not Buy
292292.Nim_GameC++Notes
293293.Flip_Game $ Not Buy Not Buy
294294.Flip_Game_II $ Not Buy Not Buy
295295.Find_Median_from_Data_StreamComing soon
296296.Best_Meeting_Point $ Not Buy Not Buy
297297.Serialize_and_Deserialize_Binary_TreeComing soon
298298.Binary_Tree_Longest_Consecutive_Sequence $ Not Buy Not Buy
299299.Bulls_and_CowsC++Coming soon
300300.Longest_Increasing_SubsequenceComing soon
301301.Remove_Invalid_ParenthesesComing soon
302302.Smallest_Rectangle_Enclosing_Bla... $ Not Buy Not Buy
303303.Range_Sum_Query_-_ImmutableComing soon
304304.Range_Sum_Query_2D_-_ImmutableComing soon
305305.Number_of_Islands_II $ Not Buy Not Buy
306306.Additive_NumberComing soon
307307.Range_Sum_Query_-_MutableComing soon
308308.Range_Sum_Query_2D_-_Mutable $ Not Buy Not Buy
309309.Best_Time_to_Buy_and_Sell_Stock_...Coming soon
310310.Minimum_Height_TreesComing soon
311311.Sparse_Matrix_Multiplication $ Not Buy Not Buy
312312.Burst_BalloonsComing soon
313313.Super_Ugly_NumberComing soon
314314.Binary_Tree_Vertical_Order_Traversal $ Not Buy Not Buy
315315.Count_of_Smaller_Numbers_After_SelfComing soon
316316.Remove_Duplicate_LettersComing soon
317317.Shortest_Distance_from_All_Buildings $ Not Buy Not Buy
318318.Maximum_Product_of_Word_LengthsComing soon
319319.Bulb_SwitcherComing soon
320320.Generalized_Abbreviation $ Not Buy Not Buy
321321.Create_Maximum_NumberComing soon
322322.Coin_ChangeComing soon
323323.Number_of_Connected_Components_i... $ Not Buy Not Buy
324324.Wiggle_Sort_IIComing soon
325325.Maximum_Size_Subarray_Sum_Equals_k $ Not Buy Not Buy
326326.Power_of_ThreeC++ Python JavaNotes
327327.Count_of_Range_SumComing soon
328328.Odd_Even_Linked_ListPython C++Notes
329329.Longest_Increasing_Path_in_a_MatrixComing soon
330330.Patching_ArrayComing soon
331331.Verify_Preorder_Serialization_of...Coming soon
332332.Reconstruct_ItineraryComing soon
333333.Largest_BST_Subtree $ Not Buy Not Buy
334334.Increasing_Triplet_SubsequenceC++Notes

About

(229 / 280) [中文|English] Solutions and notes of LEETCODE using C++/Java/Python/Sql/Shell Script.

Topics

Resources

Stars

761 stars

Watchers

78 watching

Forks

Releases

Packages

Contributors

Languages