Skip to content

Latest commit

 

History

107 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode Python Solutions

This repository contains clean and efficient Python solutions for a wide range of LeetCode coding interview problems including arrays, strings, dynamic programming, trees, graphs, and more.

Perfect for:

  • Interview preparation
  • Learning algorithms and data structures
  • Practicing coding problems in Python
# Problem LeetCode Link Solution File
1 1010 Pairs Of Songs With Total Durations Divisible By 60 Link 1010_Pairs_of_Songs_With_Total_Durations_Divisible_by_60.py
2 102 Binary Tree Level Order Traversal Link 102_Binary_Tree_Level_Order_Traversal.py
3 104. Maximum Depth Of Binary Tree - Iterative Dfs Link 104.Maximum_Depth_of_Binary_Tree-_Iterative_DFS.py
4 104 Maximum Depth Of Binary Tree Bfs Link 104_Maximum_Depth_of_Binary_Tree_BFS.py
5 1051 Height Checker Link 1051_Height_Checker.py
6 108. Convert Sorted Array To Binary Search Tree Link 108._Convert_Sorted_Array_to_Binary_Search_Tree.py
7 1108. Defanging An Ip Address Link 1108._Defanging_an_IP_Address.py
8 1119. Remove Vowels From A String Link 1119._Remove_Vowels_from_a_String.py
9 1137. N-Th Tribonacci Number Link 1137._N-th_Tribonacci_Number.py
10 1143. Longest Common Subsequence - Approach 1 - Top Down Memonization Link 1143.Longest_Common_Subsequence-Approach_1-_Top_down_memonization.py
11 1143. Longest Common Subsequence - Tabulation Link 1143.Longest_Common_Subsequence-_Tabulation.py
12 118. Pascal'S Triangle Link 118._Pascal's_Triangle.py
13 11 Container With Most Water Link 11_Container_With_Most_Water.py
14 121. Best Time To Buy And Sell Stock Link 121._Best_Time_to_Buy_and_Sell_Stock.py
15 122. Best Time To Buy And Sell Stock Ii Link 122._Best_Time_to_Buy_and_Sell_Stock_II.py
16 125. Valid Palindrome Link 125._Valid_Palindrome.py
17 1291. Sequential Digits Link 1291._Sequential_Digits.py
18 136. Single Number Link 136._Single_Number.py
19 1365. How Many Numbers Are Smaller Than The Current Number Link 1365._How_Many_Numbers_Are_Smaller_Than_the_Current_Number.py
20 146. Lru Cache Link 146._LRU_Cache.py
21 1480. Running Sum Of 1D Array Link 1480._Running_Sum_of_1d_Array.py
22 1512. Number Of Good Pairs Link 1512._Number_of_Good_Pairs.py
23 1570. Dot Product Of Two Sparse Vectors Link 1570._Dot_Product_of_Two_Sparse_Vectors.py
24 167. Two Sum Ii - Input Array Is Sorted Link 167.Two_Sum_II-_Input_Array_Is_Sorted.py
25 172. Factorial Trailing Zeroes Link 172._Factorial_Trailing_Zeroes.py
26 1768. Merge Strings Alternately Link 1768._Merge_Strings_Alternately.py
27 1796 Second Largest Digit In A String Link 1796_Second_Largest_Digit_in_a_String.py
28 1832. Check If The Sentence Is Pangram Link 1832._Check_if_the_Sentence_Is_Pangram.py
29 1 Two Sum Link 1_Two_Sum.py
30 20. Valid Parentheses Link 20._Valid_Parentheses.py
31 200. Number Of Islands Link 200._Number_of_Islands.py
32 2016. Maximum Difference Between Increasing Elements Link 2016._Maximum_Difference_Between_Increasing_Elements.py
33 206. Reverse Linked List Link 206._Reverse_Linked_List.py
34 21. Merge Two Sorted Lists - Simple Solutiona Link 21.Merge_Two_Sorted_Lists-_Simple_SolutionA.py
35 21. Merge Two Sorted Lists - Two Pointers Link 21.Merge_Two_Sorted_Lists-_two_pointers.py
36 2130. Maximum Twin Sum Of A Linked List Link 2130._Maximum_Twin_Sum_of_a_Linked_List.py
37 2149. Rearrange Array Elements By Sign Link 2149._Rearrange_Array_Elements_by_Sign.py
38 215. Kth Largest Element In An Array Link 215._Kth_Largest_Element_in_an_Array.py
39 215. Kth Largest Element In An Array - Using Sorting Link 215.Kth_Largest_Element_in_an_Array-_Using_Sorting.py
40 2161. Partition Array According To Given Pivot Link 2161._Partition_Array_According_to_Given_Pivot.py
41 217. Contains Duplicate Link 217._Contains_Duplicate.py
42 2235. Add Two Integers Link 2235._Add_Two_Integers.py
43 23. Merge K Sorted Lists - Using Heap Link 23.Merge_k_Sorted_Lists-_Using_Heap.py
44 237. Delete Node In A Linked List Link 237._Delete_Node_in_a_Linked_List.py
45 24. Swap Nodes In Pairs Link 24._Swap_Nodes_in_Pairs.py
46 240. Search A 2D Matrix Ii Link 240._Search_a_2D_Matrix_II.py
47 242. Valid Anagram Link 242._Valid_Anagram.py
48 252. Meeting Rooms Link 252._Meeting_Rooms.py
49 2667. Create Hello World Function Link 2667._Create_Hello_World_Function.py
50 278. First Bad Version Link 278._First_Bad_Version.py
51 2877. Create A Dataframe From List Link 2877._Create_a_DataFrame_from_List.py
52 3024 Type Of Triangle Link 3024_Type_of_Triangle.py
53 3110. Score Of A String Link 3110._Score_of_a_String.py
54 322. Coin Change Link 322._Coin_Change.py
55 326. Power Of Three - With Loop Link 326.Power_of_Three-_with_loop.py
56 33. Search In Rotated Sorted Array Link 33._Search_in_Rotated_Sorted_Array.py
57 34. Find First And Last Position Of Element In Sorted Array Link 34._Find_First_and_Last_Position_of_Element_in_Sorted_Array.py
58 344. Reverse String Link 344._Reverse_String.py
59 346. Moving Average From Data Stream Link 346._Moving_Average_from_Data_Stream.py
60 347. Top K Frequent Elements Link 347._Top_K_Frequent_Elements.py
61 350. Intersection Of Two Arrays Ii Link 350._Intersection_of_Two_Arrays_II.py
62 36. Valid Sudoku Link 36._Valid_Sudoku.py
63 374. Guess Number Higher Or Lower Link 374._Guess_Number_Higher_or_Lower.py
64 387. First Unique Character In A String Link 387._First_Unique_Character_in_a_String.py
65 4. Median Of Two Sorted Arrays Link 4._Median_of_Two_Sorted_Arrays.py
66 41. First Missing Positive Link 41._First_Missing_Positive.py
67 42. Trapping Rain Water Link 42._Trapping_Rain_Water.py
68 451. Sort Characters By Frequency Link 451._Sort_Characters_By_Frequency.py
69 46. Permutations Link 46._Permutations.py
70 48. Rotate Image Link 48._Rotate_Image.py
71 509. Fibonacci Number Link 509._Fibonacci_Number.py
72 518. Coin Change 2 Link 518._Coin_Change_2.py
73 54. Spiral Matrix Link 54._Spiral_Matrix.py
74 551. Student Attendance Record I Link 551._Student_Attendance_Record_I.py
75 56. Merge Intervals Link 56._Merge_Intervals.py
76 62. Unique Paths Link 62._Unique_Paths.py
77 653. Two Sum Iv - Input Is A Bst Link 653.Two_Sum_IV-_Input_is_a_BST.py
78 69. Sqrt(X) Link 69._Sqrt(x).py
79 7. Reverse Integer Link 7._Reverse_Integer.py
80 70. Climbing Stairs Link 70._Climbing_Stairs.py
81 704. Binary Search Link 704._Binary_Search.py
82 724. Find Pivot Index Link 724._Find_Pivot_Index.py
83 73. Set Matrix Zeroes Link 73._Set_Matrix_Zeroes.py
84 74. Search A 2D Matrix Link 74._Search_a_2D_Matrix.py
85 75. Sort Colors Link 75._Sort_Colors.py
86 78. Subsets Link 78._Subsets.py
87 797. All Paths From Source To Target Link 797._All_Paths_From_Source_to_Target.py
88 867. Transpose Matrix Link 867._Transpose_Matrix.py
89 88. Merge Sorted Array Link 88._Merge_Sorted_Array.py
90 994. Rotting Oranges Link 994._Rotting_Oranges.py