Chore: Add headers to all the files (#54)

## Description
- Add headers to all the CSV files

## Script used
```py
import csv
import os

# Set the path of the folder containing the CSV files
folder_path = "./LeetCode-Questions-CompanyWise"
headers = [
    "ID",
    "Title",
    "Acceptance",
    "Difficulty",
    "Frequency",
    "Leetcode Question Link",
]

# Loop through all the CSV files in the folder
for file_name in os.listdir(folder_path):
    if file_name.endswith(".csv"):
        # Read the CSV file into a list of rows
        file_path = os.path.join(folder_path, file_name)
        with open(file_path, "r") as f:
            reader = csv.reader(f)
            rows = list(reader)

        has_headers = False
        if len(rows) > 0 and rows[0] == headers:
            has_headers = True

        if not has_headers:
            rows.insert(0, headers)

            # Write the list of rows back to the CSV file
            with open(file_path, "w", newline="") as f:
                writer = csv.writer(f)
                writer.writerows(rows)

```
This commit is contained in:
Krishna Kumar Dey
2023-04-01 11:07:49 +05:30
committed by GitHub
parent 0aeadbd612
commit fb5f78b55e
534 changed files with 20291 additions and 19757 deletions

View File

@@ -1,86 +1,87 @@
352,Data Stream as Disjoint Intervals,47.3%,Hard,0.26671077361397416, https://leetcode.com/problems/data-stream-as-disjoint-intervals
362,Design Hit Counter,63.7%,Medium,0.20812125379246896, https://leetcode.com/problems/design-hit-counter
1242,Web Crawler Multithreaded,45.9%,Medium,0.14953173397096375, https://leetcode.com/problems/web-crawler-multithreaded
636,Exclusive Time of Functions,51.9%,Medium,0.12466318981419816, https://leetcode.com/problems/exclusive-time-of-functions
1236,Web Crawler,64.3%,Medium,0.09531017980432487, https://leetcode.com/problems/web-crawler
227,Basic Calculator II,36.9%,Medium,0.07508779675444797, https://leetcode.com/problems/basic-calculator-ii
706,Design HashMap,61.3%,Easy,0.0683442674369718, https://leetcode.com/problems/design-hashmap
56,Merge Intervals,39.3%,Medium,0.06807635025869622, https://leetcode.com/problems/merge-intervals
1044,Longest Duplicate Substring,31.9%,Hard,0.062325463197828765, https://leetcode.com/problems/longest-duplicate-substring
1190,Reverse Substrings Between Each Pair of Parentheses,61.5%,Medium,0.06007812394328337, https://leetcode.com/problems/reverse-substrings-between-each-pair-of-parentheses
355,Design Twitter,30.3%,Medium,0.05824061998094904, https://leetcode.com/problems/design-twitter
146,LRU Cache,33.2%,Medium,0.054946555458745445, https://leetcode.com/problems/lru-cache
545,Boundary of Binary Tree,38.9%,Medium,0.04158603377810283, https://leetcode.com/problems/boundary-of-binary-tree
75,Sort Colors,47.3%,Medium,0.030801991570373215, https://leetcode.com/problems/sort-colors
692,Top K Frequent Words,51.8%,Medium,0.029730915184679466, https://leetcode.com/problems/top-k-frequent-words
456,132 Pattern,28.9%,Medium,0.029306126585499394, https://leetcode.com/problems/132-pattern
1305,All Elements in Two Binary Search Trees,76.1%,Medium,0.026282721799194744, https://leetcode.com/problems/all-elements-in-two-binary-search-trees
981,Time Based Key-Value Store,53.1%,Medium,0.02226024024151985, https://leetcode.com/problems/time-based-key-value-store
380,Insert Delete GetRandom O(1),47.5%,Medium,0.021962815449093263, https://leetcode.com/problems/insert-delete-getrandom-o1
341,Flatten Nested List Iterator,52.9%,Medium,0.019980684690483426, https://leetcode.com/problems/flatten-nested-list-iterator
155,Min Stack,44.5%,Easy,0.01886181109797383, https://leetcode.com/problems/min-stack
209,Minimum Size Subarray Sum,38.2%,Medium,0.018832948333092125, https://leetcode.com/problems/minimum-size-subarray-sum
450,Delete Node in a BST,43.1%,Medium,0.018536211907915243, https://leetcode.com/problems/delete-node-in-a-bst
37,Sudoku Solver,43.6%,Hard,0.01821543989134118, https://leetcode.com/problems/sudoku-solver
200,Number of Islands,46.8%,Medium,0.017925481766054456, https://leetcode.com/problems/number-of-islands
402,Remove K Digits,28.4%,Medium,0.016863806052004816, https://leetcode.com/problems/remove-k-digits
71,Simplify Path,32.6%,Medium,0.016260520871780308, https://leetcode.com/problems/simplify-path
23,Merge k Sorted Lists,40.2%,Hard,0.016108271385328228, https://leetcode.com/problems/merge-k-sorted-lists
54,Spiral Matrix,34.1%,Medium,0.014776167707688753, https://leetcode.com/problems/spiral-matrix
20,Valid Parentheses,39.0%,Easy,0.014292491180025941, https://leetcode.com/problems/valid-parentheses
179,Largest Number,28.8%,Medium,0.013865040137171665, https://leetcode.com/problems/largest-number
94,Binary Tree Inorder Traversal,63.3%,Medium,0.013353561806134713, https://leetcode.com/problems/binary-tree-inorder-traversal
767,Reorganize String,48.7%,Medium,0.01329806830463147, https://leetcode.com/problems/reorganize-string
112,Path Sum,41.2%,Easy,0.012265076074932503, https://leetcode.com/problems/path-sum
437,Path Sum III,47.2%,Medium,0.012128711446614806, https://leetcode.com/problems/path-sum-iii
88,Merge Sorted Array,39.4%,Easy,0.011986958032982505, https://leetcode.com/problems/merge-sorted-array
986,Interval List Intersections,67.3%,Medium,0.011969023795320735, https://leetcode.com/problems/interval-list-intersections
205,Isomorphic Strings,39.8%,Easy,0.011544139746865315, https://leetcode.com/problems/isomorphic-strings
207,Course Schedule,43.1%,Medium,0.01113459480911671, https://leetcode.com/problems/course-schedule
92,Reverse Linked List II,38.8%,Medium,0.010427623162259089, https://leetcode.com/problems/reverse-linked-list-ii
113,Path Sum II,46.7%,Medium,0.009784813879998279, https://leetcode.com/problems/path-sum-ii
34,Find First and Last Position of Element in Sorted Array,36.2%,Medium,0.009531951009811851, https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array
206,Reverse Linked List,62.5%,Easy,0.009326794511974934, https://leetcode.com/problems/reverse-linked-list
347,Top K Frequent Elements,61.2%,Medium,0.009249390740121013, https://leetcode.com/problems/top-k-frequent-elements
5,Longest Palindromic Substring,29.5%,Medium,0.009086325220960808, https://leetcode.com/problems/longest-palindromic-substring
21,Merge Two Sorted Lists,53.5%,Easy,0.008990339814651234, https://leetcode.com/problems/merge-two-sorted-lists
125,Valid Palindrome,36.7%,Easy,0.008933948641551634, https://leetcode.com/problems/valid-palindrome
15,3Sum,26.8%,Medium,0.00876717944353383, https://leetcode.com/problems/3sum
139,Word Break,40.1%,Medium,0.008741314401573542, https://leetcode.com/problems/word-break
173,Binary Search Tree Iterator,56.6%,Medium,0.008489015324911316, https://leetcode.com/problems/binary-search-tree-iterator
394,Decode String,50.0%,Medium,0.008166644000272283, https://leetcode.com/problems/decode-string
438,Find All Anagrams in a String,43.3%,Medium,0.008126822460497498, https://leetcode.com/problems/find-all-anagrams-in-a-string
253,Meeting Rooms II,45.7%,Medium,0.008079219870546493, https://leetcode.com/problems/meeting-rooms-ii
239,Sliding Window Maximum,43.0%,Hard,0.007898935224534491, https://leetcode.com/problems/sliding-window-maximum
38,Count and Say,44.6%,Easy,0.007829360800435779, https://leetcode.com/problems/count-and-say
101,Symmetric Tree,46.8%,Easy,0.007646596306528098, https://leetcode.com/problems/symmetric-tree
876,Middle of the Linked List,68.4%,Easy,0.007624893975696915, https://leetcode.com/problems/middle-of-the-linked-list
415,Add Strings,47.5%,Easy,0.007587289812159497, https://leetcode.com/problems/add-strings
240,Search a 2D Matrix II,43.2%,Medium,0.0075829747244553335, https://leetcode.com/problems/search-a-2d-matrix-ii
10,Regular Expression Matching,26.8%,Hard,0.0071865203293987245, https://leetcode.com/problems/regular-expression-matching
204,Count Primes,31.5%,Easy,0.007072165261362441, https://leetcode.com/problems/count-primes
938,Range Sum of BST,81.3%,Easy,0.007011422237803984, https://leetcode.com/problems/range-sum-of-bst
114,Flatten Binary Tree to Linked List,49.3%,Medium,0.006896579059060353, https://leetcode.com/problems/flatten-binary-tree-to-linked-list
230,Kth Smallest Element in a BST,60.2%,Medium,0.0063361529894967236, https://leetcode.com/problems/kth-smallest-element-in-a-bst
138,Copy List with Random Pointer,36.4%,Medium,0.006191011880825271, https://leetcode.com/problems/copy-list-with-random-pointer
199,Binary Tree Right Side View,54.1%,Medium,0.0056826406650506926, https://leetcode.com/problems/binary-tree-right-side-view
543,Diameter of Binary Tree,48.4%,Easy,0.005305755914149804, https://leetcode.com/problems/diameter-of-binary-tree
1,Two Sum,45.6%,Easy,0.0051178232035212715, https://leetcode.com/problems/two-sum
53,Maximum Subarray,46.5%,Easy,0.004869349014182134, https://leetcode.com/problems/maximum-subarray
121,Best Time to Buy and Sell Stock,50.5%,Easy,0.0047725193990346675, https://leetcode.com/problems/best-time-to-buy-and-sell-stock
62,Unique Paths,54.1%,Medium,0.004621080312067025, https://leetcode.com/problems/unique-paths
17,Letter Combinations of a Phone Number,46.8%,Medium,0.0044018999217624675, https://leetcode.com/problems/letter-combinations-of-a-phone-number
42,Trapping Rain Water,48.9%,Hard,0.004350670338744988, https://leetcode.com/problems/trapping-rain-water
242,Valid Anagram,56.9%,Easy,0.004154123743115972, https://leetcode.com/problems/valid-anagram
28,Implement strStr(),34.5%,Easy,0.003943222775040032, https://leetcode.com/problems/implement-strstr
4,Median of Two Sorted Arrays,29.6%,Hard,0.003900160950094767, https://leetcode.com/problems/median-of-two-sorted-arrays
49,Group Anagrams,56.9%,Medium,0.0038040939835560453, https://leetcode.com/problems/group-anagrams
8,String to Integer (atoi),15.4%,Medium,0.0037925521897059712, https://leetcode.com/problems/string-to-integer-atoi
14,Longest Common Prefix,35.4%,Easy,0.003320331762984143, https://leetcode.com/problems/longest-common-prefix
33,Search in Rotated Sorted Array,34.5%,Medium,0.003229976968332634, https://leetcode.com/problems/search-in-rotated-sorted-array
283,Move Zeroes,57.8%,Easy,0.0028853803470673955, https://leetcode.com/problems/move-zeroes
26,Remove Duplicates from Sorted Array,45.1%,Easy,0.0019513153174351963, https://leetcode.com/problems/remove-duplicates-from-sorted-array
210,Course Schedule II,40.7%,Medium,0.0019086707135282834, https://leetcode.com/problems/course-schedule-ii
3,Longest Substring Without Repeating Characters,30.4%,Medium,0.0015556336509412823, https://leetcode.com/problems/longest-substring-without-repeating-characters
151,Reverse Words in a String,21.9%,Medium,0.0015375156780384337, https://leetcode.com/problems/reverse-words-in-a-string
50,Pow(x;n),30.3%,Medium,0.0014016892647828818, https://leetcode.com/problems/powx-n
ID,Title,Acceptance,Difficulty,Frequency,Leetcode Question Link
352,Data Stream as Disjoint Intervals,47.3%,Hard,0.26671077361397416, https://leetcode.com/problems/data-stream-as-disjoint-intervals
362,Design Hit Counter,63.7%,Medium,0.20812125379246896, https://leetcode.com/problems/design-hit-counter
1242,Web Crawler Multithreaded,45.9%,Medium,0.14953173397096375, https://leetcode.com/problems/web-crawler-multithreaded
636,Exclusive Time of Functions,51.9%,Medium,0.12466318981419816, https://leetcode.com/problems/exclusive-time-of-functions
1236,Web Crawler,64.3%,Medium,0.09531017980432487, https://leetcode.com/problems/web-crawler
227,Basic Calculator II,36.9%,Medium,0.07508779675444797, https://leetcode.com/problems/basic-calculator-ii
706,Design HashMap,61.3%,Easy,0.0683442674369718, https://leetcode.com/problems/design-hashmap
56,Merge Intervals,39.3%,Medium,0.06807635025869622, https://leetcode.com/problems/merge-intervals
1044,Longest Duplicate Substring,31.9%,Hard,0.062325463197828765, https://leetcode.com/problems/longest-duplicate-substring
1190,Reverse Substrings Between Each Pair of Parentheses,61.5%,Medium,0.06007812394328337, https://leetcode.com/problems/reverse-substrings-between-each-pair-of-parentheses
355,Design Twitter,30.3%,Medium,0.05824061998094904, https://leetcode.com/problems/design-twitter
146,LRU Cache,33.2%,Medium,0.054946555458745445, https://leetcode.com/problems/lru-cache
545,Boundary of Binary Tree,38.9%,Medium,0.04158603377810283, https://leetcode.com/problems/boundary-of-binary-tree
75,Sort Colors,47.3%,Medium,0.030801991570373215, https://leetcode.com/problems/sort-colors
692,Top K Frequent Words,51.8%,Medium,0.029730915184679466, https://leetcode.com/problems/top-k-frequent-words
456,132 Pattern,28.9%,Medium,0.029306126585499394, https://leetcode.com/problems/132-pattern
1305,All Elements in Two Binary Search Trees,76.1%,Medium,0.026282721799194744, https://leetcode.com/problems/all-elements-in-two-binary-search-trees
981,Time Based Key-Value Store,53.1%,Medium,0.02226024024151985, https://leetcode.com/problems/time-based-key-value-store
380,Insert Delete GetRandom O(1),47.5%,Medium,0.021962815449093263, https://leetcode.com/problems/insert-delete-getrandom-o1
341,Flatten Nested List Iterator,52.9%,Medium,0.019980684690483426, https://leetcode.com/problems/flatten-nested-list-iterator
155,Min Stack,44.5%,Easy,0.01886181109797383, https://leetcode.com/problems/min-stack
209,Minimum Size Subarray Sum,38.2%,Medium,0.018832948333092125, https://leetcode.com/problems/minimum-size-subarray-sum
450,Delete Node in a BST,43.1%,Medium,0.018536211907915243, https://leetcode.com/problems/delete-node-in-a-bst
37,Sudoku Solver,43.6%,Hard,0.01821543989134118, https://leetcode.com/problems/sudoku-solver
200,Number of Islands,46.8%,Medium,0.017925481766054456, https://leetcode.com/problems/number-of-islands
402,Remove K Digits,28.4%,Medium,0.016863806052004816, https://leetcode.com/problems/remove-k-digits
71,Simplify Path,32.6%,Medium,0.016260520871780308, https://leetcode.com/problems/simplify-path
23,Merge k Sorted Lists,40.2%,Hard,0.016108271385328228, https://leetcode.com/problems/merge-k-sorted-lists
54,Spiral Matrix,34.1%,Medium,0.014776167707688753, https://leetcode.com/problems/spiral-matrix
20,Valid Parentheses,39.0%,Easy,0.014292491180025941, https://leetcode.com/problems/valid-parentheses
179,Largest Number,28.8%,Medium,0.013865040137171665, https://leetcode.com/problems/largest-number
94,Binary Tree Inorder Traversal,63.3%,Medium,0.013353561806134713, https://leetcode.com/problems/binary-tree-inorder-traversal
767,Reorganize String,48.7%,Medium,0.01329806830463147, https://leetcode.com/problems/reorganize-string
112,Path Sum,41.2%,Easy,0.012265076074932503, https://leetcode.com/problems/path-sum
437,Path Sum III,47.2%,Medium,0.012128711446614806, https://leetcode.com/problems/path-sum-iii
88,Merge Sorted Array,39.4%,Easy,0.011986958032982505, https://leetcode.com/problems/merge-sorted-array
986,Interval List Intersections,67.3%,Medium,0.011969023795320735, https://leetcode.com/problems/interval-list-intersections
205,Isomorphic Strings,39.8%,Easy,0.011544139746865315, https://leetcode.com/problems/isomorphic-strings
207,Course Schedule,43.1%,Medium,0.01113459480911671, https://leetcode.com/problems/course-schedule
92,Reverse Linked List II,38.8%,Medium,0.010427623162259089, https://leetcode.com/problems/reverse-linked-list-ii
113,Path Sum II,46.7%,Medium,0.009784813879998279, https://leetcode.com/problems/path-sum-ii
34,Find First and Last Position of Element in Sorted Array,36.2%,Medium,0.009531951009811851, https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array
206,Reverse Linked List,62.5%,Easy,0.009326794511974934, https://leetcode.com/problems/reverse-linked-list
347,Top K Frequent Elements,61.2%,Medium,0.009249390740121013, https://leetcode.com/problems/top-k-frequent-elements
5,Longest Palindromic Substring,29.5%,Medium,0.009086325220960808, https://leetcode.com/problems/longest-palindromic-substring
21,Merge Two Sorted Lists,53.5%,Easy,0.008990339814651234, https://leetcode.com/problems/merge-two-sorted-lists
125,Valid Palindrome,36.7%,Easy,0.008933948641551634, https://leetcode.com/problems/valid-palindrome
15,3Sum,26.8%,Medium,0.00876717944353383, https://leetcode.com/problems/3sum
139,Word Break,40.1%,Medium,0.008741314401573542, https://leetcode.com/problems/word-break
173,Binary Search Tree Iterator,56.6%,Medium,0.008489015324911316, https://leetcode.com/problems/binary-search-tree-iterator
394,Decode String,50.0%,Medium,0.008166644000272283, https://leetcode.com/problems/decode-string
438,Find All Anagrams in a String,43.3%,Medium,0.008126822460497498, https://leetcode.com/problems/find-all-anagrams-in-a-string
253,Meeting Rooms II,45.7%,Medium,0.008079219870546493, https://leetcode.com/problems/meeting-rooms-ii
239,Sliding Window Maximum,43.0%,Hard,0.007898935224534491, https://leetcode.com/problems/sliding-window-maximum
38,Count and Say,44.6%,Easy,0.007829360800435779, https://leetcode.com/problems/count-and-say
101,Symmetric Tree,46.8%,Easy,0.007646596306528098, https://leetcode.com/problems/symmetric-tree
876,Middle of the Linked List,68.4%,Easy,0.007624893975696915, https://leetcode.com/problems/middle-of-the-linked-list
415,Add Strings,47.5%,Easy,0.007587289812159497, https://leetcode.com/problems/add-strings
240,Search a 2D Matrix II,43.2%,Medium,0.0075829747244553335, https://leetcode.com/problems/search-a-2d-matrix-ii
10,Regular Expression Matching,26.8%,Hard,0.0071865203293987245, https://leetcode.com/problems/regular-expression-matching
204,Count Primes,31.5%,Easy,0.007072165261362441, https://leetcode.com/problems/count-primes
938,Range Sum of BST,81.3%,Easy,0.007011422237803984, https://leetcode.com/problems/range-sum-of-bst
114,Flatten Binary Tree to Linked List,49.3%,Medium,0.006896579059060353, https://leetcode.com/problems/flatten-binary-tree-to-linked-list
230,Kth Smallest Element in a BST,60.2%,Medium,0.0063361529894967236, https://leetcode.com/problems/kth-smallest-element-in-a-bst
138,Copy List with Random Pointer,36.4%,Medium,0.006191011880825271, https://leetcode.com/problems/copy-list-with-random-pointer
199,Binary Tree Right Side View,54.1%,Medium,0.0056826406650506926, https://leetcode.com/problems/binary-tree-right-side-view
543,Diameter of Binary Tree,48.4%,Easy,0.005305755914149804, https://leetcode.com/problems/diameter-of-binary-tree
1,Two Sum,45.6%,Easy,0.0051178232035212715, https://leetcode.com/problems/two-sum
53,Maximum Subarray,46.5%,Easy,0.004869349014182134, https://leetcode.com/problems/maximum-subarray
121,Best Time to Buy and Sell Stock,50.5%,Easy,0.0047725193990346675, https://leetcode.com/problems/best-time-to-buy-and-sell-stock
62,Unique Paths,54.1%,Medium,0.004621080312067025, https://leetcode.com/problems/unique-paths
17,Letter Combinations of a Phone Number,46.8%,Medium,0.0044018999217624675, https://leetcode.com/problems/letter-combinations-of-a-phone-number
42,Trapping Rain Water,48.9%,Hard,0.004350670338744988, https://leetcode.com/problems/trapping-rain-water
242,Valid Anagram,56.9%,Easy,0.004154123743115972, https://leetcode.com/problems/valid-anagram
28,Implement strStr(),34.5%,Easy,0.003943222775040032, https://leetcode.com/problems/implement-strstr
4,Median of Two Sorted Arrays,29.6%,Hard,0.003900160950094767, https://leetcode.com/problems/median-of-two-sorted-arrays
49,Group Anagrams,56.9%,Medium,0.0038040939835560453, https://leetcode.com/problems/group-anagrams
8,String to Integer (atoi),15.4%,Medium,0.0037925521897059712, https://leetcode.com/problems/string-to-integer-atoi
14,Longest Common Prefix,35.4%,Easy,0.003320331762984143, https://leetcode.com/problems/longest-common-prefix
33,Search in Rotated Sorted Array,34.5%,Medium,0.003229976968332634, https://leetcode.com/problems/search-in-rotated-sorted-array
283,Move Zeroes,57.8%,Easy,0.0028853803470673955, https://leetcode.com/problems/move-zeroes
26,Remove Duplicates from Sorted Array,45.1%,Easy,0.0019513153174351963, https://leetcode.com/problems/remove-duplicates-from-sorted-array
210,Course Schedule II,40.7%,Medium,0.0019086707135282834, https://leetcode.com/problems/course-schedule-ii
3,Longest Substring Without Repeating Characters,30.4%,Medium,0.0015556336509412823, https://leetcode.com/problems/longest-substring-without-repeating-characters
151,Reverse Words in a String,21.9%,Medium,0.0015375156780384337, https://leetcode.com/problems/reverse-words-in-a-string
50,Pow(x;n),30.3%,Medium,0.0014016892647828818, https://leetcode.com/problems/powx-n
1 352 ID Data Stream as Disjoint Intervals Title 47.3% Acceptance Hard Difficulty 0.26671077361397416 Frequency https://leetcode.com/problems/data-stream-as-disjoint-intervals Leetcode Question Link
2 362 352 Design Hit Counter Data Stream as Disjoint Intervals 63.7% 47.3% Medium Hard 0.20812125379246896 0.26671077361397416 https://leetcode.com/problems/design-hit-counter https://leetcode.com/problems/data-stream-as-disjoint-intervals
3 1242 362 Web Crawler Multithreaded Design Hit Counter 45.9% 63.7% Medium Medium 0.14953173397096375 0.20812125379246896 https://leetcode.com/problems/web-crawler-multithreaded https://leetcode.com/problems/design-hit-counter
4 636 1242 Exclusive Time of Functions Web Crawler Multithreaded 51.9% 45.9% Medium Medium 0.12466318981419816 0.14953173397096375 https://leetcode.com/problems/exclusive-time-of-functions https://leetcode.com/problems/web-crawler-multithreaded
5 1236 636 Web Crawler Exclusive Time of Functions 64.3% 51.9% Medium Medium 0.09531017980432487 0.12466318981419816 https://leetcode.com/problems/web-crawler https://leetcode.com/problems/exclusive-time-of-functions
6 227 1236 Basic Calculator II Web Crawler 36.9% 64.3% Medium Medium 0.07508779675444797 0.09531017980432487 https://leetcode.com/problems/basic-calculator-ii https://leetcode.com/problems/web-crawler
7 706 227 Design HashMap Basic Calculator II 61.3% 36.9% Easy Medium 0.0683442674369718 0.07508779675444797 https://leetcode.com/problems/design-hashmap https://leetcode.com/problems/basic-calculator-ii
8 56 706 Merge Intervals Design HashMap 39.3% 61.3% Medium Easy 0.06807635025869622 0.0683442674369718 https://leetcode.com/problems/merge-intervals https://leetcode.com/problems/design-hashmap
9 1044 56 Longest Duplicate Substring Merge Intervals 31.9% 39.3% Hard Medium 0.062325463197828765 0.06807635025869622 https://leetcode.com/problems/longest-duplicate-substring https://leetcode.com/problems/merge-intervals
10 1190 1044 Reverse Substrings Between Each Pair of Parentheses Longest Duplicate Substring 61.5% 31.9% Medium Hard 0.06007812394328337 0.062325463197828765 https://leetcode.com/problems/reverse-substrings-between-each-pair-of-parentheses https://leetcode.com/problems/longest-duplicate-substring
11 355 1190 Design Twitter Reverse Substrings Between Each Pair of Parentheses 30.3% 61.5% Medium Medium 0.05824061998094904 0.06007812394328337 https://leetcode.com/problems/design-twitter https://leetcode.com/problems/reverse-substrings-between-each-pair-of-parentheses
12 146 355 LRU Cache Design Twitter 33.2% 30.3% Medium Medium 0.054946555458745445 0.05824061998094904 https://leetcode.com/problems/lru-cache https://leetcode.com/problems/design-twitter
13 545 146 Boundary of Binary Tree LRU Cache 38.9% 33.2% Medium Medium 0.04158603377810283 0.054946555458745445 https://leetcode.com/problems/boundary-of-binary-tree https://leetcode.com/problems/lru-cache
14 75 545 Sort Colors Boundary of Binary Tree 47.3% 38.9% Medium Medium 0.030801991570373215 0.04158603377810283 https://leetcode.com/problems/sort-colors https://leetcode.com/problems/boundary-of-binary-tree
15 692 75 Top K Frequent Words Sort Colors 51.8% 47.3% Medium Medium 0.029730915184679466 0.030801991570373215 https://leetcode.com/problems/top-k-frequent-words https://leetcode.com/problems/sort-colors
16 456 692 132 Pattern Top K Frequent Words 28.9% 51.8% Medium Medium 0.029306126585499394 0.029730915184679466 https://leetcode.com/problems/132-pattern https://leetcode.com/problems/top-k-frequent-words
17 1305 456 All Elements in Two Binary Search Trees 132 Pattern 76.1% 28.9% Medium Medium 0.026282721799194744 0.029306126585499394 https://leetcode.com/problems/all-elements-in-two-binary-search-trees https://leetcode.com/problems/132-pattern
18 981 1305 Time Based Key-Value Store All Elements in Two Binary Search Trees 53.1% 76.1% Medium Medium 0.02226024024151985 0.026282721799194744 https://leetcode.com/problems/time-based-key-value-store https://leetcode.com/problems/all-elements-in-two-binary-search-trees
19 380 981 Insert Delete GetRandom O(1) Time Based Key-Value Store 47.5% 53.1% Medium Medium 0.021962815449093263 0.02226024024151985 https://leetcode.com/problems/insert-delete-getrandom-o1 https://leetcode.com/problems/time-based-key-value-store
20 341 380 Flatten Nested List Iterator Insert Delete GetRandom O(1) 52.9% 47.5% Medium Medium 0.019980684690483426 0.021962815449093263 https://leetcode.com/problems/flatten-nested-list-iterator https://leetcode.com/problems/insert-delete-getrandom-o1
21 155 341 Min Stack Flatten Nested List Iterator 44.5% 52.9% Easy Medium 0.01886181109797383 0.019980684690483426 https://leetcode.com/problems/min-stack https://leetcode.com/problems/flatten-nested-list-iterator
22 209 155 Minimum Size Subarray Sum Min Stack 38.2% 44.5% Medium Easy 0.018832948333092125 0.01886181109797383 https://leetcode.com/problems/minimum-size-subarray-sum https://leetcode.com/problems/min-stack
23 450 209 Delete Node in a BST Minimum Size Subarray Sum 43.1% 38.2% Medium Medium 0.018536211907915243 0.018832948333092125 https://leetcode.com/problems/delete-node-in-a-bst https://leetcode.com/problems/minimum-size-subarray-sum
24 37 450 Sudoku Solver Delete Node in a BST 43.6% 43.1% Hard Medium 0.01821543989134118 0.018536211907915243 https://leetcode.com/problems/sudoku-solver https://leetcode.com/problems/delete-node-in-a-bst
25 200 37 Number of Islands Sudoku Solver 46.8% 43.6% Medium Hard 0.017925481766054456 0.01821543989134118 https://leetcode.com/problems/number-of-islands https://leetcode.com/problems/sudoku-solver
26 402 200 Remove K Digits Number of Islands 28.4% 46.8% Medium Medium 0.016863806052004816 0.017925481766054456 https://leetcode.com/problems/remove-k-digits https://leetcode.com/problems/number-of-islands
27 71 402 Simplify Path Remove K Digits 32.6% 28.4% Medium Medium 0.016260520871780308 0.016863806052004816 https://leetcode.com/problems/simplify-path https://leetcode.com/problems/remove-k-digits
28 23 71 Merge k Sorted Lists Simplify Path 40.2% 32.6% Hard Medium 0.016108271385328228 0.016260520871780308 https://leetcode.com/problems/merge-k-sorted-lists https://leetcode.com/problems/simplify-path
29 54 23 Spiral Matrix Merge k Sorted Lists 34.1% 40.2% Medium Hard 0.014776167707688753 0.016108271385328228 https://leetcode.com/problems/spiral-matrix https://leetcode.com/problems/merge-k-sorted-lists
30 20 54 Valid Parentheses Spiral Matrix 39.0% 34.1% Easy Medium 0.014292491180025941 0.014776167707688753 https://leetcode.com/problems/valid-parentheses https://leetcode.com/problems/spiral-matrix
31 179 20 Largest Number Valid Parentheses 28.8% 39.0% Medium Easy 0.013865040137171665 0.014292491180025941 https://leetcode.com/problems/largest-number https://leetcode.com/problems/valid-parentheses
32 94 179 Binary Tree Inorder Traversal Largest Number 63.3% 28.8% Medium Medium 0.013353561806134713 0.013865040137171665 https://leetcode.com/problems/binary-tree-inorder-traversal https://leetcode.com/problems/largest-number
33 767 94 Reorganize String Binary Tree Inorder Traversal 48.7% 63.3% Medium Medium 0.01329806830463147 0.013353561806134713 https://leetcode.com/problems/reorganize-string https://leetcode.com/problems/binary-tree-inorder-traversal
34 112 767 Path Sum Reorganize String 41.2% 48.7% Easy Medium 0.012265076074932503 0.01329806830463147 https://leetcode.com/problems/path-sum https://leetcode.com/problems/reorganize-string
35 437 112 Path Sum III Path Sum 47.2% 41.2% Medium Easy 0.012128711446614806 0.012265076074932503 https://leetcode.com/problems/path-sum-iii https://leetcode.com/problems/path-sum
36 88 437 Merge Sorted Array Path Sum III 39.4% 47.2% Easy Medium 0.011986958032982505 0.012128711446614806 https://leetcode.com/problems/merge-sorted-array https://leetcode.com/problems/path-sum-iii
37 986 88 Interval List Intersections Merge Sorted Array 67.3% 39.4% Medium Easy 0.011969023795320735 0.011986958032982505 https://leetcode.com/problems/interval-list-intersections https://leetcode.com/problems/merge-sorted-array
38 205 986 Isomorphic Strings Interval List Intersections 39.8% 67.3% Easy Medium 0.011544139746865315 0.011969023795320735 https://leetcode.com/problems/isomorphic-strings https://leetcode.com/problems/interval-list-intersections
39 207 205 Course Schedule Isomorphic Strings 43.1% 39.8% Medium Easy 0.01113459480911671 0.011544139746865315 https://leetcode.com/problems/course-schedule https://leetcode.com/problems/isomorphic-strings
40 92 207 Reverse Linked List II Course Schedule 38.8% 43.1% Medium Medium 0.010427623162259089 0.01113459480911671 https://leetcode.com/problems/reverse-linked-list-ii https://leetcode.com/problems/course-schedule
41 113 92 Path Sum II Reverse Linked List II 46.7% 38.8% Medium Medium 0.009784813879998279 0.010427623162259089 https://leetcode.com/problems/path-sum-ii https://leetcode.com/problems/reverse-linked-list-ii
42 34 113 Find First and Last Position of Element in Sorted Array Path Sum II 36.2% 46.7% Medium Medium 0.009531951009811851 0.009784813879998279 https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array https://leetcode.com/problems/path-sum-ii
43 206 34 Reverse Linked List Find First and Last Position of Element in Sorted Array 62.5% 36.2% Easy Medium 0.009326794511974934 0.009531951009811851 https://leetcode.com/problems/reverse-linked-list https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array
44 347 206 Top K Frequent Elements Reverse Linked List 61.2% 62.5% Medium Easy 0.009249390740121013 0.009326794511974934 https://leetcode.com/problems/top-k-frequent-elements https://leetcode.com/problems/reverse-linked-list
45 5 347 Longest Palindromic Substring Top K Frequent Elements 29.5% 61.2% Medium Medium 0.009086325220960808 0.009249390740121013 https://leetcode.com/problems/longest-palindromic-substring https://leetcode.com/problems/top-k-frequent-elements
46 21 5 Merge Two Sorted Lists Longest Palindromic Substring 53.5% 29.5% Easy Medium 0.008990339814651234 0.009086325220960808 https://leetcode.com/problems/merge-two-sorted-lists https://leetcode.com/problems/longest-palindromic-substring
47 125 21 Valid Palindrome Merge Two Sorted Lists 36.7% 53.5% Easy Easy 0.008933948641551634 0.008990339814651234 https://leetcode.com/problems/valid-palindrome https://leetcode.com/problems/merge-two-sorted-lists
48 15 125 3Sum Valid Palindrome 26.8% 36.7% Medium Easy 0.00876717944353383 0.008933948641551634 https://leetcode.com/problems/3sum https://leetcode.com/problems/valid-palindrome
49 139 15 Word Break 3Sum 40.1% 26.8% Medium Medium 0.008741314401573542 0.00876717944353383 https://leetcode.com/problems/word-break https://leetcode.com/problems/3sum
50 173 139 Binary Search Tree Iterator Word Break 56.6% 40.1% Medium Medium 0.008489015324911316 0.008741314401573542 https://leetcode.com/problems/binary-search-tree-iterator https://leetcode.com/problems/word-break
51 394 173 Decode String Binary Search Tree Iterator 50.0% 56.6% Medium Medium 0.008166644000272283 0.008489015324911316 https://leetcode.com/problems/decode-string https://leetcode.com/problems/binary-search-tree-iterator
52 438 394 Find All Anagrams in a String Decode String 43.3% 50.0% Medium Medium 0.008126822460497498 0.008166644000272283 https://leetcode.com/problems/find-all-anagrams-in-a-string https://leetcode.com/problems/decode-string
53 253 438 Meeting Rooms II Find All Anagrams in a String 45.7% 43.3% Medium Medium 0.008079219870546493 0.008126822460497498 https://leetcode.com/problems/meeting-rooms-ii https://leetcode.com/problems/find-all-anagrams-in-a-string
54 239 253 Sliding Window Maximum Meeting Rooms II 43.0% 45.7% Hard Medium 0.007898935224534491 0.008079219870546493 https://leetcode.com/problems/sliding-window-maximum https://leetcode.com/problems/meeting-rooms-ii
55 38 239 Count and Say Sliding Window Maximum 44.6% 43.0% Easy Hard 0.007829360800435779 0.007898935224534491 https://leetcode.com/problems/count-and-say https://leetcode.com/problems/sliding-window-maximum
56 101 38 Symmetric Tree Count and Say 46.8% 44.6% Easy Easy 0.007646596306528098 0.007829360800435779 https://leetcode.com/problems/symmetric-tree https://leetcode.com/problems/count-and-say
57 876 101 Middle of the Linked List Symmetric Tree 68.4% 46.8% Easy Easy 0.007624893975696915 0.007646596306528098 https://leetcode.com/problems/middle-of-the-linked-list https://leetcode.com/problems/symmetric-tree
58 415 876 Add Strings Middle of the Linked List 47.5% 68.4% Easy Easy 0.007587289812159497 0.007624893975696915 https://leetcode.com/problems/add-strings https://leetcode.com/problems/middle-of-the-linked-list
59 240 415 Search a 2D Matrix II Add Strings 43.2% 47.5% Medium Easy 0.0075829747244553335 0.007587289812159497 https://leetcode.com/problems/search-a-2d-matrix-ii https://leetcode.com/problems/add-strings
60 10 240 Regular Expression Matching Search a 2D Matrix II 26.8% 43.2% Hard Medium 0.0071865203293987245 0.0075829747244553335 https://leetcode.com/problems/regular-expression-matching https://leetcode.com/problems/search-a-2d-matrix-ii
61 204 10 Count Primes Regular Expression Matching 31.5% 26.8% Easy Hard 0.007072165261362441 0.0071865203293987245 https://leetcode.com/problems/count-primes https://leetcode.com/problems/regular-expression-matching
62 938 204 Range Sum of BST Count Primes 81.3% 31.5% Easy Easy 0.007011422237803984 0.007072165261362441 https://leetcode.com/problems/range-sum-of-bst https://leetcode.com/problems/count-primes
63 114 938 Flatten Binary Tree to Linked List Range Sum of BST 49.3% 81.3% Medium Easy 0.006896579059060353 0.007011422237803984 https://leetcode.com/problems/flatten-binary-tree-to-linked-list https://leetcode.com/problems/range-sum-of-bst
64 230 114 Kth Smallest Element in a BST Flatten Binary Tree to Linked List 60.2% 49.3% Medium Medium 0.0063361529894967236 0.006896579059060353 https://leetcode.com/problems/kth-smallest-element-in-a-bst https://leetcode.com/problems/flatten-binary-tree-to-linked-list
65 138 230 Copy List with Random Pointer Kth Smallest Element in a BST 36.4% 60.2% Medium Medium 0.006191011880825271 0.0063361529894967236 https://leetcode.com/problems/copy-list-with-random-pointer https://leetcode.com/problems/kth-smallest-element-in-a-bst
66 199 138 Binary Tree Right Side View Copy List with Random Pointer 54.1% 36.4% Medium Medium 0.0056826406650506926 0.006191011880825271 https://leetcode.com/problems/binary-tree-right-side-view https://leetcode.com/problems/copy-list-with-random-pointer
67 543 199 Diameter of Binary Tree Binary Tree Right Side View 48.4% 54.1% Easy Medium 0.005305755914149804 0.0056826406650506926 https://leetcode.com/problems/diameter-of-binary-tree https://leetcode.com/problems/binary-tree-right-side-view
68 1 543 Two Sum Diameter of Binary Tree 45.6% 48.4% Easy Easy 0.0051178232035212715 0.005305755914149804 https://leetcode.com/problems/two-sum https://leetcode.com/problems/diameter-of-binary-tree
69 53 1 Maximum Subarray Two Sum 46.5% 45.6% Easy Easy 0.004869349014182134 0.0051178232035212715 https://leetcode.com/problems/maximum-subarray https://leetcode.com/problems/two-sum
70 121 53 Best Time to Buy and Sell Stock Maximum Subarray 50.5% 46.5% Easy Easy 0.0047725193990346675 0.004869349014182134 https://leetcode.com/problems/best-time-to-buy-and-sell-stock https://leetcode.com/problems/maximum-subarray
71 62 121 Unique Paths Best Time to Buy and Sell Stock 54.1% 50.5% Medium Easy 0.004621080312067025 0.0047725193990346675 https://leetcode.com/problems/unique-paths https://leetcode.com/problems/best-time-to-buy-and-sell-stock
72 17 62 Letter Combinations of a Phone Number Unique Paths 46.8% 54.1% Medium Medium 0.0044018999217624675 0.004621080312067025 https://leetcode.com/problems/letter-combinations-of-a-phone-number https://leetcode.com/problems/unique-paths
73 42 17 Trapping Rain Water Letter Combinations of a Phone Number 48.9% 46.8% Hard Medium 0.004350670338744988 0.0044018999217624675 https://leetcode.com/problems/trapping-rain-water https://leetcode.com/problems/letter-combinations-of-a-phone-number
74 242 42 Valid Anagram Trapping Rain Water 56.9% 48.9% Easy Hard 0.004154123743115972 0.004350670338744988 https://leetcode.com/problems/valid-anagram https://leetcode.com/problems/trapping-rain-water
75 28 242 Implement strStr() Valid Anagram 34.5% 56.9% Easy Easy 0.003943222775040032 0.004154123743115972 https://leetcode.com/problems/implement-strstr https://leetcode.com/problems/valid-anagram
76 4 28 Median of Two Sorted Arrays Implement strStr() 29.6% 34.5% Hard Easy 0.003900160950094767 0.003943222775040032 https://leetcode.com/problems/median-of-two-sorted-arrays https://leetcode.com/problems/implement-strstr
77 49 4 Group Anagrams Median of Two Sorted Arrays 56.9% 29.6% Medium Hard 0.0038040939835560453 0.003900160950094767 https://leetcode.com/problems/group-anagrams https://leetcode.com/problems/median-of-two-sorted-arrays
78 8 49 String to Integer (atoi) Group Anagrams 15.4% 56.9% Medium Medium 0.0037925521897059712 0.0038040939835560453 https://leetcode.com/problems/string-to-integer-atoi https://leetcode.com/problems/group-anagrams
79 14 8 Longest Common Prefix String to Integer (atoi) 35.4% 15.4% Easy Medium 0.003320331762984143 0.0037925521897059712 https://leetcode.com/problems/longest-common-prefix https://leetcode.com/problems/string-to-integer-atoi
80 33 14 Search in Rotated Sorted Array Longest Common Prefix 34.5% 35.4% Medium Easy 0.003229976968332634 0.003320331762984143 https://leetcode.com/problems/search-in-rotated-sorted-array https://leetcode.com/problems/longest-common-prefix
81 283 33 Move Zeroes Search in Rotated Sorted Array 57.8% 34.5% Easy Medium 0.0028853803470673955 0.003229976968332634 https://leetcode.com/problems/move-zeroes https://leetcode.com/problems/search-in-rotated-sorted-array
82 26 283 Remove Duplicates from Sorted Array Move Zeroes 45.1% 57.8% Easy Easy 0.0019513153174351963 0.0028853803470673955 https://leetcode.com/problems/remove-duplicates-from-sorted-array https://leetcode.com/problems/move-zeroes
83 210 26 Course Schedule II Remove Duplicates from Sorted Array 40.7% 45.1% Medium Easy 0.0019086707135282834 0.0019513153174351963 https://leetcode.com/problems/course-schedule-ii https://leetcode.com/problems/remove-duplicates-from-sorted-array
84 3 210 Longest Substring Without Repeating Characters Course Schedule II 30.4% 40.7% Medium Medium 0.0015556336509412823 0.0019086707135282834 https://leetcode.com/problems/longest-substring-without-repeating-characters https://leetcode.com/problems/course-schedule-ii
85 151 3 Reverse Words in a String Longest Substring Without Repeating Characters 21.9% 30.4% Medium Medium 0.0015375156780384337 0.0015556336509412823 https://leetcode.com/problems/reverse-words-in-a-string https://leetcode.com/problems/longest-substring-without-repeating-characters
86 50 151 Pow(x;n) Reverse Words in a String 30.3% 21.9% Medium Medium 0.0014016892647828818 0.0015375156780384337 https://leetcode.com/problems/powx-n https://leetcode.com/problems/reverse-words-in-a-string
87 50 Pow(x;n) 30.3% Medium 0.0014016892647828818 https://leetcode.com/problems/powx-n