Files
LeetCode-Questions-CompanyWise/oracle_1year.csv
Krishna Kumar Dey fb5f78b55e 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)

```
2023-04-01 11:07:49 +05:30

20 KiB

1IDTitleAcceptanceDifficultyFrequencyLeetcode Question Link
2554Brick Wall50.0%Medium0.5628369978035019https://leetcode.com/problems/brick-wall
3352Data Stream as Disjoint Intervals47.3%Hard0.4990377527312547https://leetcode.com/problems/data-stream-as-disjoint-intervals
4362Design Hit Counter63.7%Medium0.4137338521213525https://leetcode.com/problems/design-hit-counter
5146LRU Cache33.2%Medium0.32842995151145027https://leetcode.com/problems/lru-cache
6425Word Squares47.7%Hard0.24312605090154807https://leetcode.com/problems/word-squares
7403Frog Jump39.7%Hard0.21218417576199058https://leetcode.com/problems/frog-jump
8706Design HashMap61.3%Easy0.1960785423771685https://leetcode.com/problems/design-hashmap
9253Meeting Rooms II45.7%Medium0.18465102561460048https://leetcode.com/problems/meeting-rooms-ii
1023Merge k Sorted Lists40.2%Hard0.18142464262604538https://leetcode.com/problems/merge-k-sorted-lists
11636Exclusive Time of Functions51.9%Medium0.17494800586305592https://leetcode.com/problems/exclusive-time-of-functions
12415Add Strings47.5%Easy0.17429245611868044https://leetcode.com/problems/add-strings
1356Merge Intervals39.3%Medium0.1574006175650271https://leetcode.com/problems/merge-intervals
14450Delete Node in a BST43.1%Medium0.15561959910053247https://leetcode.com/problems/delete-node-in-a-bst
151242Web Crawler Multithreaded45.9%Medium0.14953173397096375https://leetcode.com/problems/web-crawler-multithreaded
16227Basic Calculator II36.9%Medium0.14222709959207652https://leetcode.com/problems/basic-calculator-ii
171044Longest Duplicate Substring31.9%Hard0.1351378186727963https://leetcode.com/problems/longest-duplicate-substring
18297Serialize and Deserialize Binary Tree47.5%Hard0.13437443205326582https://leetcode.com/problems/serialize-and-deserialize-binary-tree
19200Number of Islands46.8%Medium0.13260852442964066https://leetcode.com/problems/number-of-islands
20692Top K Frequent Words51.8%Medium0.1139616691735821https://leetcode.com/problems/top-k-frequent-words
211188Design Bounded Blocking Queue70.5%Medium0.11030454201470608https://leetcode.com/problems/design-bounded-blocking-queue
22230Kth Smallest Element in a BST60.2%Medium0.09685471541555685https://leetcode.com/problems/kth-smallest-element-in-a-bst
2375Sort Colors47.3%Medium0.09653792704264727https://leetcode.com/problems/sort-colors
24394Decode String50.0%Medium0.09572009987565212https://leetcode.com/problems/decode-string
251236Web Crawler64.3%Medium0.09531017980432487https://leetcode.com/problems/web-crawler
2633Search in Rotated Sorted Array34.5%Medium0.09336717401169674https://leetcode.com/problems/search-in-rotated-sorted-array
27545Boundary of Binary Tree38.9%Medium0.091248671465145https://leetcode.com/problems/boundary-of-binary-tree
28722Remove Comments34.6%Medium0.08890352514166767https://leetcode.com/problems/remove-comments
29380Insert Delete GetRandom O(1)47.5%Medium0.08509738264123867https://leetcode.com/problems/insert-delete-getrandom-o1
301212Team Scores in Football Tournament55.8%Medium0.08269171584511335https://leetcode.com/problems/team-scores-in-football-tournament
3154Spiral Matrix34.1%Medium0.07792846120043545https://leetcode.com/problems/spiral-matrix
32599Minimum Index Sum of Two Lists50.7%Easy0.0753494372417868https://leetcode.com/problems/minimum-index-sum-of-two-lists
33138Copy List with Random Pointer36.4%Medium0.07332029537109397https://leetcode.com/problems/copy-list-with-random-pointer
34505The Maze II47.7%Medium0.07133147800542972https://leetcode.com/problems/the-maze-ii
35232Implement Queue using Stacks49.6%Easy0.06827657958623828https://leetcode.com/problems/implement-queue-using-stacks
36349Intersection of Two Arrays62.5%Easy0.06343503822912192https://leetcode.com/problems/intersection-of-two-arrays
3773Set Matrix Zeroes43.1%Medium0.061431799532484045https://leetcode.com/problems/set-matrix-zeroes
38238Product of Array Except Self60.1%Medium0.061105194807639235https://leetcode.com/problems/product-of-array-except-self
391170Compare Strings by Frequency of the Smallest Character58.7%Easy0.060901617340111645https://leetcode.com/problems/compare-strings-by-frequency-of-the-smallest-character
40305Number of Islands II40.1%Hard0.06007812394328337https://leetcode.com/problems/number-of-islands-ii
411190Reverse Substrings Between Each Pair of Parentheses61.5%Medium0.06007812394328337https://leetcode.com/problems/reverse-substrings-between-each-pair-of-parentheses
42355Design Twitter30.3%Medium0.05824061998094904https://leetcode.com/problems/design-twitter
43741Cherry Pickup33.9%Hard0.056512210263342307https://leetcode.com/problems/cherry-pickup
4453Maximum Subarray46.5%Easy0.052816160704876255https://leetcode.com/problems/maximum-subarray
45894All Possible Full Binary Trees75.2%Medium0.052436651273043935https://leetcode.com/problems/all-possible-full-binary-trees
46173Binary Search Tree Iterator56.6%Medium0.0519111767751893https://leetcode.com/problems/binary-search-tree-iterator
47449Serialize and Deserialize BST52.0%Medium0.049844204077291364https://leetcode.com/problems/serialize-and-deserialize-bst
48609Find Duplicate File in System59.5%Medium0.045205436768046794https://leetcode.com/problems/find-duplicate-file-in-system
49535Encode and Decode TinyURL79.9%Medium0.041978881338661234https://leetcode.com/problems/encode-and-decode-tinyurl
50503Next Greater Element II56.5%Medium0.041944638750466105https://leetcode.com/problems/next-greater-element-ii
51236Lowest Common Ancestor of a Binary Tree45.7%Medium0.041648587234261826https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree
5292Reverse Linked List II38.8%Medium0.041073535208287514https://leetcode.com/problems/reverse-linked-list-ii
53243Shortest Word Distance61.0%Easy0.040780370344928096https://leetcode.com/problems/shortest-word-distance
54652Find Duplicate Subtrees50.2%Medium0.040573516447166516https://leetcode.com/problems/find-duplicate-subtrees
5537Sudoku Solver43.6%Hard0.040527833612118376https://leetcode.com/problems/sudoku-solver
56126Word Ladder II22.1%Hard0.04004093605556132https://leetcode.com/problems/word-ladder-ii
571Two Sum45.6%Easy0.03943855709894935https://leetcode.com/problems/two-sum
58863All Nodes Distance K in Binary Tree55.4%Medium0.037756162417993476https://leetcode.com/problems/all-nodes-distance-k-in-binary-tree
5920Valid Parentheses39.0%Easy0.03618871742239114https://leetcode.com/problems/valid-parentheses
6043Multiply Strings33.9%Medium0.03608871558298825https://leetcode.com/problems/multiply-strings
61139Word Break40.1%Medium0.03451593709018879https://leetcode.com/problems/word-break
6212Integer to Roman55.1%Medium0.03370158881097552https://leetcode.com/problems/integer-to-roman
63121Best Time to Buy and Sell Stock50.5%Easy0.033453179586686504https://leetcode.com/problems/best-time-to-buy-and-sell-stock
64694Number of Distinct Islands56.0%Medium0.03278982282299087https://leetcode.com/problems/number-of-distinct-islands
651197Minimum Knight Moves36.1%Medium0.02969780239174205https://leetcode.com/problems/minimum-knight-moves
66767Reorganize String48.7%Medium0.02967576814611661https://leetcode.com/problems/reorganize-string
67155Min Stack44.5%Easy0.029317296678520607https://leetcode.com/problems/min-stack
68456132 Pattern28.9%Medium0.029306126585499394https://leetcode.com/problems/132-pattern
6957Insert Interval33.5%Hard0.02927990558056596https://leetcode.com/problems/insert-interval
70116Populating Next Right Pointers in Each Node45.2%Medium0.02902961467511413https://leetcode.com/problems/populating-next-right-pointers-in-each-node
71204Count Primes31.5%Easy0.02799343042200216https://leetcode.com/problems/count-primes
72114Flatten Binary Tree to Linked List49.3%Medium0.02730545069026746https://leetcode.com/problems/flatten-binary-tree-to-linked-list
7321Merge Two Sorted Lists53.5%Easy0.02728150490352749https://leetcode.com/problems/merge-two-sorted-lists
7417Letter Combinations of a Phone Number46.8%Medium0.027199239804368825https://leetcode.com/problems/letter-combinations-of-a-phone-number
7542Trapping Rain Water48.9%Hard0.02688623073425064https://leetcode.com/problems/trapping-rain-water
761305All Elements in Two Binary Search Trees76.1%Medium0.026282721799194744https://leetcode.com/problems/all-elements-in-two-binary-search-trees
7734Find First and Last Position of Element in Sorted Array36.2%Medium0.026256496787488606https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array
7841First Missing Positive32.0%Hard0.02540222313806603https://leetcode.com/problems/first-missing-positive
79125Valid Palindrome36.7%Easy0.02462208292471368https://leetcode.com/problems/valid-palindrome
80836Rectangle Overlap48.6%Easy0.024228925974379843https://leetcode.com/problems/rectangle-overlap
814Median of Two Sorted Arrays29.6%Hard0.024130115852798662https://leetcode.com/problems/median-of-two-sorted-arrays
82127Word Ladder29.6%Medium0.023704813655166343https://leetcode.com/problems/word-ladder
83844Backspace String Compare46.4%Easy0.0235551325028849https://leetcode.com/problems/backspace-string-compare
84973K Closest Points to Origin63.8%Medium0.022897394173017796https://leetcode.com/problems/k-closest-points-to-origin
85622Design Circular Queue43.8%Medium0.02246023667974994https://leetcode.com/problems/design-circular-queue
86981Time Based Key-Value Store53.1%Medium0.02226024024151985https://leetcode.com/problems/time-based-key-value-store
87113Path Sum II46.7%Medium0.021882711249507664https://leetcode.com/problems/path-sum-ii
88958Check Completeness of a Binary Tree52.1%Medium0.021763644636359686https://leetcode.com/problems/check-completeness-of-a-binary-tree
89543Diameter of Binary Tree48.4%Easy0.02105617995251665https://leetcode.com/problems/diameter-of-binary-tree
9094Binary Tree Inorder Traversal63.3%Medium0.020787312070811408https://leetcode.com/problems/binary-tree-inorder-traversal
9132Longest Valid Parentheses28.4%Hard0.020385756924473915https://leetcode.com/problems/longest-valid-parentheses
925Longest Palindromic Substring29.5%Medium0.020329346568668867https://leetcode.com/problems/longest-palindromic-substring
93341Flatten Nested List Iterator52.9%Medium0.019980684690483426https://leetcode.com/problems/flatten-nested-list-iterator
94207Course Schedule43.1%Medium0.019709926055136454https://leetcode.com/problems/course-schedule
95721Accounts Merge48.8%Medium0.01888630262874805https://leetcode.com/problems/accounts-merge
96209Minimum Size Subarray Sum38.2%Medium0.018832948333092125https://leetcode.com/problems/minimum-size-subarray-sum
97965Univalued Binary Tree67.7%Easy0.018665964249802672https://leetcode.com/problems/univalued-binary-tree
981008Construct Binary Search Tree from Preorder Traversal78.4%Medium0.01844220088035248https://leetcode.com/problems/construct-binary-search-tree-from-preorder-traversal
99347Top K Frequent Elements61.2%Medium0.018049036874660983https://leetcode.com/problems/top-k-frequent-elements
100314Binary Tree Vertical Order Traversal45.3%Medium0.018010392274465332https://leetcode.com/problems/binary-tree-vertical-order-traversal
10138Count and Say44.6%Easy0.01753063983505879https://leetcode.com/problems/count-and-say
102289Game of Life54.5%Medium0.0173239499317743https://leetcode.com/problems/game-of-life
103402Remove K Digits28.4%Medium0.016863806052004816https://leetcode.com/problems/remove-k-digits
104242Valid Anagram56.9%Easy0.016513947375674708https://leetcode.com/problems/valid-anagram
10551N-Queens46.6%Hard0.016393809775676407https://leetcode.com/problems/n-queens
10671Simplify Path32.6%Medium0.016260520871780308https://leetcode.com/problems/simplify-path
107322Coin Change35.5%Medium0.016022774188122292https://leetcode.com/problems/coin-change
108938Range Sum of BST81.3%Easy0.015707129205357877https://leetcode.com/problems/range-sum-of-bst
10949Group Anagrams56.9%Medium0.01513031227798415https://leetcode.com/problems/group-anagrams
110206Reverse Linked List62.5%Easy0.01453513961911317https://leetcode.com/problems/reverse-linked-list
111150Evaluate Reverse Polish Notation36.3%Medium0.01413451093490476https://leetcode.com/problems/evaluate-reverse-polish-notation
11276Minimum Window Substring34.6%Hard0.013966707481708198https://leetcode.com/problems/minimum-window-substring
113179Largest Number28.8%Medium0.013865040137171665https://leetcode.com/problems/largest-number
11413Roman to Integer55.7%Easy0.013645103403569418https://leetcode.com/problems/roman-to-integer
115496Next Greater Element I63.8%Easy0.013201511858535894https://leetcode.com/problems/next-greater-element-i
1161047Remove All Adjacent Duplicates In String68.6%Easy0.013059277989179281https://leetcode.com/problems/remove-all-adjacent-duplicates-in-string
117695Max Area of Island62.7%Medium0.012686500631003836https://leetcode.com/problems/max-area-of-island
118445Add Two Numbers II54.5%Medium0.01233061245747872https://leetcode.com/problems/add-two-numbers-ii
119112Path Sum41.2%Easy0.012265076074932503https://leetcode.com/problems/path-sum
120437Path Sum III47.2%Medium0.012128711446614806https://leetcode.com/problems/path-sum-iii
121273Integer to English Words27.1%Hard0.012081089250339716https://leetcode.com/problems/integer-to-english-words
12288Merge Sorted Array39.4%Easy0.011986958032982505https://leetcode.com/problems/merge-sorted-array
123986Interval List Intersections67.3%Medium0.011969023795320735https://leetcode.com/problems/interval-list-intersections
124300Longest Increasing Subsequence42.6%Medium0.011806512586989004https://leetcode.com/problems/longest-increasing-subsequence
12598Validate Binary Search Tree27.8%Medium0.01172346369605921https://leetcode.com/problems/validate-binary-search-tree
126264Ugly Number II42.0%Medium0.011604423810414601https://leetcode.com/problems/ugly-number-ii
127205Isomorphic Strings39.8%Easy0.011544139746865315https://leetcode.com/problems/isomorphic-strings
128283Move Zeroes57.8%Easy0.01149190266804209https://leetcode.com/problems/move-zeroes
1292Add Two Numbers33.9%Medium0.010507388732168088https://leetcode.com/problems/add-two-numbers
13062Unique Paths54.1%Medium0.010367562048856941https://leetcode.com/problems/unique-paths
131819Most Common Word44.8%Easy0.010269666637456105https://leetcode.com/problems/most-common-word
13246Permutations63.5%Medium0.009461803137288448https://leetcode.com/problems/permutations
133208Implement Trie (Prefix Tree)49.4%Medium0.009105457856626612https://leetcode.com/problems/implement-trie-prefix-tree
134153Sum26.8%Medium0.00876717944353383https://leetcode.com/problems/3sum
135215Kth Largest Element in an Array55.4%Medium0.008759180089881562https://leetcode.com/problems/kth-largest-element-in-an-array
136617Merge Two Binary Trees74.1%Easy0.008262802639833214https://leetcode.com/problems/merge-two-binary-trees
137235Lowest Common Ancestor of a Binary Search Tree49.9%Easy0.00821697310228087https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree
138438Find All Anagrams in a String43.3%Medium0.008126822460497498https://leetcode.com/problems/find-all-anagrams-in-a-string
139239Sliding Window Maximum43.0%Hard0.007898935224534491https://leetcode.com/problems/sliding-window-maximum
140141Linked List Cycle41.1%Easy0.007843861028908454https://leetcode.com/problems/linked-list-cycle
14126Remove Duplicates from Sorted Array45.1%Easy0.007782518973063169https://leetcode.com/problems/remove-duplicates-from-sorted-array
142101Symmetric Tree46.8%Easy0.007646596306528098https://leetcode.com/problems/symmetric-tree
143876Middle of the Linked List68.4%Easy0.007624893975696915https://leetcode.com/problems/middle-of-the-linked-list
144240Search a 2D Matrix II43.2%Medium0.0075829747244553335https://leetcode.com/problems/search-a-2d-matrix-ii
145344Reverse String68.5%Easy0.00734157796234515https://leetcode.com/problems/reverse-string
14636Valid Sudoku48.7%Medium0.007258242715805398https://leetcode.com/problems/valid-sudoku
14710Regular Expression Matching26.8%Hard0.0071865203293987245https://leetcode.com/problems/regular-expression-matching
148412Fizz Buzz62.3%Easy0.007165921026143679https://leetcode.com/problems/fizz-buzz
149136Single Number65.5%Easy0.006445166968713385https://leetcode.com/problems/single-number
15024Swap Nodes in Pairs50.4%Medium0.0062218275061505365https://leetcode.com/problems/swap-nodes-in-pairs
15191Decode Ways24.7%Medium0.005968385368349129https://leetcode.com/problems/decode-ways
152199Binary Tree Right Side View54.1%Medium0.0056826406650506926https://leetcode.com/problems/binary-tree-right-side-view
153105Construct Binary Tree from Preorder and Inorder Traversal48.8%Medium0.005628268691614718https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal
15450Pow(x;n)30.3%Medium0.0055950070772402055https://leetcode.com/problems/powx-n
155108Convert Sorted Array to Binary Search Tree57.9%Easy0.005554027051374908https://leetcode.com/problems/convert-sorted-array-to-binary-search-tree
15655Jump Game34.6%Medium0.005022612266291382https://leetcode.com/problems/jump-game
157160Intersection of Two Linked Lists40.6%Easy0.004901369939720486https://leetcode.com/problems/intersection-of-two-linked-lists
158169Majority Element58.7%Easy0.004706444738837472https://leetcode.com/problems/majority-element
1597Reverse Integer25.8%Easy0.00418293972984512https://leetcode.com/problems/reverse-integer
16028Implement strStr()34.5%Easy0.003943222775040032https://leetcode.com/problems/implement-strstr
161977Squares of a Sorted Array72.1%Easy0.003891055492966611https://leetcode.com/problems/squares-of-a-sorted-array
162217Contains Duplicate56.0%Easy0.0037979536727587773https://leetcode.com/problems/contains-duplicate
1638String to Integer (atoi)15.4%Medium0.0037925521897059712https://leetcode.com/problems/string-to-integer-atoi
164153Find Minimum in Rotated Sorted Array45.1%Medium0.0037558729598054378https://leetcode.com/problems/find-minimum-in-rotated-sorted-array
1653Longest Substring Without Repeating Characters30.4%Medium0.003496778759264278https://leetcode.com/problems/longest-substring-without-repeating-characters
166151Reverse Words in a String21.9%Medium0.003456091915988908https://leetcode.com/problems/reverse-words-in-a-string
16770Climbing Stairs47.8%Easy0.00339085548316782https://leetcode.com/problems/climbing-stairs
168122Best Time to Buy and Sell Stock II57.0%Easy0.0033545821461532107https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii
16914Longest Common Prefix35.4%Easy0.003320331762984143https://leetcode.com/problems/longest-common-prefix
17019Remove Nth Node From End of List35.2%Medium0.003076452203393495https://leetcode.com/problems/remove-nth-node-from-end-of-list
1719Palindrome Number48.4%Easy0.0030379001110948244https://leetcode.com/problems/palindrome-number
172140Word Break II32.6%Hard0.0027070942357783584https://leetcode.com/problems/word-break-ii
173621Task Scheduler50.1%Medium0.002341784338144407https://leetcode.com/problems/task-scheduler
174210Course Schedule II40.7%Medium0.0019086707135282834https://leetcode.com/problems/course-schedule-ii
17579Word Search35.6%Medium0.0016647248725526849https://leetcode.com/problems/word-search