Skip to content

Solutions and explanations of data structures and algorithms from Leetcode in python

Notifications You must be signed in to change notification settings

AnushaDeviR/dsaWithPython

Repository files navigation

Data-Structures and Algorithm (DSA) with Python 🐍

Leet code problems:

No. Problem Difficulty Topics
1. 1.Two Sum Easy
2. 9.Palindrome number Easy
3. 13.Roman to Integer Easy
4. 14.Longest Common Prefix Easy
5. 20.Valid Parentheses Easy string, stack
6. 21.Merge Two Sorted Lists Easy
7. 26.Remove Duplicates from Sorted Easy
8. 27.Remove Element Easy
9. 28.Find the Index of the First Occurrence in a String Easy
10. 35.Search Insert Position Easy
11. 58.Length of Last Word Easy
12. 771.Jewels and Stones Easy
13. 1365.How many numbers are smaller than the current number Easy
14. 763.Partition Labels Medium
15. 922.Sort Array By Parity II Easy Array, 2 pointers, Sorting
16. 125.Valid Palindrome Easy 2 pointers, String
17. 75.Sort Colors Medium 2 pointers, String, Array
18. 11.Container with most water Medium 2 pointers, greedy, array
19. 141.Linked List Cycle Easy 2 pointers, Linked List, HashMap
20. 237.Delete the node in a linked list Medium Linked List
21. 19. Remove Nth Node From End of List Medium Linked List, Two Pointers
22. 21. Merge Two Sorted Lists Easy Linked List, Two Pointers, Recursion
23. 234. Palindrome Linked Lists Easy Linked List, Two Pointers, Recursion, Stack
24. 203. Remove Linked List Elements Easy Linked List, Two Pointers, Recursion
25. 160. Intersection of 2 linked lists Easy Linked List, Two Pointers, Hash Table
26. 876. Middle of the linked list Easy Linked List, Two Pointers
27. 23. Merge K sorted lists Hard Linked List, Merge Sort
28. 643. Maximum Average Subarray 1 Easy Sliding window, array
29. 217. Contains duplicate I Easy array, hash table, sorting
30. 219. Contains duplicate II Easy Sliding window, array, hash table
31. 242. Valid Anagram Easy string, hash table, sorting
32. 49. Group Anagram Medium array, hash table, sort, string
33. 347. Top K Frequent Elements Medium array, hash table, divide and conquer, sort, heap, bucket sort, counting, quick select
34. 238. Product of array except itself Medium array, prefix sum
35. 36. Valid Sudoku Medium array, hash-table, matrix
36. 271. Encode and decode strings (+) Medium string
37. 128. Longest Consecutive Sequence Medium array, hash-table, union find
38. 167. Two Sums II (Sorted Input) Medium array, two pointers, binary search
39. 15. 3 Sum Medium array, two pointers, sorting
40. 42. Trapping Rain Water Hard array, two pointers, dynamic programming, stack/queue, monotonic stack
41. 155. Min Stack Medium stack, design
42. 150. Evaluate Reverse Polish Notation Medium stack, array, math
43. 22. Generate Parentheses Medium string, dynamic programming, backtracking
44. 739. Daily Temperatures Medium array, monotonic stack, stack
45. 84. Largest Rectangle in Histogram Hard array, monotonic stack, stack
46. 704. Binary Search Easy array, binary search
47. 278. First Bad Version Easy binary search, interactive
48. 69. Sqrt(x) Easy binary search, math

About

Solutions and explanations of data structures and algorithms from Leetcode in python

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages