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,82 +1,83 @@
433,Minimum Genetic Mutation,41.8%,Medium,3.6380005958321364, https://leetcode.com/problems/minimum-genetic-mutation
635,Design Log Storage System,58.6%,Medium,2.6952344479401242, https://leetcode.com/problems/design-log-storage-system
780,Reaching Points,29.4%,Hard,1.752468300048112, https://leetcode.com/problems/reaching-points
341,Flatten Nested List Iterator,52.9%,Medium,1.7121511329488845, https://leetcode.com/problems/flatten-nested-list-iterator
256,Paint House,52.1%,Easy,1.6915174692517947, https://leetcode.com/problems/paint-house
296,Best Meeting Point,57.5%,Hard,1.6625988978022896, https://leetcode.com/problems/best-meeting-point
57,Insert Interval,33.5%,Hard,1.2776821685359496, https://leetcode.com/problems/insert-interval
608,Tree Node,67.1%,Medium,1.204906947317733, https://leetcode.com/problems/tree-node
355,Design Twitter,30.3%,Medium,1.1502303678885653, https://leetcode.com/problems/design-twitter
269,Alien Dictionary,33.3%,Hard,1.099252698552309, https://leetcode.com/problems/alien-dictionary
468,Validate IP Address,24.1%,Medium,1.0898016589859547, https://leetcode.com/problems/validate-ip-address
585,Investments in 2016,54.7%,Medium,0.9249487946172696, https://leetcode.com/problems/investments-in-2016
647,Palindromic Substrings,60.6%,Medium,0.7666949181474819, https://leetcode.com/problems/palindromic-substrings
679,24 Game,46.4%,Hard,0.7472144018302211, https://leetcode.com/problems/24-game
20,Valid Parentheses,39.0%,Easy,0.6769810494443036, https://leetcode.com/problems/valid-parentheses
831,Masking Personal Information,44.1%,Medium,0.5705448584676129, https://leetcode.com/problems/masking-personal-information
920,Number of Music Playlists,46.5%,Hard,0.5596157879354227, https://leetcode.com/problems/number-of-music-playlists
547,Friend Circles,58.6%,Medium,0.5259672525715527, https://leetcode.com/problems/friend-circles
580,Count Student Number in Departments,48.7%,Medium,0.487438691067837, https://leetcode.com/problems/count-student-number-in-departments
146,LRU Cache,33.2%,Medium,0.37918622364432397, https://leetcode.com/problems/lru-cache
161,One Edit Distance,32.3%,Medium,0.3732496560572872, https://leetcode.com/problems/one-edit-distance
68,Text Justification,27.7%,Hard,0.37052394220493184, https://leetcode.com/problems/text-justification
56,Merge Intervals,39.3%,Medium,0.3513205757185784, https://leetcode.com/problems/merge-intervals
295,Find Median from Data Stream,44.3%,Hard,0.32347449067924283, https://leetcode.com/problems/find-median-from-data-stream
307,Range Sum Query - Mutable,34.6%,Medium,0.30730282294419214, https://leetcode.com/problems/range-sum-query-mutable
42,Trapping Rain Water,48.9%,Hard,0.30245147181648074, https://leetcode.com/problems/trapping-rain-water
1326,Minimum Number of Taps to Open to Water a Garden,43.6%,Hard,0.2786048543006643, https://leetcode.com/problems/minimum-number-of-taps-to-open-to-water-a-garden
218,The Skyline Problem,34.6%,Hard,0.27469487692496974, https://leetcode.com/problems/the-skyline-problem
945,Minimum Increment to Make Array Unique,46.3%,Medium,0.27427904232444056, https://leetcode.com/problems/minimum-increment-to-make-array-unique
149,Max Points on a Line,16.9%,Hard,0.2686338774810864, https://leetcode.com/problems/max-points-on-a-line
10,Regular Expression Matching,26.8%,Hard,0.2659916203394624, https://leetcode.com/problems/regular-expression-matching
1348,Tweet Counts Per Frequency,29.0%,Medium,0.25131442828090605, https://leetcode.com/problems/tweet-counts-per-frequency
251,Flatten 2D Vector,45.7%,Medium,0.2425088583672668, https://leetcode.com/problems/flatten-2d-vector
200,Number of Islands,46.8%,Medium,0.21059224281730043, https://leetcode.com/problems/number-of-islands
532,K-diff Pairs in an Array,31.6%,Easy,0.20837786270708894, https://leetcode.com/problems/k-diff-pairs-in-an-array
139,Word Break,40.1%,Medium,0.19843337930716162, https://leetcode.com/problems/word-break
706,Design HashMap,61.3%,Easy,0.1960785423771685, https://leetcode.com/problems/design-hashmap
133,Clone Graph,34.8%,Medium,0.1530997075812833, https://leetcode.com/problems/clone-graph
380,Insert Delete GetRandom O(1),47.5%,Medium,0.1466146891661091, https://leetcode.com/problems/insert-delete-getrandom-o1
528,Random Pick with Weight,43.9%,Medium,0.12617342152539626, https://leetcode.com/problems/random-pick-with-weight
84,Largest Rectangle in Histogram,35.2%,Hard,0.12570469475928556, https://leetcode.com/problems/largest-rectangle-in-histogram
586,Customer Placing the Largest Number of Orders,73.0%,Easy,0.12361395596717664, https://leetcode.com/problems/customer-placing-the-largest-number-of-orders
208,Implement Trie (Prefix Tree),49.4%,Medium,0.1062062589908652, https://leetcode.com/problems/implement-trie-prefix-tree
12,Integer to Roman,55.1%,Medium,0.09981819303484349, https://leetcode.com/problems/integer-to-roman
91,Decode Ways,24.7%,Medium,0.09146617076347968, https://leetcode.com/problems/decode-ways
60,Permutation Sequence,38.4%,Hard,0.07948571541724253, https://leetcode.com/problems/permutation-sequence
43,Multiply Strings,33.9%,Medium,0.07944184170158367, https://leetcode.com/problems/multiply-strings
23,Merge k Sorted Lists,40.2%,Hard,0.07900382769570498, https://leetcode.com/problems/merge-k-sorted-lists
271,Encode and Decode Strings,31.5%,Medium,0.07197349962508924, https://leetcode.com/problems/encode-and-decode-strings
346,Moving Average from Data Stream,70.9%,Easy,0.06887402901251127, https://leetcode.com/problems/moving-average-from-data-stream
1,Two Sum,45.6%,Easy,0.06437944929577392, https://leetcode.com/problems/two-sum
202,Happy Number,50.4%,Easy,0.05503451923624455, https://leetcode.com/problems/happy-number
767,Reorganize String,48.7%,Medium,0.05216306328458592, https://leetcode.com/problems/reorganize-string
981,Time Based Key-Value Store,53.1%,Medium,0.049406315387071284, https://leetcode.com/problems/time-based-key-value-store
1041,Robot Bounded In Circle,49.6%,Medium,0.0483770263821056, https://leetcode.com/problems/robot-bounded-in-circle
239,Sliding Window Maximum,43.0%,Hard,0.0483746857022364, https://leetcode.com/problems/sliding-window-maximum
490,The Maze,51.4%,Medium,0.04287902305923364, https://leetcode.com/problems/the-maze
540,Single Element in a Sorted Array,57.9%,Medium,0.042721256704769804, https://leetcode.com/problems/single-element-in-a-sorted-array
716,Max Stack,42.6%,Easy,0.042695919196489414, https://leetcode.com/problems/max-stack
235,Lowest Common Ancestor of a Binary Search Tree,49.9%,Easy,0.032470385030784074, https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree
814,Binary Tree Pruning,74.5%,Medium,0.03113091859517317, https://leetcode.com/problems/binary-tree-pruning
44,Wildcard Matching,24.7%,Hard,0.030573033362282363, https://leetcode.com/problems/wildcard-matching
496,Next Greater Element I,63.8%,Easy,0.029462032730316202, https://leetcode.com/problems/next-greater-element-i
36,Valid Sudoku,48.7%,Medium,0.028722132350970705, https://leetcode.com/problems/valid-sudoku
482,License Key Formatting,43.1%,Easy,0.024799783060416587, https://leetcode.com/problems/license-key-formatting
124,Binary Tree Maximum Path Sum,34.3%,Hard,0.021945744272529284, https://leetcode.com/problems/binary-tree-maximum-path-sum
140,Word Break II,32.6%,Hard,0.016800341389107805, https://leetcode.com/problems/word-break-ii
118,Pascal's Triangle,52.5%,Easy,0.015123796918620345, https://leetcode.com/problems/pascals-triangle
206,Reverse Linked List,62.5%,Easy,0.01453513961911317, https://leetcode.com/problems/reverse-linked-list
76,Minimum Window Substring,34.6%,Hard,0.013966707481708198, https://leetcode.com/problems/minimum-window-substring
105,Construct Binary Tree from Preorder and Inorder Traversal,48.8%,Medium,0.01261934861981589, https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal
210,Course Schedule II,40.7%,Medium,0.011869857339029215, https://leetcode.com/problems/course-schedule-ii
169,Majority Element,58.7%,Easy,0.010558521365115802, https://leetcode.com/problems/majority-element
101,Symmetric Tree,46.8%,Easy,0.007646596306528098, https://leetcode.com/problems/symmetric-tree
106,Construct Binary Tree from Inorder and Postorder Traversal,47.2%,Medium,0.00234041415121758, https://leetcode.com/problems/construct-binary-tree-from-inorder-and-postorder-traversal
323,Number of Connected Components in an Undirected Graph,56.0%,Medium,0, https://leetcode.com/problems/number-of-connected-components-in-an-undirected-graph
378,Kth Smallest Element in a Sorted Matrix,54.3%,Medium,0, https://leetcode.com/problems/kth-smallest-element-in-a-sorted-matrix
407,Trapping Rain Water II,42.4%,Hard,0, https://leetcode.com/problems/trapping-rain-water-ii
868,Binary Gap,60.6%,Easy,0, https://leetcode.com/problems/binary-gap
1206,Design Skiplist,57.3%,Hard,0, https://leetcode.com/problems/design-skiplist
1347,Minimum Number of Steps to Make Two Strings Anagram,74.7%,Medium,0, https://leetcode.com/problems/minimum-number-of-steps-to-make-two-strings-anagram
1459,Rectangles Area,61.5%,Medium,0, https://leetcode.com/problems/rectangles-area
ID,Title,Acceptance,Difficulty,Frequency,Leetcode Question Link
433,Minimum Genetic Mutation,41.8%,Medium,3.6380005958321364, https://leetcode.com/problems/minimum-genetic-mutation
635,Design Log Storage System,58.6%,Medium,2.6952344479401242, https://leetcode.com/problems/design-log-storage-system
780,Reaching Points,29.4%,Hard,1.752468300048112, https://leetcode.com/problems/reaching-points
341,Flatten Nested List Iterator,52.9%,Medium,1.7121511329488845, https://leetcode.com/problems/flatten-nested-list-iterator
256,Paint House,52.1%,Easy,1.6915174692517947, https://leetcode.com/problems/paint-house
296,Best Meeting Point,57.5%,Hard,1.6625988978022896, https://leetcode.com/problems/best-meeting-point
57,Insert Interval,33.5%,Hard,1.2776821685359496, https://leetcode.com/problems/insert-interval
608,Tree Node,67.1%,Medium,1.204906947317733, https://leetcode.com/problems/tree-node
355,Design Twitter,30.3%,Medium,1.1502303678885653, https://leetcode.com/problems/design-twitter
269,Alien Dictionary,33.3%,Hard,1.099252698552309, https://leetcode.com/problems/alien-dictionary
468,Validate IP Address,24.1%,Medium,1.0898016589859547, https://leetcode.com/problems/validate-ip-address
585,Investments in 2016,54.7%,Medium,0.9249487946172696, https://leetcode.com/problems/investments-in-2016
647,Palindromic Substrings,60.6%,Medium,0.7666949181474819, https://leetcode.com/problems/palindromic-substrings
679,24 Game,46.4%,Hard,0.7472144018302211, https://leetcode.com/problems/24-game
20,Valid Parentheses,39.0%,Easy,0.6769810494443036, https://leetcode.com/problems/valid-parentheses
831,Masking Personal Information,44.1%,Medium,0.5705448584676129, https://leetcode.com/problems/masking-personal-information
920,Number of Music Playlists,46.5%,Hard,0.5596157879354227, https://leetcode.com/problems/number-of-music-playlists
547,Friend Circles,58.6%,Medium,0.5259672525715527, https://leetcode.com/problems/friend-circles
580,Count Student Number in Departments,48.7%,Medium,0.487438691067837, https://leetcode.com/problems/count-student-number-in-departments
146,LRU Cache,33.2%,Medium,0.37918622364432397, https://leetcode.com/problems/lru-cache
161,One Edit Distance,32.3%,Medium,0.3732496560572872, https://leetcode.com/problems/one-edit-distance
68,Text Justification,27.7%,Hard,0.37052394220493184, https://leetcode.com/problems/text-justification
56,Merge Intervals,39.3%,Medium,0.3513205757185784, https://leetcode.com/problems/merge-intervals
295,Find Median from Data Stream,44.3%,Hard,0.32347449067924283, https://leetcode.com/problems/find-median-from-data-stream
307,Range Sum Query - Mutable,34.6%,Medium,0.30730282294419214, https://leetcode.com/problems/range-sum-query-mutable
42,Trapping Rain Water,48.9%,Hard,0.30245147181648074, https://leetcode.com/problems/trapping-rain-water
1326,Minimum Number of Taps to Open to Water a Garden,43.6%,Hard,0.2786048543006643, https://leetcode.com/problems/minimum-number-of-taps-to-open-to-water-a-garden
218,The Skyline Problem,34.6%,Hard,0.27469487692496974, https://leetcode.com/problems/the-skyline-problem
945,Minimum Increment to Make Array Unique,46.3%,Medium,0.27427904232444056, https://leetcode.com/problems/minimum-increment-to-make-array-unique
149,Max Points on a Line,16.9%,Hard,0.2686338774810864, https://leetcode.com/problems/max-points-on-a-line
10,Regular Expression Matching,26.8%,Hard,0.2659916203394624, https://leetcode.com/problems/regular-expression-matching
1348,Tweet Counts Per Frequency,29.0%,Medium,0.25131442828090605, https://leetcode.com/problems/tweet-counts-per-frequency
251,Flatten 2D Vector,45.7%,Medium,0.2425088583672668, https://leetcode.com/problems/flatten-2d-vector
200,Number of Islands,46.8%,Medium,0.21059224281730043, https://leetcode.com/problems/number-of-islands
532,K-diff Pairs in an Array,31.6%,Easy,0.20837786270708894, https://leetcode.com/problems/k-diff-pairs-in-an-array
139,Word Break,40.1%,Medium,0.19843337930716162, https://leetcode.com/problems/word-break
706,Design HashMap,61.3%,Easy,0.1960785423771685, https://leetcode.com/problems/design-hashmap
133,Clone Graph,34.8%,Medium,0.1530997075812833, https://leetcode.com/problems/clone-graph
380,Insert Delete GetRandom O(1),47.5%,Medium,0.1466146891661091, https://leetcode.com/problems/insert-delete-getrandom-o1
528,Random Pick with Weight,43.9%,Medium,0.12617342152539626, https://leetcode.com/problems/random-pick-with-weight
84,Largest Rectangle in Histogram,35.2%,Hard,0.12570469475928556, https://leetcode.com/problems/largest-rectangle-in-histogram
586,Customer Placing the Largest Number of Orders,73.0%,Easy,0.12361395596717664, https://leetcode.com/problems/customer-placing-the-largest-number-of-orders
208,Implement Trie (Prefix Tree),49.4%,Medium,0.1062062589908652, https://leetcode.com/problems/implement-trie-prefix-tree
12,Integer to Roman,55.1%,Medium,0.09981819303484349, https://leetcode.com/problems/integer-to-roman
91,Decode Ways,24.7%,Medium,0.09146617076347968, https://leetcode.com/problems/decode-ways
60,Permutation Sequence,38.4%,Hard,0.07948571541724253, https://leetcode.com/problems/permutation-sequence
43,Multiply Strings,33.9%,Medium,0.07944184170158367, https://leetcode.com/problems/multiply-strings
23,Merge k Sorted Lists,40.2%,Hard,0.07900382769570498, https://leetcode.com/problems/merge-k-sorted-lists
271,Encode and Decode Strings,31.5%,Medium,0.07197349962508924, https://leetcode.com/problems/encode-and-decode-strings
346,Moving Average from Data Stream,70.9%,Easy,0.06887402901251127, https://leetcode.com/problems/moving-average-from-data-stream
1,Two Sum,45.6%,Easy,0.06437944929577392, https://leetcode.com/problems/two-sum
202,Happy Number,50.4%,Easy,0.05503451923624455, https://leetcode.com/problems/happy-number
767,Reorganize String,48.7%,Medium,0.05216306328458592, https://leetcode.com/problems/reorganize-string
981,Time Based Key-Value Store,53.1%,Medium,0.049406315387071284, https://leetcode.com/problems/time-based-key-value-store
1041,Robot Bounded In Circle,49.6%,Medium,0.0483770263821056, https://leetcode.com/problems/robot-bounded-in-circle
239,Sliding Window Maximum,43.0%,Hard,0.0483746857022364, https://leetcode.com/problems/sliding-window-maximum
490,The Maze,51.4%,Medium,0.04287902305923364, https://leetcode.com/problems/the-maze
540,Single Element in a Sorted Array,57.9%,Medium,0.042721256704769804, https://leetcode.com/problems/single-element-in-a-sorted-array
716,Max Stack,42.6%,Easy,0.042695919196489414, https://leetcode.com/problems/max-stack
235,Lowest Common Ancestor of a Binary Search Tree,49.9%,Easy,0.032470385030784074, https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree
814,Binary Tree Pruning,74.5%,Medium,0.03113091859517317, https://leetcode.com/problems/binary-tree-pruning
44,Wildcard Matching,24.7%,Hard,0.030573033362282363, https://leetcode.com/problems/wildcard-matching
496,Next Greater Element I,63.8%,Easy,0.029462032730316202, https://leetcode.com/problems/next-greater-element-i
36,Valid Sudoku,48.7%,Medium,0.028722132350970705, https://leetcode.com/problems/valid-sudoku
482,License Key Formatting,43.1%,Easy,0.024799783060416587, https://leetcode.com/problems/license-key-formatting
124,Binary Tree Maximum Path Sum,34.3%,Hard,0.021945744272529284, https://leetcode.com/problems/binary-tree-maximum-path-sum
140,Word Break II,32.6%,Hard,0.016800341389107805, https://leetcode.com/problems/word-break-ii
118,Pascal's Triangle,52.5%,Easy,0.015123796918620345, https://leetcode.com/problems/pascals-triangle
206,Reverse Linked List,62.5%,Easy,0.01453513961911317, https://leetcode.com/problems/reverse-linked-list
76,Minimum Window Substring,34.6%,Hard,0.013966707481708198, https://leetcode.com/problems/minimum-window-substring
105,Construct Binary Tree from Preorder and Inorder Traversal,48.8%,Medium,0.01261934861981589, https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal
210,Course Schedule II,40.7%,Medium,0.011869857339029215, https://leetcode.com/problems/course-schedule-ii
169,Majority Element,58.7%,Easy,0.010558521365115802, https://leetcode.com/problems/majority-element
101,Symmetric Tree,46.8%,Easy,0.007646596306528098, https://leetcode.com/problems/symmetric-tree
106,Construct Binary Tree from Inorder and Postorder Traversal,47.2%,Medium,0.00234041415121758, https://leetcode.com/problems/construct-binary-tree-from-inorder-and-postorder-traversal
323,Number of Connected Components in an Undirected Graph,56.0%,Medium,0, https://leetcode.com/problems/number-of-connected-components-in-an-undirected-graph
378,Kth Smallest Element in a Sorted Matrix,54.3%,Medium,0, https://leetcode.com/problems/kth-smallest-element-in-a-sorted-matrix
407,Trapping Rain Water II,42.4%,Hard,0, https://leetcode.com/problems/trapping-rain-water-ii
868,Binary Gap,60.6%,Easy,0, https://leetcode.com/problems/binary-gap
1206,Design Skiplist,57.3%,Hard,0, https://leetcode.com/problems/design-skiplist
1347,Minimum Number of Steps to Make Two Strings Anagram,74.7%,Medium,0, https://leetcode.com/problems/minimum-number-of-steps-to-make-two-strings-anagram
1459,Rectangles Area,61.5%,Medium,0, https://leetcode.com/problems/rectangles-area
1 433 ID Minimum Genetic Mutation Title 41.8% Acceptance Medium Difficulty 3.6380005958321364 Frequency https://leetcode.com/problems/minimum-genetic-mutation Leetcode Question Link
2 635 433 Design Log Storage System Minimum Genetic Mutation 58.6% 41.8% Medium Medium 2.6952344479401242 3.6380005958321364 https://leetcode.com/problems/design-log-storage-system https://leetcode.com/problems/minimum-genetic-mutation
3 780 635 Reaching Points Design Log Storage System 29.4% 58.6% Hard Medium 1.752468300048112 2.6952344479401242 https://leetcode.com/problems/reaching-points https://leetcode.com/problems/design-log-storage-system
4 341 780 Flatten Nested List Iterator Reaching Points 52.9% 29.4% Medium Hard 1.7121511329488845 1.752468300048112 https://leetcode.com/problems/flatten-nested-list-iterator https://leetcode.com/problems/reaching-points
5 256 341 Paint House Flatten Nested List Iterator 52.1% 52.9% Easy Medium 1.6915174692517947 1.7121511329488845 https://leetcode.com/problems/paint-house https://leetcode.com/problems/flatten-nested-list-iterator
6 296 256 Best Meeting Point Paint House 57.5% 52.1% Hard Easy 1.6625988978022896 1.6915174692517947 https://leetcode.com/problems/best-meeting-point https://leetcode.com/problems/paint-house
7 57 296 Insert Interval Best Meeting Point 33.5% 57.5% Hard Hard 1.2776821685359496 1.6625988978022896 https://leetcode.com/problems/insert-interval https://leetcode.com/problems/best-meeting-point
8 608 57 Tree Node Insert Interval 67.1% 33.5% Medium Hard 1.204906947317733 1.2776821685359496 https://leetcode.com/problems/tree-node https://leetcode.com/problems/insert-interval
9 355 608 Design Twitter Tree Node 30.3% 67.1% Medium Medium 1.1502303678885653 1.204906947317733 https://leetcode.com/problems/design-twitter https://leetcode.com/problems/tree-node
10 269 355 Alien Dictionary Design Twitter 33.3% 30.3% Hard Medium 1.099252698552309 1.1502303678885653 https://leetcode.com/problems/alien-dictionary https://leetcode.com/problems/design-twitter
11 468 269 Validate IP Address Alien Dictionary 24.1% 33.3% Medium Hard 1.0898016589859547 1.099252698552309 https://leetcode.com/problems/validate-ip-address https://leetcode.com/problems/alien-dictionary
12 585 468 Investments in 2016 Validate IP Address 54.7% 24.1% Medium Medium 0.9249487946172696 1.0898016589859547 https://leetcode.com/problems/investments-in-2016 https://leetcode.com/problems/validate-ip-address
13 647 585 Palindromic Substrings Investments in 2016 60.6% 54.7% Medium Medium 0.7666949181474819 0.9249487946172696 https://leetcode.com/problems/palindromic-substrings https://leetcode.com/problems/investments-in-2016
14 679 647 24 Game Palindromic Substrings 46.4% 60.6% Hard Medium 0.7472144018302211 0.7666949181474819 https://leetcode.com/problems/24-game https://leetcode.com/problems/palindromic-substrings
15 20 679 Valid Parentheses 24 Game 39.0% 46.4% Easy Hard 0.6769810494443036 0.7472144018302211 https://leetcode.com/problems/valid-parentheses https://leetcode.com/problems/24-game
16 831 20 Masking Personal Information Valid Parentheses 44.1% 39.0% Medium Easy 0.5705448584676129 0.6769810494443036 https://leetcode.com/problems/masking-personal-information https://leetcode.com/problems/valid-parentheses
17 920 831 Number of Music Playlists Masking Personal Information 46.5% 44.1% Hard Medium 0.5596157879354227 0.5705448584676129 https://leetcode.com/problems/number-of-music-playlists https://leetcode.com/problems/masking-personal-information
18 547 920 Friend Circles Number of Music Playlists 58.6% 46.5% Medium Hard 0.5259672525715527 0.5596157879354227 https://leetcode.com/problems/friend-circles https://leetcode.com/problems/number-of-music-playlists
19 580 547 Count Student Number in Departments Friend Circles 48.7% 58.6% Medium Medium 0.487438691067837 0.5259672525715527 https://leetcode.com/problems/count-student-number-in-departments https://leetcode.com/problems/friend-circles
20 146 580 LRU Cache Count Student Number in Departments 33.2% 48.7% Medium Medium 0.37918622364432397 0.487438691067837 https://leetcode.com/problems/lru-cache https://leetcode.com/problems/count-student-number-in-departments
21 161 146 One Edit Distance LRU Cache 32.3% 33.2% Medium Medium 0.3732496560572872 0.37918622364432397 https://leetcode.com/problems/one-edit-distance https://leetcode.com/problems/lru-cache
22 68 161 Text Justification One Edit Distance 27.7% 32.3% Hard Medium 0.37052394220493184 0.3732496560572872 https://leetcode.com/problems/text-justification https://leetcode.com/problems/one-edit-distance
23 56 68 Merge Intervals Text Justification 39.3% 27.7% Medium Hard 0.3513205757185784 0.37052394220493184 https://leetcode.com/problems/merge-intervals https://leetcode.com/problems/text-justification
24 295 56 Find Median from Data Stream Merge Intervals 44.3% 39.3% Hard Medium 0.32347449067924283 0.3513205757185784 https://leetcode.com/problems/find-median-from-data-stream https://leetcode.com/problems/merge-intervals
25 307 295 Range Sum Query - Mutable Find Median from Data Stream 34.6% 44.3% Medium Hard 0.30730282294419214 0.32347449067924283 https://leetcode.com/problems/range-sum-query-mutable https://leetcode.com/problems/find-median-from-data-stream
26 42 307 Trapping Rain Water Range Sum Query - Mutable 48.9% 34.6% Hard Medium 0.30245147181648074 0.30730282294419214 https://leetcode.com/problems/trapping-rain-water https://leetcode.com/problems/range-sum-query-mutable
27 1326 42 Minimum Number of Taps to Open to Water a Garden Trapping Rain Water 43.6% 48.9% Hard Hard 0.2786048543006643 0.30245147181648074 https://leetcode.com/problems/minimum-number-of-taps-to-open-to-water-a-garden https://leetcode.com/problems/trapping-rain-water
28 218 1326 The Skyline Problem Minimum Number of Taps to Open to Water a Garden 34.6% 43.6% Hard Hard 0.27469487692496974 0.2786048543006643 https://leetcode.com/problems/the-skyline-problem https://leetcode.com/problems/minimum-number-of-taps-to-open-to-water-a-garden
29 945 218 Minimum Increment to Make Array Unique The Skyline Problem 46.3% 34.6% Medium Hard 0.27427904232444056 0.27469487692496974 https://leetcode.com/problems/minimum-increment-to-make-array-unique https://leetcode.com/problems/the-skyline-problem
30 149 945 Max Points on a Line Minimum Increment to Make Array Unique 16.9% 46.3% Hard Medium 0.2686338774810864 0.27427904232444056 https://leetcode.com/problems/max-points-on-a-line https://leetcode.com/problems/minimum-increment-to-make-array-unique
31 10 149 Regular Expression Matching Max Points on a Line 26.8% 16.9% Hard Hard 0.2659916203394624 0.2686338774810864 https://leetcode.com/problems/regular-expression-matching https://leetcode.com/problems/max-points-on-a-line
32 1348 10 Tweet Counts Per Frequency Regular Expression Matching 29.0% 26.8% Medium Hard 0.25131442828090605 0.2659916203394624 https://leetcode.com/problems/tweet-counts-per-frequency https://leetcode.com/problems/regular-expression-matching
33 251 1348 Flatten 2D Vector Tweet Counts Per Frequency 45.7% 29.0% Medium Medium 0.2425088583672668 0.25131442828090605 https://leetcode.com/problems/flatten-2d-vector https://leetcode.com/problems/tweet-counts-per-frequency
34 200 251 Number of Islands Flatten 2D Vector 46.8% 45.7% Medium Medium 0.21059224281730043 0.2425088583672668 https://leetcode.com/problems/number-of-islands https://leetcode.com/problems/flatten-2d-vector
35 532 200 K-diff Pairs in an Array Number of Islands 31.6% 46.8% Easy Medium 0.20837786270708894 0.21059224281730043 https://leetcode.com/problems/k-diff-pairs-in-an-array https://leetcode.com/problems/number-of-islands
36 139 532 Word Break K-diff Pairs in an Array 40.1% 31.6% Medium Easy 0.19843337930716162 0.20837786270708894 https://leetcode.com/problems/word-break https://leetcode.com/problems/k-diff-pairs-in-an-array
37 706 139 Design HashMap Word Break 61.3% 40.1% Easy Medium 0.1960785423771685 0.19843337930716162 https://leetcode.com/problems/design-hashmap https://leetcode.com/problems/word-break
38 133 706 Clone Graph Design HashMap 34.8% 61.3% Medium Easy 0.1530997075812833 0.1960785423771685 https://leetcode.com/problems/clone-graph https://leetcode.com/problems/design-hashmap
39 380 133 Insert Delete GetRandom O(1) Clone Graph 47.5% 34.8% Medium Medium 0.1466146891661091 0.1530997075812833 https://leetcode.com/problems/insert-delete-getrandom-o1 https://leetcode.com/problems/clone-graph
40 528 380 Random Pick with Weight Insert Delete GetRandom O(1) 43.9% 47.5% Medium Medium 0.12617342152539626 0.1466146891661091 https://leetcode.com/problems/random-pick-with-weight https://leetcode.com/problems/insert-delete-getrandom-o1
41 84 528 Largest Rectangle in Histogram Random Pick with Weight 35.2% 43.9% Hard Medium 0.12570469475928556 0.12617342152539626 https://leetcode.com/problems/largest-rectangle-in-histogram https://leetcode.com/problems/random-pick-with-weight
42 586 84 Customer Placing the Largest Number of Orders Largest Rectangle in Histogram 73.0% 35.2% Easy Hard 0.12361395596717664 0.12570469475928556 https://leetcode.com/problems/customer-placing-the-largest-number-of-orders https://leetcode.com/problems/largest-rectangle-in-histogram
43 208 586 Implement Trie (Prefix Tree) Customer Placing the Largest Number of Orders 49.4% 73.0% Medium Easy 0.1062062589908652 0.12361395596717664 https://leetcode.com/problems/implement-trie-prefix-tree https://leetcode.com/problems/customer-placing-the-largest-number-of-orders
44 12 208 Integer to Roman Implement Trie (Prefix Tree) 55.1% 49.4% Medium Medium 0.09981819303484349 0.1062062589908652 https://leetcode.com/problems/integer-to-roman https://leetcode.com/problems/implement-trie-prefix-tree
45 91 12 Decode Ways Integer to Roman 24.7% 55.1% Medium Medium 0.09146617076347968 0.09981819303484349 https://leetcode.com/problems/decode-ways https://leetcode.com/problems/integer-to-roman
46 60 91 Permutation Sequence Decode Ways 38.4% 24.7% Hard Medium 0.07948571541724253 0.09146617076347968 https://leetcode.com/problems/permutation-sequence https://leetcode.com/problems/decode-ways
47 43 60 Multiply Strings Permutation Sequence 33.9% 38.4% Medium Hard 0.07944184170158367 0.07948571541724253 https://leetcode.com/problems/multiply-strings https://leetcode.com/problems/permutation-sequence
48 23 43 Merge k Sorted Lists Multiply Strings 40.2% 33.9% Hard Medium 0.07900382769570498 0.07944184170158367 https://leetcode.com/problems/merge-k-sorted-lists https://leetcode.com/problems/multiply-strings
49 271 23 Encode and Decode Strings Merge k Sorted Lists 31.5% 40.2% Medium Hard 0.07197349962508924 0.07900382769570498 https://leetcode.com/problems/encode-and-decode-strings https://leetcode.com/problems/merge-k-sorted-lists
50 346 271 Moving Average from Data Stream Encode and Decode Strings 70.9% 31.5% Easy Medium 0.06887402901251127 0.07197349962508924 https://leetcode.com/problems/moving-average-from-data-stream https://leetcode.com/problems/encode-and-decode-strings
51 1 346 Two Sum Moving Average from Data Stream 45.6% 70.9% Easy Easy 0.06437944929577392 0.06887402901251127 https://leetcode.com/problems/two-sum https://leetcode.com/problems/moving-average-from-data-stream
52 202 1 Happy Number Two Sum 50.4% 45.6% Easy Easy 0.05503451923624455 0.06437944929577392 https://leetcode.com/problems/happy-number https://leetcode.com/problems/two-sum
53 767 202 Reorganize String Happy Number 48.7% 50.4% Medium Easy 0.05216306328458592 0.05503451923624455 https://leetcode.com/problems/reorganize-string https://leetcode.com/problems/happy-number
54 981 767 Time Based Key-Value Store Reorganize String 53.1% 48.7% Medium Medium 0.049406315387071284 0.05216306328458592 https://leetcode.com/problems/time-based-key-value-store https://leetcode.com/problems/reorganize-string
55 1041 981 Robot Bounded In Circle Time Based Key-Value Store 49.6% 53.1% Medium Medium 0.0483770263821056 0.049406315387071284 https://leetcode.com/problems/robot-bounded-in-circle https://leetcode.com/problems/time-based-key-value-store
56 239 1041 Sliding Window Maximum Robot Bounded In Circle 43.0% 49.6% Hard Medium 0.0483746857022364 0.0483770263821056 https://leetcode.com/problems/sliding-window-maximum https://leetcode.com/problems/robot-bounded-in-circle
57 490 239 The Maze Sliding Window Maximum 51.4% 43.0% Medium Hard 0.04287902305923364 0.0483746857022364 https://leetcode.com/problems/the-maze https://leetcode.com/problems/sliding-window-maximum
58 540 490 Single Element in a Sorted Array The Maze 57.9% 51.4% Medium Medium 0.042721256704769804 0.04287902305923364 https://leetcode.com/problems/single-element-in-a-sorted-array https://leetcode.com/problems/the-maze
59 716 540 Max Stack Single Element in a Sorted Array 42.6% 57.9% Easy Medium 0.042695919196489414 0.042721256704769804 https://leetcode.com/problems/max-stack https://leetcode.com/problems/single-element-in-a-sorted-array
60 235 716 Lowest Common Ancestor of a Binary Search Tree Max Stack 49.9% 42.6% Easy Easy 0.032470385030784074 0.042695919196489414 https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree https://leetcode.com/problems/max-stack
61 814 235 Binary Tree Pruning Lowest Common Ancestor of a Binary Search Tree 74.5% 49.9% Medium Easy 0.03113091859517317 0.032470385030784074 https://leetcode.com/problems/binary-tree-pruning https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree
62 44 814 Wildcard Matching Binary Tree Pruning 24.7% 74.5% Hard Medium 0.030573033362282363 0.03113091859517317 https://leetcode.com/problems/wildcard-matching https://leetcode.com/problems/binary-tree-pruning
63 496 44 Next Greater Element I Wildcard Matching 63.8% 24.7% Easy Hard 0.029462032730316202 0.030573033362282363 https://leetcode.com/problems/next-greater-element-i https://leetcode.com/problems/wildcard-matching
64 36 496 Valid Sudoku Next Greater Element I 48.7% 63.8% Medium Easy 0.028722132350970705 0.029462032730316202 https://leetcode.com/problems/valid-sudoku https://leetcode.com/problems/next-greater-element-i
65 482 36 License Key Formatting Valid Sudoku 43.1% 48.7% Easy Medium 0.024799783060416587 0.028722132350970705 https://leetcode.com/problems/license-key-formatting https://leetcode.com/problems/valid-sudoku
66 124 482 Binary Tree Maximum Path Sum License Key Formatting 34.3% 43.1% Hard Easy 0.021945744272529284 0.024799783060416587 https://leetcode.com/problems/binary-tree-maximum-path-sum https://leetcode.com/problems/license-key-formatting
67 140 124 Word Break II Binary Tree Maximum Path Sum 32.6% 34.3% Hard Hard 0.016800341389107805 0.021945744272529284 https://leetcode.com/problems/word-break-ii https://leetcode.com/problems/binary-tree-maximum-path-sum
68 118 140 Pascal's Triangle Word Break II 52.5% 32.6% Easy Hard 0.015123796918620345 0.016800341389107805 https://leetcode.com/problems/pascals-triangle https://leetcode.com/problems/word-break-ii
69 206 118 Reverse Linked List Pascal's Triangle 62.5% 52.5% Easy Easy 0.01453513961911317 0.015123796918620345 https://leetcode.com/problems/reverse-linked-list https://leetcode.com/problems/pascals-triangle
70 76 206 Minimum Window Substring Reverse Linked List 34.6% 62.5% Hard Easy 0.013966707481708198 0.01453513961911317 https://leetcode.com/problems/minimum-window-substring https://leetcode.com/problems/reverse-linked-list
71 105 76 Construct Binary Tree from Preorder and Inorder Traversal Minimum Window Substring 48.8% 34.6% Medium Hard 0.01261934861981589 0.013966707481708198 https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal https://leetcode.com/problems/minimum-window-substring
72 210 105 Course Schedule II Construct Binary Tree from Preorder and Inorder Traversal 40.7% 48.8% Medium Medium 0.011869857339029215 0.01261934861981589 https://leetcode.com/problems/course-schedule-ii https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal
73 169 210 Majority Element Course Schedule II 58.7% 40.7% Easy Medium 0.010558521365115802 0.011869857339029215 https://leetcode.com/problems/majority-element https://leetcode.com/problems/course-schedule-ii
74 101 169 Symmetric Tree Majority Element 46.8% 58.7% Easy Easy 0.007646596306528098 0.010558521365115802 https://leetcode.com/problems/symmetric-tree https://leetcode.com/problems/majority-element
75 106 101 Construct Binary Tree from Inorder and Postorder Traversal Symmetric Tree 47.2% 46.8% Medium Easy 0.00234041415121758 0.007646596306528098 https://leetcode.com/problems/construct-binary-tree-from-inorder-and-postorder-traversal https://leetcode.com/problems/symmetric-tree
76 323 106 Number of Connected Components in an Undirected Graph Construct Binary Tree from Inorder and Postorder Traversal 56.0% 47.2% Medium Medium 0 0.00234041415121758 https://leetcode.com/problems/number-of-connected-components-in-an-undirected-graph https://leetcode.com/problems/construct-binary-tree-from-inorder-and-postorder-traversal
77 378 323 Kth Smallest Element in a Sorted Matrix Number of Connected Components in an Undirected Graph 54.3% 56.0% Medium Medium 0 0 https://leetcode.com/problems/kth-smallest-element-in-a-sorted-matrix https://leetcode.com/problems/number-of-connected-components-in-an-undirected-graph
78 407 378 Trapping Rain Water II Kth Smallest Element in a Sorted Matrix 42.4% 54.3% Hard Medium 0 0 https://leetcode.com/problems/trapping-rain-water-ii https://leetcode.com/problems/kth-smallest-element-in-a-sorted-matrix
79 868 407 Binary Gap Trapping Rain Water II 60.6% 42.4% Easy Hard 0 0 https://leetcode.com/problems/binary-gap https://leetcode.com/problems/trapping-rain-water-ii
80 1206 868 Design Skiplist Binary Gap 57.3% 60.6% Hard Easy 0 0 https://leetcode.com/problems/design-skiplist https://leetcode.com/problems/binary-gap
81 1347 1206 Minimum Number of Steps to Make Two Strings Anagram Design Skiplist 74.7% 57.3% Medium Hard 0 0 https://leetcode.com/problems/minimum-number-of-steps-to-make-two-strings-anagram https://leetcode.com/problems/design-skiplist
82 1459 1347 Rectangles Area Minimum Number of Steps to Make Two Strings Anagram 61.5% 74.7% Medium Medium 0 0 https://leetcode.com/problems/rectangles-area https://leetcode.com/problems/minimum-number-of-steps-to-make-two-strings-anagram
83 1459 Rectangles Area 61.5% Medium 0 https://leetcode.com/problems/rectangles-area