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,87 +1,88 @@
289,Game of Life,54.5%,Medium,1.9095955742703714, https://leetcode.com/problems/game-of-life
1086,High Five,79.7%,Easy,1.8728225432316814, https://leetcode.com/problems/high-five
42,Trapping Rain Water,48.9%,Hard,1.7465805642808125, https://leetcode.com/problems/trapping-rain-water
209,Minimum Size Subarray Sum,38.2%,Medium,1.3987846835630127, https://leetcode.com/problems/minimum-size-subarray-sum
780,Reaching Points,29.4%,Hard,1.0654848189471613, https://leetcode.com/problems/reaching-points
166,Fraction to Recurring Decimal,21.6%,Medium,1.042800072024958, https://leetcode.com/problems/fraction-to-recurring-decimal
1041,Robot Bounded In Circle,49.6%,Medium,0.695004191307158, https://leetcode.com/problems/robot-bounded-in-circle
387,First Unique Character in a String,53.4%,Easy,0.632243999450364, https://leetcode.com/problems/first-unique-character-in-a-string
1163,Last Substring in Lexicographical Order,33.9%,Hard,0.6115111972698513, https://leetcode.com/problems/last-substring-in-lexicographical-order
238,Product of Array Except Self,60.1%,Medium,0.6032226884679701, https://leetcode.com/problems/product-of-array-except-self
4,Median of Two Sorted Arrays,29.6%,Hard,0.5686741732514908, https://leetcode.com/problems/median-of-two-sorted-arrays
862,Shortest Subarray with Sum at Least K,24.6%,Hard,0.4965766780244703, https://leetcode.com/problems/shortest-subarray-with-sum-at-least-k
443,String Compression,41.3%,Easy,0.35323767072881695, https://leetcode.com/problems/string-compression
524,Longest Word in Dictionary through Deleting,48.4%,Medium,0.3371083689581862, https://leetcode.com/problems/longest-word-in-dictionary-through-deleting
592,Fraction Addition and Subtraction,49.0%,Medium,0.32423966818557853, https://leetcode.com/problems/fraction-addition-and-subtraction
49,Group Anagrams,56.9%,Medium,0.2956303911813633, https://leetcode.com/problems/group-anagrams
64,Minimum Path Sum,54.5%,Medium,0.26326216391582735, https://leetcode.com/problems/minimum-path-sum
532,K-diff Pairs in an Array,31.6%,Easy,0.15718558352241233, https://leetcode.com/problems/k-diff-pairs-in-an-array
706,Design HashMap,61.3%,Easy,0.1476880076475794, https://leetcode.com/problems/design-hashmap
688,Knight Probability in Chessboard,48.9%,Medium,0.14465605390747982, https://leetcode.com/problems/knight-probability-in-chessboard
121,Best Time to Buy and Sell Stock,50.5%,Easy,0.14290237960985536, https://leetcode.com/problems/best-time-to-buy-and-sell-stock
54,Spiral Matrix,34.1%,Medium,0.12572728493821236, https://leetcode.com/problems/spiral-matrix
657,Robot Return to Origin,73.5%,Easy,0.10469804461670518, https://leetcode.com/problems/robot-return-to-origin
326,Power of Three,42.1%,Easy,0.09026419332308504, https://leetcode.com/problems/power-of-three
942,DI String Match,72.6%,Easy,0.08495672247596549, https://leetcode.com/problems/di-string-match
939,Minimum Area Rectangle,51.8%,Medium,0.08361414004113359, https://leetcode.com/problems/minimum-area-rectangle
887,Super Egg Drop,27.1%,Hard,0.08054440988796595, https://leetcode.com/problems/super-egg-drop
8,String to Integer (atoi),15.4%,Medium,0.07412832776627384, https://leetcode.com/problems/string-to-integer-atoi
547,Friend Circles,58.6%,Medium,0.07408600065076033, https://leetcode.com/problems/friend-circles
1051,Height Checker,71.1%,Easy,0.06960783038095686, https://leetcode.com/problems/height-checker
460,LFU Cache,34.2%,Hard,0.06836374280939023, https://leetcode.com/problems/lfu-cache
33,Search in Rotated Sorted Array,34.5%,Medium,0.06345616594863132, https://leetcode.com/problems/search-in-rotated-sorted-array
11,Container With Most Water,50.8%,Medium,0.060358007567261264, https://leetcode.com/problems/container-with-most-water
588,Design In-Memory File System,45.9%,Hard,0.05841076215641451, https://leetcode.com/problems/design-in-memory-file-system
1395,Count Number of Teams,82.0%,Medium,0.056405927913552076, https://leetcode.com/problems/count-number-of-teams
76,Minimum Window Substring,34.6%,Hard,0.05473322196089386, https://leetcode.com/problems/minimum-window-substring
724,Find Pivot Index,44.0%,Easy,0.05428741283782842, https://leetcode.com/problems/find-pivot-index
332,Reconstruct Itinerary,36.7%,Medium,0.053921416793820044, https://leetcode.com/problems/reconstruct-itinerary
91,Decode Ways,24.7%,Medium,0.05247487679829598, https://leetcode.com/problems/decode-ways
99,Recover Binary Search Tree,39.7%,Hard,0.051264071283762605, https://leetcode.com/problems/recover-binary-search-tree
560,Subarray Sum Equals K,43.9%,Medium,0.0512021569656579, https://leetcode.com/problems/subarray-sum-equals-k
322,Coin Change,35.5%,Medium,0.04828048261319787, https://leetcode.com/problems/coin-change
119,Pascal's Triangle II,49.0%,Easy,0.04675113677738821, https://leetcode.com/problems/pascals-triangle-ii
153,Find Minimum in Rotated Sorted Array,45.1%,Medium,0.04506509646857976, https://leetcode.com/problems/find-minimum-in-rotated-sorted-array
720,Longest Word in Dictionary,48.2%,Easy,0.042695919196489414, https://leetcode.com/problems/longest-word-in-dictionary
1219,Path with Maximum Gold,65.1%,Medium,0.04111576039097048, https://leetcode.com/problems/path-with-maximum-gold
647,Palindromic Substrings,60.6%,Medium,0.040968350772541844, https://leetcode.com/problems/palindromic-substrings
722,Remove Comments,34.6%,Medium,0.04049136135473691, https://leetcode.com/problems/remove-comments
993,Cousins in Binary Tree,52.0%,Easy,0.03876454345024432, https://leetcode.com/problems/cousins-in-binary-tree
992,Subarrays with K Different Integers,48.6%,Hard,0.03700699810869683, https://leetcode.com/problems/subarrays-with-k-different-integers
200,Number of Islands,46.8%,Medium,0.03483682053721545, https://leetcode.com/problems/number-of-islands
1,Two Sum,45.6%,Easy,0.03409719244428431, https://leetcode.com/problems/two-sum
62,Unique Paths,54.1%,Medium,0.02853749186115581, https://leetcode.com/problems/unique-paths
146,LRU Cache,33.2%,Medium,0.028411001832779885, https://leetcode.com/problems/lru-cache
218,The Skyline Problem,34.6%,Hard,0.025479085300984906, https://leetcode.com/problems/the-skyline-problem
836,Rectangle Overlap,48.6%,Easy,0.024228925974379843, https://leetcode.com/problems/rectangle-overlap
1209,Remove All Adjacent Duplicates in String II,56.9%,Medium,0.02324334737232728, https://leetcode.com/problems/remove-all-adjacent-duplicates-in-string-ii
19,Remove Nth Node From End of List,35.2%,Medium,0.019074355670058666, https://leetcode.com/problems/remove-nth-node-from-end-of-list
155,Min Stack,44.5%,Easy,0.01886181109797383, https://leetcode.com/problems/min-stack
206,Reverse Linked List,62.5%,Easy,0.01453513961911317, https://leetcode.com/problems/reverse-linked-list
3,Longest Substring Without Repeating Characters,30.4%,Medium,0.01391434345649413, https://leetcode.com/problems/longest-substring-without-repeating-characters
44,Wildcard Matching,24.7%,Hard,0.013703537497261858, https://leetcode.com/problems/wildcard-matching
122,Best Time to Buy and Sell Stock II,57.0%,Easy,0.013351333174864208, https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii
120,Triangle,44.2%,Medium,0.013236460625830901, https://leetcode.com/problems/triangle
739,Daily Temperatures,63.3%,Medium,0.010032690121814417, https://leetcode.com/problems/daily-temperatures
17,Letter Combinations of a Phone Number,46.8%,Medium,0.00987716546167603, https://leetcode.com/problems/letter-combinations-of-a-phone-number
380,Insert Delete GetRandom O(1),47.5%,Medium,0.009820849864094454, https://leetcode.com/problems/insert-delete-getrandom-o1
189,Rotate Array,34.7%,Easy,0.00904437880665999, https://leetcode.com/problems/rotate-array
53,Maximum Subarray,46.5%,Easy,0.008640295679602939, https://leetcode.com/problems/maximum-subarray
253,Meeting Rooms II,45.7%,Medium,0.008079219870546493, https://leetcode.com/problems/meeting-rooms-ii
141,Linked List Cycle,41.1%,Easy,0.007843861028908454, https://leetcode.com/problems/linked-list-cycle
56,Merge Intervals,39.3%,Medium,0.007796972706004796, https://leetcode.com/problems/merge-intervals
876,Middle of the Linked List,68.4%,Easy,0.007624893975696915, https://leetcode.com/problems/middle-of-the-linked-list
16,3Sum Closest,46.0%,Medium,0.0075259057003469075, https://leetcode.com/problems/3sum-closest
118,Pascal's Triangle,52.5%,Easy,0.006749941254175012, https://leetcode.com/problems/pascals-triangle
283,Move Zeroes,57.8%,Easy,0.006480437425856766, https://leetcode.com/problems/move-zeroes
973,K Closest Points to Origin,63.8%,Medium,0.005773688094426333, https://leetcode.com/problems/k-closest-points-to-origin
237,Delete Node in a Linked List,63.8%,Easy,0.005144705881237697, https://leetcode.com/problems/delete-node-in-a-linked-list
46,Permutations,63.5%,Medium,0.004216302230139218, https://leetcode.com/problems/permutations
242,Valid Anagram,56.9%,Easy,0.004154123743115972, https://leetcode.com/problems/valid-anagram
215,Kth Largest Element in an Array,55.4%,Medium,0.003902443976931749, https://leetcode.com/problems/kth-largest-element-in-an-array
78,Subsets,62.0%,Medium,0.00368765975195334, https://leetcode.com/problems/subsets
98,Validate Binary Search Tree,27.8%,Medium,0.002943776044013381, https://leetcode.com/problems/validate-binary-search-tree
104,Maximum Depth of Binary Tree,66.0%,Easy,0.002787846801433134, https://leetcode.com/problems/maximum-depth-of-binary-tree
20,Valid Parentheses,39.0%,Easy,0.0023005704055949323, https://leetcode.com/problems/valid-parentheses
347,Top K Frequent Elements,61.2%,Medium,0.0014856636219477439, https://leetcode.com/problems/top-k-frequent-elements
50,Pow(x;n),30.3%,Medium,0.0014016892647828818, https://leetcode.com/problems/powx-n
ID,Title,Acceptance,Difficulty,Frequency,Leetcode Question Link
289,Game of Life,54.5%,Medium,1.9095955742703714, https://leetcode.com/problems/game-of-life
1086,High Five,79.7%,Easy,1.8728225432316814, https://leetcode.com/problems/high-five
42,Trapping Rain Water,48.9%,Hard,1.7465805642808125, https://leetcode.com/problems/trapping-rain-water
209,Minimum Size Subarray Sum,38.2%,Medium,1.3987846835630127, https://leetcode.com/problems/minimum-size-subarray-sum
780,Reaching Points,29.4%,Hard,1.0654848189471613, https://leetcode.com/problems/reaching-points
166,Fraction to Recurring Decimal,21.6%,Medium,1.042800072024958, https://leetcode.com/problems/fraction-to-recurring-decimal
1041,Robot Bounded In Circle,49.6%,Medium,0.695004191307158, https://leetcode.com/problems/robot-bounded-in-circle
387,First Unique Character in a String,53.4%,Easy,0.632243999450364, https://leetcode.com/problems/first-unique-character-in-a-string
1163,Last Substring in Lexicographical Order,33.9%,Hard,0.6115111972698513, https://leetcode.com/problems/last-substring-in-lexicographical-order
238,Product of Array Except Self,60.1%,Medium,0.6032226884679701, https://leetcode.com/problems/product-of-array-except-self
4,Median of Two Sorted Arrays,29.6%,Hard,0.5686741732514908, https://leetcode.com/problems/median-of-two-sorted-arrays
862,Shortest Subarray with Sum at Least K,24.6%,Hard,0.4965766780244703, https://leetcode.com/problems/shortest-subarray-with-sum-at-least-k
443,String Compression,41.3%,Easy,0.35323767072881695, https://leetcode.com/problems/string-compression
524,Longest Word in Dictionary through Deleting,48.4%,Medium,0.3371083689581862, https://leetcode.com/problems/longest-word-in-dictionary-through-deleting
592,Fraction Addition and Subtraction,49.0%,Medium,0.32423966818557853, https://leetcode.com/problems/fraction-addition-and-subtraction
49,Group Anagrams,56.9%,Medium,0.2956303911813633, https://leetcode.com/problems/group-anagrams
64,Minimum Path Sum,54.5%,Medium,0.26326216391582735, https://leetcode.com/problems/minimum-path-sum
532,K-diff Pairs in an Array,31.6%,Easy,0.15718558352241233, https://leetcode.com/problems/k-diff-pairs-in-an-array
706,Design HashMap,61.3%,Easy,0.1476880076475794, https://leetcode.com/problems/design-hashmap
688,Knight Probability in Chessboard,48.9%,Medium,0.14465605390747982, https://leetcode.com/problems/knight-probability-in-chessboard
121,Best Time to Buy and Sell Stock,50.5%,Easy,0.14290237960985536, https://leetcode.com/problems/best-time-to-buy-and-sell-stock
54,Spiral Matrix,34.1%,Medium,0.12572728493821236, https://leetcode.com/problems/spiral-matrix
657,Robot Return to Origin,73.5%,Easy,0.10469804461670518, https://leetcode.com/problems/robot-return-to-origin
326,Power of Three,42.1%,Easy,0.09026419332308504, https://leetcode.com/problems/power-of-three
942,DI String Match,72.6%,Easy,0.08495672247596549, https://leetcode.com/problems/di-string-match
939,Minimum Area Rectangle,51.8%,Medium,0.08361414004113359, https://leetcode.com/problems/minimum-area-rectangle
887,Super Egg Drop,27.1%,Hard,0.08054440988796595, https://leetcode.com/problems/super-egg-drop
8,String to Integer (atoi),15.4%,Medium,0.07412832776627384, https://leetcode.com/problems/string-to-integer-atoi
547,Friend Circles,58.6%,Medium,0.07408600065076033, https://leetcode.com/problems/friend-circles
1051,Height Checker,71.1%,Easy,0.06960783038095686, https://leetcode.com/problems/height-checker
460,LFU Cache,34.2%,Hard,0.06836374280939023, https://leetcode.com/problems/lfu-cache
33,Search in Rotated Sorted Array,34.5%,Medium,0.06345616594863132, https://leetcode.com/problems/search-in-rotated-sorted-array
11,Container With Most Water,50.8%,Medium,0.060358007567261264, https://leetcode.com/problems/container-with-most-water
588,Design In-Memory File System,45.9%,Hard,0.05841076215641451, https://leetcode.com/problems/design-in-memory-file-system
1395,Count Number of Teams,82.0%,Medium,0.056405927913552076, https://leetcode.com/problems/count-number-of-teams
76,Minimum Window Substring,34.6%,Hard,0.05473322196089386, https://leetcode.com/problems/minimum-window-substring
724,Find Pivot Index,44.0%,Easy,0.05428741283782842, https://leetcode.com/problems/find-pivot-index
332,Reconstruct Itinerary,36.7%,Medium,0.053921416793820044, https://leetcode.com/problems/reconstruct-itinerary
91,Decode Ways,24.7%,Medium,0.05247487679829598, https://leetcode.com/problems/decode-ways
99,Recover Binary Search Tree,39.7%,Hard,0.051264071283762605, https://leetcode.com/problems/recover-binary-search-tree
560,Subarray Sum Equals K,43.9%,Medium,0.0512021569656579, https://leetcode.com/problems/subarray-sum-equals-k
322,Coin Change,35.5%,Medium,0.04828048261319787, https://leetcode.com/problems/coin-change
119,Pascal's Triangle II,49.0%,Easy,0.04675113677738821, https://leetcode.com/problems/pascals-triangle-ii
153,Find Minimum in Rotated Sorted Array,45.1%,Medium,0.04506509646857976, https://leetcode.com/problems/find-minimum-in-rotated-sorted-array
720,Longest Word in Dictionary,48.2%,Easy,0.042695919196489414, https://leetcode.com/problems/longest-word-in-dictionary
1219,Path with Maximum Gold,65.1%,Medium,0.04111576039097048, https://leetcode.com/problems/path-with-maximum-gold
647,Palindromic Substrings,60.6%,Medium,0.040968350772541844, https://leetcode.com/problems/palindromic-substrings
722,Remove Comments,34.6%,Medium,0.04049136135473691, https://leetcode.com/problems/remove-comments
993,Cousins in Binary Tree,52.0%,Easy,0.03876454345024432, https://leetcode.com/problems/cousins-in-binary-tree
992,Subarrays with K Different Integers,48.6%,Hard,0.03700699810869683, https://leetcode.com/problems/subarrays-with-k-different-integers
200,Number of Islands,46.8%,Medium,0.03483682053721545, https://leetcode.com/problems/number-of-islands
1,Two Sum,45.6%,Easy,0.03409719244428431, https://leetcode.com/problems/two-sum
62,Unique Paths,54.1%,Medium,0.02853749186115581, https://leetcode.com/problems/unique-paths
146,LRU Cache,33.2%,Medium,0.028411001832779885, https://leetcode.com/problems/lru-cache
218,The Skyline Problem,34.6%,Hard,0.025479085300984906, https://leetcode.com/problems/the-skyline-problem
836,Rectangle Overlap,48.6%,Easy,0.024228925974379843, https://leetcode.com/problems/rectangle-overlap
1209,Remove All Adjacent Duplicates in String II,56.9%,Medium,0.02324334737232728, https://leetcode.com/problems/remove-all-adjacent-duplicates-in-string-ii
19,Remove Nth Node From End of List,35.2%,Medium,0.019074355670058666, https://leetcode.com/problems/remove-nth-node-from-end-of-list
155,Min Stack,44.5%,Easy,0.01886181109797383, https://leetcode.com/problems/min-stack
206,Reverse Linked List,62.5%,Easy,0.01453513961911317, https://leetcode.com/problems/reverse-linked-list
3,Longest Substring Without Repeating Characters,30.4%,Medium,0.01391434345649413, https://leetcode.com/problems/longest-substring-without-repeating-characters
44,Wildcard Matching,24.7%,Hard,0.013703537497261858, https://leetcode.com/problems/wildcard-matching
122,Best Time to Buy and Sell Stock II,57.0%,Easy,0.013351333174864208, https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii
120,Triangle,44.2%,Medium,0.013236460625830901, https://leetcode.com/problems/triangle
739,Daily Temperatures,63.3%,Medium,0.010032690121814417, https://leetcode.com/problems/daily-temperatures
17,Letter Combinations of a Phone Number,46.8%,Medium,0.00987716546167603, https://leetcode.com/problems/letter-combinations-of-a-phone-number
380,Insert Delete GetRandom O(1),47.5%,Medium,0.009820849864094454, https://leetcode.com/problems/insert-delete-getrandom-o1
189,Rotate Array,34.7%,Easy,0.00904437880665999, https://leetcode.com/problems/rotate-array
53,Maximum Subarray,46.5%,Easy,0.008640295679602939, https://leetcode.com/problems/maximum-subarray
253,Meeting Rooms II,45.7%,Medium,0.008079219870546493, https://leetcode.com/problems/meeting-rooms-ii
141,Linked List Cycle,41.1%,Easy,0.007843861028908454, https://leetcode.com/problems/linked-list-cycle
56,Merge Intervals,39.3%,Medium,0.007796972706004796, https://leetcode.com/problems/merge-intervals
876,Middle of the Linked List,68.4%,Easy,0.007624893975696915, https://leetcode.com/problems/middle-of-the-linked-list
16,3Sum Closest,46.0%,Medium,0.0075259057003469075, https://leetcode.com/problems/3sum-closest
118,Pascal's Triangle,52.5%,Easy,0.006749941254175012, https://leetcode.com/problems/pascals-triangle
283,Move Zeroes,57.8%,Easy,0.006480437425856766, https://leetcode.com/problems/move-zeroes
973,K Closest Points to Origin,63.8%,Medium,0.005773688094426333, https://leetcode.com/problems/k-closest-points-to-origin
237,Delete Node in a Linked List,63.8%,Easy,0.005144705881237697, https://leetcode.com/problems/delete-node-in-a-linked-list
46,Permutations,63.5%,Medium,0.004216302230139218, https://leetcode.com/problems/permutations
242,Valid Anagram,56.9%,Easy,0.004154123743115972, https://leetcode.com/problems/valid-anagram
215,Kth Largest Element in an Array,55.4%,Medium,0.003902443976931749, https://leetcode.com/problems/kth-largest-element-in-an-array
78,Subsets,62.0%,Medium,0.00368765975195334, https://leetcode.com/problems/subsets
98,Validate Binary Search Tree,27.8%,Medium,0.002943776044013381, https://leetcode.com/problems/validate-binary-search-tree
104,Maximum Depth of Binary Tree,66.0%,Easy,0.002787846801433134, https://leetcode.com/problems/maximum-depth-of-binary-tree
20,Valid Parentheses,39.0%,Easy,0.0023005704055949323, https://leetcode.com/problems/valid-parentheses
347,Top K Frequent Elements,61.2%,Medium,0.0014856636219477439, https://leetcode.com/problems/top-k-frequent-elements
50,Pow(x;n),30.3%,Medium,0.0014016892647828818, https://leetcode.com/problems/powx-n
1 289 ID Game of Life Title 54.5% Acceptance Medium Difficulty 1.9095955742703714 Frequency https://leetcode.com/problems/game-of-life Leetcode Question Link
2 1086 289 High Five Game of Life 79.7% 54.5% Easy Medium 1.8728225432316814 1.9095955742703714 https://leetcode.com/problems/high-five https://leetcode.com/problems/game-of-life
3 42 1086 Trapping Rain Water High Five 48.9% 79.7% Hard Easy 1.7465805642808125 1.8728225432316814 https://leetcode.com/problems/trapping-rain-water https://leetcode.com/problems/high-five
4 209 42 Minimum Size Subarray Sum Trapping Rain Water 38.2% 48.9% Medium Hard 1.3987846835630127 1.7465805642808125 https://leetcode.com/problems/minimum-size-subarray-sum https://leetcode.com/problems/trapping-rain-water
5 780 209 Reaching Points Minimum Size Subarray Sum 29.4% 38.2% Hard Medium 1.0654848189471613 1.3987846835630127 https://leetcode.com/problems/reaching-points https://leetcode.com/problems/minimum-size-subarray-sum
6 166 780 Fraction to Recurring Decimal Reaching Points 21.6% 29.4% Medium Hard 1.042800072024958 1.0654848189471613 https://leetcode.com/problems/fraction-to-recurring-decimal https://leetcode.com/problems/reaching-points
7 1041 166 Robot Bounded In Circle Fraction to Recurring Decimal 49.6% 21.6% Medium Medium 0.695004191307158 1.042800072024958 https://leetcode.com/problems/robot-bounded-in-circle https://leetcode.com/problems/fraction-to-recurring-decimal
8 387 1041 First Unique Character in a String Robot Bounded In Circle 53.4% 49.6% Easy Medium 0.632243999450364 0.695004191307158 https://leetcode.com/problems/first-unique-character-in-a-string https://leetcode.com/problems/robot-bounded-in-circle
9 1163 387 Last Substring in Lexicographical Order First Unique Character in a String 33.9% 53.4% Hard Easy 0.6115111972698513 0.632243999450364 https://leetcode.com/problems/last-substring-in-lexicographical-order https://leetcode.com/problems/first-unique-character-in-a-string
10 238 1163 Product of Array Except Self Last Substring in Lexicographical Order 60.1% 33.9% Medium Hard 0.6032226884679701 0.6115111972698513 https://leetcode.com/problems/product-of-array-except-self https://leetcode.com/problems/last-substring-in-lexicographical-order
11 4 238 Median of Two Sorted Arrays Product of Array Except Self 29.6% 60.1% Hard Medium 0.5686741732514908 0.6032226884679701 https://leetcode.com/problems/median-of-two-sorted-arrays https://leetcode.com/problems/product-of-array-except-self
12 862 4 Shortest Subarray with Sum at Least K Median of Two Sorted Arrays 24.6% 29.6% Hard Hard 0.4965766780244703 0.5686741732514908 https://leetcode.com/problems/shortest-subarray-with-sum-at-least-k https://leetcode.com/problems/median-of-two-sorted-arrays
13 443 862 String Compression Shortest Subarray with Sum at Least K 41.3% 24.6% Easy Hard 0.35323767072881695 0.4965766780244703 https://leetcode.com/problems/string-compression https://leetcode.com/problems/shortest-subarray-with-sum-at-least-k
14 524 443 Longest Word in Dictionary through Deleting String Compression 48.4% 41.3% Medium Easy 0.3371083689581862 0.35323767072881695 https://leetcode.com/problems/longest-word-in-dictionary-through-deleting https://leetcode.com/problems/string-compression
15 592 524 Fraction Addition and Subtraction Longest Word in Dictionary through Deleting 49.0% 48.4% Medium Medium 0.32423966818557853 0.3371083689581862 https://leetcode.com/problems/fraction-addition-and-subtraction https://leetcode.com/problems/longest-word-in-dictionary-through-deleting
16 49 592 Group Anagrams Fraction Addition and Subtraction 56.9% 49.0% Medium Medium 0.2956303911813633 0.32423966818557853 https://leetcode.com/problems/group-anagrams https://leetcode.com/problems/fraction-addition-and-subtraction
17 64 49 Minimum Path Sum Group Anagrams 54.5% 56.9% Medium Medium 0.26326216391582735 0.2956303911813633 https://leetcode.com/problems/minimum-path-sum https://leetcode.com/problems/group-anagrams
18 532 64 K-diff Pairs in an Array Minimum Path Sum 31.6% 54.5% Easy Medium 0.15718558352241233 0.26326216391582735 https://leetcode.com/problems/k-diff-pairs-in-an-array https://leetcode.com/problems/minimum-path-sum
19 706 532 Design HashMap K-diff Pairs in an Array 61.3% 31.6% Easy Easy 0.1476880076475794 0.15718558352241233 https://leetcode.com/problems/design-hashmap https://leetcode.com/problems/k-diff-pairs-in-an-array
20 688 706 Knight Probability in Chessboard Design HashMap 48.9% 61.3% Medium Easy 0.14465605390747982 0.1476880076475794 https://leetcode.com/problems/knight-probability-in-chessboard https://leetcode.com/problems/design-hashmap
21 121 688 Best Time to Buy and Sell Stock Knight Probability in Chessboard 50.5% 48.9% Easy Medium 0.14290237960985536 0.14465605390747982 https://leetcode.com/problems/best-time-to-buy-and-sell-stock https://leetcode.com/problems/knight-probability-in-chessboard
22 54 121 Spiral Matrix Best Time to Buy and Sell Stock 34.1% 50.5% Medium Easy 0.12572728493821236 0.14290237960985536 https://leetcode.com/problems/spiral-matrix https://leetcode.com/problems/best-time-to-buy-and-sell-stock
23 657 54 Robot Return to Origin Spiral Matrix 73.5% 34.1% Easy Medium 0.10469804461670518 0.12572728493821236 https://leetcode.com/problems/robot-return-to-origin https://leetcode.com/problems/spiral-matrix
24 326 657 Power of Three Robot Return to Origin 42.1% 73.5% Easy Easy 0.09026419332308504 0.10469804461670518 https://leetcode.com/problems/power-of-three https://leetcode.com/problems/robot-return-to-origin
25 942 326 DI String Match Power of Three 72.6% 42.1% Easy Easy 0.08495672247596549 0.09026419332308504 https://leetcode.com/problems/di-string-match https://leetcode.com/problems/power-of-three
26 939 942 Minimum Area Rectangle DI String Match 51.8% 72.6% Medium Easy 0.08361414004113359 0.08495672247596549 https://leetcode.com/problems/minimum-area-rectangle https://leetcode.com/problems/di-string-match
27 887 939 Super Egg Drop Minimum Area Rectangle 27.1% 51.8% Hard Medium 0.08054440988796595 0.08361414004113359 https://leetcode.com/problems/super-egg-drop https://leetcode.com/problems/minimum-area-rectangle
28 8 887 String to Integer (atoi) Super Egg Drop 15.4% 27.1% Medium Hard 0.07412832776627384 0.08054440988796595 https://leetcode.com/problems/string-to-integer-atoi https://leetcode.com/problems/super-egg-drop
29 547 8 Friend Circles String to Integer (atoi) 58.6% 15.4% Medium Medium 0.07408600065076033 0.07412832776627384 https://leetcode.com/problems/friend-circles https://leetcode.com/problems/string-to-integer-atoi
30 1051 547 Height Checker Friend Circles 71.1% 58.6% Easy Medium 0.06960783038095686 0.07408600065076033 https://leetcode.com/problems/height-checker https://leetcode.com/problems/friend-circles
31 460 1051 LFU Cache Height Checker 34.2% 71.1% Hard Easy 0.06836374280939023 0.06960783038095686 https://leetcode.com/problems/lfu-cache https://leetcode.com/problems/height-checker
32 33 460 Search in Rotated Sorted Array LFU Cache 34.5% 34.2% Medium Hard 0.06345616594863132 0.06836374280939023 https://leetcode.com/problems/search-in-rotated-sorted-array https://leetcode.com/problems/lfu-cache
33 11 33 Container With Most Water Search in Rotated Sorted Array 50.8% 34.5% Medium Medium 0.060358007567261264 0.06345616594863132 https://leetcode.com/problems/container-with-most-water https://leetcode.com/problems/search-in-rotated-sorted-array
34 588 11 Design In-Memory File System Container With Most Water 45.9% 50.8% Hard Medium 0.05841076215641451 0.060358007567261264 https://leetcode.com/problems/design-in-memory-file-system https://leetcode.com/problems/container-with-most-water
35 1395 588 Count Number of Teams Design In-Memory File System 82.0% 45.9% Medium Hard 0.056405927913552076 0.05841076215641451 https://leetcode.com/problems/count-number-of-teams https://leetcode.com/problems/design-in-memory-file-system
36 76 1395 Minimum Window Substring Count Number of Teams 34.6% 82.0% Hard Medium 0.05473322196089386 0.056405927913552076 https://leetcode.com/problems/minimum-window-substring https://leetcode.com/problems/count-number-of-teams
37 724 76 Find Pivot Index Minimum Window Substring 44.0% 34.6% Easy Hard 0.05428741283782842 0.05473322196089386 https://leetcode.com/problems/find-pivot-index https://leetcode.com/problems/minimum-window-substring
38 332 724 Reconstruct Itinerary Find Pivot Index 36.7% 44.0% Medium Easy 0.053921416793820044 0.05428741283782842 https://leetcode.com/problems/reconstruct-itinerary https://leetcode.com/problems/find-pivot-index
39 91 332 Decode Ways Reconstruct Itinerary 24.7% 36.7% Medium Medium 0.05247487679829598 0.053921416793820044 https://leetcode.com/problems/decode-ways https://leetcode.com/problems/reconstruct-itinerary
40 99 91 Recover Binary Search Tree Decode Ways 39.7% 24.7% Hard Medium 0.051264071283762605 0.05247487679829598 https://leetcode.com/problems/recover-binary-search-tree https://leetcode.com/problems/decode-ways
41 560 99 Subarray Sum Equals K Recover Binary Search Tree 43.9% 39.7% Medium Hard 0.0512021569656579 0.051264071283762605 https://leetcode.com/problems/subarray-sum-equals-k https://leetcode.com/problems/recover-binary-search-tree
42 322 560 Coin Change Subarray Sum Equals K 35.5% 43.9% Medium Medium 0.04828048261319787 0.0512021569656579 https://leetcode.com/problems/coin-change https://leetcode.com/problems/subarray-sum-equals-k
43 119 322 Pascal's Triangle II Coin Change 49.0% 35.5% Easy Medium 0.04675113677738821 0.04828048261319787 https://leetcode.com/problems/pascals-triangle-ii https://leetcode.com/problems/coin-change
44 153 119 Find Minimum in Rotated Sorted Array Pascal's Triangle II 45.1% 49.0% Medium Easy 0.04506509646857976 0.04675113677738821 https://leetcode.com/problems/find-minimum-in-rotated-sorted-array https://leetcode.com/problems/pascals-triangle-ii
45 720 153 Longest Word in Dictionary Find Minimum in Rotated Sorted Array 48.2% 45.1% Easy Medium 0.042695919196489414 0.04506509646857976 https://leetcode.com/problems/longest-word-in-dictionary https://leetcode.com/problems/find-minimum-in-rotated-sorted-array
46 1219 720 Path with Maximum Gold Longest Word in Dictionary 65.1% 48.2% Medium Easy 0.04111576039097048 0.042695919196489414 https://leetcode.com/problems/path-with-maximum-gold https://leetcode.com/problems/longest-word-in-dictionary
47 647 1219 Palindromic Substrings Path with Maximum Gold 60.6% 65.1% Medium Medium 0.040968350772541844 0.04111576039097048 https://leetcode.com/problems/palindromic-substrings https://leetcode.com/problems/path-with-maximum-gold
48 722 647 Remove Comments Palindromic Substrings 34.6% 60.6% Medium Medium 0.04049136135473691 0.040968350772541844 https://leetcode.com/problems/remove-comments https://leetcode.com/problems/palindromic-substrings
49 993 722 Cousins in Binary Tree Remove Comments 52.0% 34.6% Easy Medium 0.03876454345024432 0.04049136135473691 https://leetcode.com/problems/cousins-in-binary-tree https://leetcode.com/problems/remove-comments
50 992 993 Subarrays with K Different Integers Cousins in Binary Tree 48.6% 52.0% Hard Easy 0.03700699810869683 0.03876454345024432 https://leetcode.com/problems/subarrays-with-k-different-integers https://leetcode.com/problems/cousins-in-binary-tree
51 200 992 Number of Islands Subarrays with K Different Integers 46.8% 48.6% Medium Hard 0.03483682053721545 0.03700699810869683 https://leetcode.com/problems/number-of-islands https://leetcode.com/problems/subarrays-with-k-different-integers
52 1 200 Two Sum Number of Islands 45.6% 46.8% Easy Medium 0.03409719244428431 0.03483682053721545 https://leetcode.com/problems/two-sum https://leetcode.com/problems/number-of-islands
53 62 1 Unique Paths Two Sum 54.1% 45.6% Medium Easy 0.02853749186115581 0.03409719244428431 https://leetcode.com/problems/unique-paths https://leetcode.com/problems/two-sum
54 146 62 LRU Cache Unique Paths 33.2% 54.1% Medium Medium 0.028411001832779885 0.02853749186115581 https://leetcode.com/problems/lru-cache https://leetcode.com/problems/unique-paths
55 218 146 The Skyline Problem LRU Cache 34.6% 33.2% Hard Medium 0.025479085300984906 0.028411001832779885 https://leetcode.com/problems/the-skyline-problem https://leetcode.com/problems/lru-cache
56 836 218 Rectangle Overlap The Skyline Problem 48.6% 34.6% Easy Hard 0.024228925974379843 0.025479085300984906 https://leetcode.com/problems/rectangle-overlap https://leetcode.com/problems/the-skyline-problem
57 1209 836 Remove All Adjacent Duplicates in String II Rectangle Overlap 56.9% 48.6% Medium Easy 0.02324334737232728 0.024228925974379843 https://leetcode.com/problems/remove-all-adjacent-duplicates-in-string-ii https://leetcode.com/problems/rectangle-overlap
58 19 1209 Remove Nth Node From End of List Remove All Adjacent Duplicates in String II 35.2% 56.9% Medium Medium 0.019074355670058666 0.02324334737232728 https://leetcode.com/problems/remove-nth-node-from-end-of-list https://leetcode.com/problems/remove-all-adjacent-duplicates-in-string-ii
59 155 19 Min Stack Remove Nth Node From End of List 44.5% 35.2% Easy Medium 0.01886181109797383 0.019074355670058666 https://leetcode.com/problems/min-stack https://leetcode.com/problems/remove-nth-node-from-end-of-list
60 206 155 Reverse Linked List Min Stack 62.5% 44.5% Easy Easy 0.01453513961911317 0.01886181109797383 https://leetcode.com/problems/reverse-linked-list https://leetcode.com/problems/min-stack
61 3 206 Longest Substring Without Repeating Characters Reverse Linked List 30.4% 62.5% Medium Easy 0.01391434345649413 0.01453513961911317 https://leetcode.com/problems/longest-substring-without-repeating-characters https://leetcode.com/problems/reverse-linked-list
62 44 3 Wildcard Matching Longest Substring Without Repeating Characters 24.7% 30.4% Hard Medium 0.013703537497261858 0.01391434345649413 https://leetcode.com/problems/wildcard-matching https://leetcode.com/problems/longest-substring-without-repeating-characters
63 122 44 Best Time to Buy and Sell Stock II Wildcard Matching 57.0% 24.7% Easy Hard 0.013351333174864208 0.013703537497261858 https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii https://leetcode.com/problems/wildcard-matching
64 120 122 Triangle Best Time to Buy and Sell Stock II 44.2% 57.0% Medium Easy 0.013236460625830901 0.013351333174864208 https://leetcode.com/problems/triangle https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii
65 739 120 Daily Temperatures Triangle 63.3% 44.2% Medium Medium 0.010032690121814417 0.013236460625830901 https://leetcode.com/problems/daily-temperatures https://leetcode.com/problems/triangle
66 17 739 Letter Combinations of a Phone Number Daily Temperatures 46.8% 63.3% Medium Medium 0.00987716546167603 0.010032690121814417 https://leetcode.com/problems/letter-combinations-of-a-phone-number https://leetcode.com/problems/daily-temperatures
67 380 17 Insert Delete GetRandom O(1) Letter Combinations of a Phone Number 47.5% 46.8% Medium Medium 0.009820849864094454 0.00987716546167603 https://leetcode.com/problems/insert-delete-getrandom-o1 https://leetcode.com/problems/letter-combinations-of-a-phone-number
68 189 380 Rotate Array Insert Delete GetRandom O(1) 34.7% 47.5% Easy Medium 0.00904437880665999 0.009820849864094454 https://leetcode.com/problems/rotate-array https://leetcode.com/problems/insert-delete-getrandom-o1
69 53 189 Maximum Subarray Rotate Array 46.5% 34.7% Easy Easy 0.008640295679602939 0.00904437880665999 https://leetcode.com/problems/maximum-subarray https://leetcode.com/problems/rotate-array
70 253 53 Meeting Rooms II Maximum Subarray 45.7% 46.5% Medium Easy 0.008079219870546493 0.008640295679602939 https://leetcode.com/problems/meeting-rooms-ii https://leetcode.com/problems/maximum-subarray
71 141 253 Linked List Cycle Meeting Rooms II 41.1% 45.7% Easy Medium 0.007843861028908454 0.008079219870546493 https://leetcode.com/problems/linked-list-cycle https://leetcode.com/problems/meeting-rooms-ii
72 56 141 Merge Intervals Linked List Cycle 39.3% 41.1% Medium Easy 0.007796972706004796 0.007843861028908454 https://leetcode.com/problems/merge-intervals https://leetcode.com/problems/linked-list-cycle
73 876 56 Middle of the Linked List Merge Intervals 68.4% 39.3% Easy Medium 0.007624893975696915 0.007796972706004796 https://leetcode.com/problems/middle-of-the-linked-list https://leetcode.com/problems/merge-intervals
74 16 876 3Sum Closest Middle of the Linked List 46.0% 68.4% Medium Easy 0.0075259057003469075 0.007624893975696915 https://leetcode.com/problems/3sum-closest https://leetcode.com/problems/middle-of-the-linked-list
75 118 16 Pascal's Triangle 3Sum Closest 52.5% 46.0% Easy Medium 0.006749941254175012 0.0075259057003469075 https://leetcode.com/problems/pascals-triangle https://leetcode.com/problems/3sum-closest
76 283 118 Move Zeroes Pascal's Triangle 57.8% 52.5% Easy Easy 0.006480437425856766 0.006749941254175012 https://leetcode.com/problems/move-zeroes https://leetcode.com/problems/pascals-triangle
77 973 283 K Closest Points to Origin Move Zeroes 63.8% 57.8% Medium Easy 0.005773688094426333 0.006480437425856766 https://leetcode.com/problems/k-closest-points-to-origin https://leetcode.com/problems/move-zeroes
78 237 973 Delete Node in a Linked List K Closest Points to Origin 63.8% 63.8% Easy Medium 0.005144705881237697 0.005773688094426333 https://leetcode.com/problems/delete-node-in-a-linked-list https://leetcode.com/problems/k-closest-points-to-origin
79 46 237 Permutations Delete Node in a Linked List 63.5% 63.8% Medium Easy 0.004216302230139218 0.005144705881237697 https://leetcode.com/problems/permutations https://leetcode.com/problems/delete-node-in-a-linked-list
80 242 46 Valid Anagram Permutations 56.9% 63.5% Easy Medium 0.004154123743115972 0.004216302230139218 https://leetcode.com/problems/valid-anagram https://leetcode.com/problems/permutations
81 215 242 Kth Largest Element in an Array Valid Anagram 55.4% 56.9% Medium Easy 0.003902443976931749 0.004154123743115972 https://leetcode.com/problems/kth-largest-element-in-an-array https://leetcode.com/problems/valid-anagram
82 78 215 Subsets Kth Largest Element in an Array 62.0% 55.4% Medium Medium 0.00368765975195334 0.003902443976931749 https://leetcode.com/problems/subsets https://leetcode.com/problems/kth-largest-element-in-an-array
83 98 78 Validate Binary Search Tree Subsets 27.8% 62.0% Medium Medium 0.002943776044013381 0.00368765975195334 https://leetcode.com/problems/validate-binary-search-tree https://leetcode.com/problems/subsets
84 104 98 Maximum Depth of Binary Tree Validate Binary Search Tree 66.0% 27.8% Easy Medium 0.002787846801433134 0.002943776044013381 https://leetcode.com/problems/maximum-depth-of-binary-tree https://leetcode.com/problems/validate-binary-search-tree
85 20 104 Valid Parentheses Maximum Depth of Binary Tree 39.0% 66.0% Easy Easy 0.0023005704055949323 0.002787846801433134 https://leetcode.com/problems/valid-parentheses https://leetcode.com/problems/maximum-depth-of-binary-tree
86 347 20 Top K Frequent Elements Valid Parentheses 61.2% 39.0% Medium Easy 0.0014856636219477439 0.0023005704055949323 https://leetcode.com/problems/top-k-frequent-elements https://leetcode.com/problems/valid-parentheses
87 50 347 Pow(x;n) Top K Frequent Elements 30.3% 61.2% Medium Medium 0.0014016892647828818 0.0014856636219477439 https://leetcode.com/problems/powx-n https://leetcode.com/problems/top-k-frequent-elements
88 50 Pow(x;n) 30.3% Medium 0.0014016892647828818 https://leetcode.com/problems/powx-n