Skip to content

rishinrahim/leetcode-exercises

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

algorithm-python

Data structures and Algorithms in Python

By Patterns

Array


Binary


Dynamic Programming


Graph


Interval


Linked List


Matrix


By Company

Meta: Top 100

Last updated: Mar 11, 2025

Index Difficulty Title Frequency Acceptance Rate Status
1 Medium Kth Largest Element in an Array 100.0% 67.4%
2 Easy Valid Word Abbreviation 97.1% 36.5%
3 Easy Valid Palindrome II 95.5% 42.2%
4 Medium Minimum Remove to Make Valid Parentheses 94.6% 70.0%
5 Easy Merge Sorted Array 91.9% 51.9%
6 Medium Binary Tree Vertical Order Traversal 91.9% 56.2%
7 Medium Random Pick with Weight 87.6% 48.0%
8 Medium Lowest Common Ancestor of a Binary Tree 86.4% 65.1%
9 Medium Basic Calculator II 85.1% 45.0%
10 Medium Simplify Path 83.8% 45.9%
11 Medium Dot Product of Two Sparse Vectors 82.4% 89.9%
12 Medium Nested List Weight Sum 80.9% 85.0%
13 Medium Buildings With an Ocean View 79.2% 80.3%
14 Medium Minimum Add to Make Parentheses Valid 79.2% 74.7%
15 Medium Shortest Path in Binary Matrix 79.2% 48.9%
16 Medium "Pow(x n)"% 7920.0%
17 Medium Find Peak Element 77.5% 46.3%
18 Easy Valid Palindrome 77.5% 49.7%
19 Easy Diameter of Binary Tree 77.5% 62.4%
20 Easy Range Sum of BST 75.6% 87.3%
21 Medium Top K Frequent Elements 75.6% 63.9%
22 Medium Remove Nth Node From End of List 73.6% 47.7%
23 Medium Lowest Common Ancestor of a Binary Tree III 73.6% 81.6%
24 Medium Sum Root to Leaf Numbers 71.4% 67.5%
25 Medium Interval List Intersections 71.4% 72.3%
26 Medium Find First and Last Position of Element in Sorted Array 71.4% 45.8%
27 Medium LRU Cache 71.4% 44.1%
28 Hard Minimum Window Substring 68.9% 44.4%
29 Medium Merge Intervals 68.9% 48.5%
30 Hard Merge k Sorted Lists 68.9% 55.3%
31 Medium Clone Graph 66.2% 60.6%
32 Medium Custom Sort String 66.2% 71.5%
33 Hard Making A Large Island 66.2% 49.7%
34 Medium K Closest Points to Origin 66.2% 67.4%
35 Easy Moving Average from Data Stream 66.2% 79.4%
36 Hard Trapping Rain Water 66.2% 63.9%
37 Easy Two Sum 63.1% 54.7%
38 Hard Valid Number 63.1% 20.9%
39 Easy Palindrome Number 63.1% 58.3%
40 Easy Closest Binary Search Tree Value 63.1% 50.4%
41 Medium Binary Tree Right Side View 63.1% 64.9%
42 Easy Kth Missing Positive Number 63.1% 61.5%
43 Medium Next Permutation 63.1% 42.0%
44 Medium Copy List with Random Pointer 59.5% 59.0%
45 Medium Accounts Merge 59.5% 58.6%
46 Easy Best Time to Buy and Sell Stock 59.5% 54.6%
47 Medium Subarray Sum Equals K 59.5% 44.7%
48 Medium Insert into a Sorted Circular Linked List 59.5% 37.4%
49 Easy Add Strings 59.5% 51.7%
50 Easy Recyclable and Low Fat Products 55.2% 89.4%
51 Hard Vertical Order Traversal of a Binary Tree 55.2% 49.9%
52 Medium Random Pick Index 55.2% 64.2%
53 Easy Longest Common Prefix 55.2% 44.6%
54 Medium Maximum Swap 55.2% 51.7%
55 Medium Search in Rotated Sorted Array II 55.2% 38.4%
56 Medium Course Schedule 55.2% 48.2%
57 Medium Longest Palindromic Substring 55.2% 35.0%
58 Medium Longest Substring Without Repeating Characters 50.1% 36.0%
59 Easy Valid Parentheses 50.1% 41.6%
60 Easy Remove Duplicates from Sorted Array 50.1% 58.9%
61 Medium 3Sum 50.1% 36.1%
62 Easy Maximum Average Subarray I 50.1% 44.4%
63 Medium Palindromic Substrings 50.1% 71.1%
64 Medium Continuous Subarray Sum 50.1% 30.6%
65 Medium Group Shifted Strings 50.1% 66.7%
66 Easy Majority Element 50.1% 65.4%
67 Medium Max Consecutive Ones III 50.1% 64.9%
68 Hard Expression Add Operators 50.1% 40.8%
69 Medium All Nodes Distance K in Binary Tree 50.1% 65.6%
70 Hard Word Ladder 50.1% 41.4%
71 Easy Contains Duplicate II 43.5% 47.6%
72 Medium Max Area of Island 43.5% 72.8%
73 Easy Roman to Integer 43.5% 63.7%
74 Easy Remove All Adjacent Duplicates In String 43.5% 70.8%
75 Medium Maximum Subarray 43.5% 51.6%
76 Hard Binary Tree Maximum Path Sum 43.5% 40.7%
77 Hard Valid Palindrome III 43.5% 49.2%
78 Medium Check Completeness of a Binary Tree 43.5% 57.8%
79 Medium Diagonal Traverse 43.5% 62.1%
80 Easy Merge Strings Alternately 43.5% 81.5%
81 Medium Add Two Numbers 43.5% 45.0%
82 Medium Convert Binary Search Tree to Sorted Doubly Linked List 43.5% 65.3%
83 Easy Create Hello World Function 43.5% 81.8%
84 Medium Word Break 43.5% 47.7%
85 Medium Reverse Integer 34.3% 29.7%
86 Medium Exclusive Time of Functions 34.3% 63.7%
87 Easy Next Greater Element I 34.3% 73.7%
88 Medium Walls and Gates 34.3% 62.3%
89 Medium Find Largest Value in Each Tree Row 34.3% 66.4%
90 Easy Find the Index of the First Occurrence in a String 34.3% 44.2%
91 Medium Zigzag Conversion 34.3% 50.3%
92 Easy Remove Element 34.3% 59.1%
93 Easy Toeplitz Matrix 34.3% 69.4%
94 Medium Rotate Image 34.3% 76.8%
95 Easy Missing Ranges 34.3% 34.8%
96 Medium Shortest Path in a Hidden Grid 34.3% 43.2%
97 Medium Subsets 34.3% 79.9%
98 Hard Longest Increasing Path in a Matrix 34.3% 54.7%
99 Medium Boundary of Binary Tree 34.3% 46.6%
100 Medium Count Ways To Build Good Strings 34.3% 59.4%

References :

  1. https://www.coursera.org/learn/algorithms-part1/
  2. https://www.coursera.org/learn/algorithms-part2/
  3. Data Structures and Algorithms in Python Paperback – 2016 | Michael T. Goodrich (Author), Roberto Tamassia (Author), Michael H. Goldwasser (Author)
  4. Introduction to Algorithms, 3Ed. (International Edition) (The MIT Press) Paperback – 20 Aug 2009 | T Cormen (Author), C Leiserson (Author), R Rivest (Author), C Stein (Author)

About

Academic Notes & Exercises | Data structures and Algorithms

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages