Files
LeetCode-Questions-CompanyWise/apple_6months.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

22 KiB

1IDTitleAcceptanceDifficultyFrequencyLeetcode Question Link
21095Find in Mountain Array35.8%Hard0.5901861366220961https://leetcode.com/problems/find-in-mountain-array
3284Peeking Iterator45.7%Medium0.540892616315496https://leetcode.com/problems/peeking-iterator
41Two Sum45.6%Easy0.5261466153527387https://leetcode.com/problems/two-sum
5391Perfect Rectangle30.5%Hard0.46850000514186985https://leetcode.com/problems/perfect-rectangle
6428Serialize and Deserialize N-ary Tree59.4%Hard0.41085339493100104https://leetcode.com/problems/serialize-and-deserialize-n-ary-tree
7146LRU Cache33.2%Medium0.3532067847201322https://leetcode.com/problems/lru-cache
81229Meeting Scheduler52.7%Medium0.2955601745092634https://leetcode.com/problems/meeting-scheduler
9981Time Based Key-Value Store53.1%Medium0.24353082235287765https://leetcode.com/problems/time-based-key-value-store
10295Find Median from Data Stream44.3%Hard0.24172686903184679https://leetcode.com/problems/find-median-from-data-stream
11212Word Search II34.9%Hard0.22101415243595443https://leetcode.com/problems/word-search-ii
124Median of Two Sorted Arrays29.6%Hard0.17519711082846595https://leetcode.com/problems/median-of-two-sorted-arrays
13341Flatten Nested List Iterator52.9%Medium0.16689882926772934https://leetcode.com/problems/flatten-nested-list-iterator
1453Maximum Subarray46.5%Easy0.16188416901715558https://leetcode.com/problems/maximum-subarray
15546Remove Boxes42.7%Hard0.14361551169114867https://leetcode.com/problems/remove-boxes
16836Rectangle Overlap48.6%Easy0.14261022668001652https://leetcode.com/problems/rectangle-overlap
17348Design Tic-Tac-Toe54.3%Medium0.14252878462127264https://leetcode.com/problems/design-tic-tac-toe
18200Number of Islands46.8%Medium0.13260852442964066https://leetcode.com/problems/number-of-islands
1949Group Anagrams56.9%Medium0.1285763065181971https://leetcode.com/problems/group-anagrams
202Add Two Numbers33.9%Medium0.12829971534891174https://leetcode.com/problems/add-two-numbers
21329Longest Increasing Path in a Matrix43.4%Hard0.11459264165812869https://leetcode.com/problems/longest-increasing-path-in-a-matrix
22311Sparse Matrix Multiplication61.9%Medium0.10648348040245009https://leetcode.com/problems/sparse-matrix-multiplication
23403Frog Jump39.7%Hard0.0998958412956442https://leetcode.com/problems/frog-jump
24658Find K Closest Elements40.9%Medium0.0995648587647672https://leetcode.com/problems/find-k-closest-elements
25609Find Duplicate File in System59.5%Medium0.09898183354885093https://leetcode.com/problems/find-duplicate-file-in-system
26837New 21 Game34.6%Medium0.09646026618756222https://leetcode.com/problems/new-21-game
2787Scramble String33.7%Hard0.09333193979221914https://leetcode.com/problems/scramble-string
28139Word Break40.1%Medium0.09308175178767038https://leetcode.com/problems/word-break
2936Valid Sudoku48.7%Medium0.08547738976568439https://leetcode.com/problems/valid-sudoku
3042Trapping Rain Water48.9%Hard0.08461041545209161https://leetcode.com/problems/trapping-rain-water
31688Knight Probability in Chessboard48.9%Medium0.08392620769993404https://leetcode.com/problems/knight-probability-in-chessboard
32909Snakes and Ladders38.4%Medium0.08392620769993404https://leetcode.com/problems/snakes-and-ladders
33636Exclusive Time of Functions52.0%Medium0.08155306616046964https://leetcode.com/problems/exclusive-time-of-functions
34729My Calendar I51.8%Medium0.0801854119192299https://leetcode.com/problems/my-calendar-i
3597Interleaving String31.5%Hard0.07948571541724253https://leetcode.com/problems/interleaving-string
36128Longest Consecutive Sequence45.1%Hard0.0786603197723907https://leetcode.com/problems/longest-consecutive-sequence
37269Alien Dictionary33.3%Hard0.0770322180463687https://leetcode.com/problems/alien-dictionary
38351Android Unlock Patterns48.4%Medium0.07197349962508924https://leetcode.com/problems/android-unlock-patterns
39632Smallest Range Covering Elements from K Lists52.4%Hard0.07082605256861242https://leetcode.com/problems/smallest-range-covering-elements-from-k-lists
40187Repeated DNA Sequences38.9%Medium0.06947237281476738https://leetcode.com/problems/repeated-dna-sequences
41178Rank Scores45.8%Medium0.06551667145414991https://leetcode.com/problems/rank-scores
4223Merge k Sorted Lists40.2%Hard0.06293239083543646https://leetcode.com/problems/merge-k-sorted-lists
43472Concatenated Words43.7%Hard0.06120196522807572https://leetcode.com/problems/concatenated-words
4448Rotate Image56.7%Medium0.06069974483040549https://leetcode.com/problems/rotate-image
4588Merge Sorted Array39.4%Easy0.059258174101133876https://leetcode.com/problems/merge-sorted-array
4654Spiral Matrix34.1%Medium0.05783815482970009https://leetcode.com/problems/spiral-matrix
47362Design Hit Counter63.7%Medium0.05622967649867821https://leetcode.com/problems/design-hit-counter
4856Merge Intervals39.3%Medium0.054167920212564245https://leetcode.com/problems/merge-intervals
491221Split a String in Balanced Strings83.3%Easy0.05362640133807673https://leetcode.com/problems/split-a-string-in-balanced-strings
501275Find Winner on a Tic Tac Toe Game52.8%Easy0.05292240145434251https://leetcode.com/problems/find-winner-on-a-tic-tac-toe-game
5112Integer to Roman55.1%Medium0.05217122936969127https://leetcode.com/problems/integer-to-roman
5214Longest Common Prefix35.4%Easy0.051846064173015856https://leetcode.com/problems/longest-common-prefix
53253Meeting Rooms II45.7%Medium0.04945628059066218https://leetcode.com/problems/meeting-rooms-ii
54388Longest Absolute File Path41.8%Medium0.04849434993861047https://leetcode.com/problems/longest-absolute-file-path
55238Product of Array Except Self60.1%Medium0.04711503937510501https://leetcode.com/problems/product-of-array-except-self
56453Minimum Moves to Equal Array Elements50.2%Easy0.04652001563489285https://leetcode.com/problems/minimum-moves-to-equal-array-elements
573Longest Substring Without Repeating Characters30.4%Medium0.04601922329309672https://leetcode.com/problems/longest-substring-without-repeating-characters
58223Rectangle Area37.8%Medium0.04598511324182338https://leetcode.com/problems/rectangle-area
5993Restore IP Addresses35.6%Medium0.04393092922572675https://leetcode.com/problems/restore-ip-addresses
60642Design Search Autocomplete System44.7%Hard0.04334372921647208https://leetcode.com/problems/design-search-autocomplete-system
61490The Maze51.4%Medium0.04287902305923364https://leetcode.com/problems/the-maze
62545Boundary of Binary Tree38.9%Medium0.04158603377810283https://leetcode.com/problems/boundary-of-binary-tree
63266Palindrome Permutation61.9%Easy0.04158603377810283https://leetcode.com/problems/palindrome-permutation
6437Sudoku Solver43.6%Hard0.040527833612118376https://leetcode.com/problems/sudoku-solver
65184Sum33.7%Medium0.03880215185647971https://leetcode.com/problems/4sum
66168Excel Sheet Column Title31.1%Easy0.03861483612777958https://leetcode.com/problems/excel-sheet-column-title
67202Happy Number50.4%Easy0.03853744444187023https://leetcode.com/problems/happy-number
68863All Nodes Distance K in Binary Tree55.4%Medium0.037756162417993476https://leetcode.com/problems/all-nodes-distance-k-in-binary-tree
6934Find First and Last Position of Element in Sorted Array36.2%Medium0.03759448672488506https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array
70206Reverse Linked List62.5%Easy0.03679633286058156https://leetcode.com/problems/reverse-linked-list
715Longest Palindromic Substring29.5%Medium0.035860192879893796https://leetcode.com/problems/longest-palindromic-substring
72886Possible Bipartition44.2%Medium0.034103901828857086https://leetcode.com/problems/possible-bipartition
73480Sliding Window Median37.2%Hard0.03373001037669306https://leetcode.com/problems/sliding-window-median
74102Binary Tree Level Order Traversal54.6%Medium0.03228400889291332https://leetcode.com/problems/binary-tree-level-order-traversal
75133Clone Graph34.8%Medium0.03215711163453134https://leetcode.com/problems/clone-graph
76177Nth Highest Salary31.4%Medium0.032054026290083464https://leetcode.com/problems/nth-highest-salary
77867Transpose Matrix62.8%Easy0.031179454774354007https://leetcode.com/problems/transpose-matrix
78179Largest Number28.8%Medium0.03093030069135863https://leetcode.com/problems/largest-number
7975Sort Colors47.3%Medium0.030801991570373215https://leetcode.com/problems/sort-colors
8013Roman to Integer55.7%Easy0.030443751414723153https://leetcode.com/problems/roman-to-integer
81415Add Strings47.5%Easy0.030009753867991852https://leetcode.com/problems/add-strings
82135Candy31.6%Hard0.029764101906453892https://leetcode.com/problems/candy
83297Serialize and Deserialize Binary Tree47.5%Hard0.028013036227673965https://leetcode.com/problems/serialize-and-deserialize-binary-tree
84518Coin Change 250.2%Medium0.027969505010125056https://leetcode.com/problems/coin-change-2
85227Basic Calculator II36.9%Medium0.027685557859864054https://leetcode.com/problems/basic-calculator-ii
86273Integer to English Words27.1%Hard0.026980053764546055https://leetcode.com/problems/integer-to-english-words
87986Interval List Intersections67.3%Medium0.026731618438329555https://leetcode.com/problems/interval-list-intersections
88931Minimum Falling Path Sum62.5%Medium0.02672169681715245https://leetcode.com/problems/minimum-falling-path-sum
89153Sum26.8%Medium0.02661031301111795https://leetcode.com/problems/3sum
90417Pacific Atlantic Water Flow41.1%Medium0.025975486403260657https://leetcode.com/problems/pacific-atlantic-water-flow
91143Reorder List37.1%Medium0.025870945598649286https://leetcode.com/problems/reorder-list
92283Move Zeroes57.8%Easy0.025673520193393074https://leetcode.com/problems/move-zeroes
93218The Skyline Problem34.6%Hard0.025479085300984906https://leetcode.com/problems/the-skyline-problem
94733Flood Fill55.3%Easy0.02506396866321625https://leetcode.com/problems/flood-fill
95140Word Break II32.6%Hard0.024104005752813337https://leetcode.com/problems/word-break-ii
9631Next Permutation32.6%Medium0.023747034562878154https://leetcode.com/problems/next-permutation
978String to Integer (atoi)15.4%Medium0.023470848345506903https://leetcode.com/problems/string-to-integer-atoi
98198House Robber42.0%Easy0.023256862164267263https://leetcode.com/problems/house-robber
99647Palindromic Substrings60.6%Medium0.023250853650202817https://leetcode.com/problems/palindromic-substrings
10025Reverse Nodes in k-Group42.1%Hard0.022832042042645793https://leetcode.com/problems/reverse-nodes-in-k-group
101622Design Circular Queue43.7%Medium0.02246023667974994https://leetcode.com/problems/design-circular-queue
102108Convert Sorted Array to Binary Search Tree57.9%Easy0.022033389270751453https://leetcode.com/problems/convert-sorted-array-to-binary-search-tree
103287Find the Duplicate Number55.5%Medium0.021825992579766168https://leetcode.com/problems/find-the-duplicate-number
104359Logger Rate Limiter70.8%Easy0.021053409197832343https://leetcode.com/problems/logger-rate-limiter
105670Maximum Swap43.6%Medium0.020844944430365928https://leetcode.com/problems/maximum-swap
10633Search in Rotated Sorted Array34.5%Medium0.0200182839715896https://leetcode.com/problems/search-in-rotated-sorted-array
107525Contiguous Array42.8%Medium0.01975372873623256https://leetcode.com/problems/contiguous-array
108268Missing Number51.7%Easy0.019380451549662482https://leetcode.com/problems/missing-number
109669Trim a Binary Search Tree63.0%Easy0.019139340210697423https://leetcode.com/problems/trim-a-binary-search-tree
110515Find Largest Value in Each Tree Row61.1%Medium0.019093658815579673https://leetcode.com/problems/find-largest-value-in-each-tree-row
111121Best Time to Buy and Sell Stock50.5%Easy0.018954919107260947https://leetcode.com/problems/best-time-to-buy-and-sell-stock
112617Merge Two Binary Trees74.1%Easy0.018496211633622316https://leetcode.com/problems/merge-two-binary-trees
113394Decode String50.0%Medium0.0182820448374491https://leetcode.com/problems/decode-string
114126Word Ladder II22.1%Hard0.017994187717865196https://leetcode.com/problems/word-ladder-ii
11554201 Matrix39.8%Medium0.01796993548494071https://leetcode.com/problems/01-matrix
116706Design HashMap61.3%Easy0.01752893260576219https://leetcode.com/problems/design-hashmap
117163Sum Closest46.0%Medium0.016854331554982106https://leetcode.com/problems/3sum-closest
11846Permutations63.5%Medium0.016759583649075344https://leetcode.com/problems/permutations
119387First Unique Character in a String53.4%Easy0.016637588725633846https://leetcode.com/problems/first-unique-character-in-a-string
1207Reverse Integer25.8%Easy0.016627790608488954https://leetcode.com/problems/reverse-integer
121242Valid Anagram56.9%Easy0.016513947375674708https://leetcode.com/problems/valid-anagram
122509Fibonacci Number67.2%Easy0.01593518138579736https://leetcode.com/problems/fibonacci-number
123125Valid Palindrome36.7%Easy0.01582781088607703https://leetcode.com/problems/valid-palindrome
12459Spiral Matrix II53.9%Medium0.01579187969789165https://leetcode.com/problems/spiral-matrix-ii
12586Partition List41.5%Medium0.01578564744229187https://leetcode.com/problems/partition-list
1261002Find Common Characters67.6%Easy0.015273301861833809https://leetcode.com/problems/find-common-characters
127528Random Pick with Weight43.9%Medium0.014831565905995232https://leetcode.com/problems/random-pick-with-weight
12841First Missing Positive32.0%Hard0.014368063266920193https://leetcode.com/problems/first-missing-positive
129371Sum of Two Integers50.7%Medium0.014064929467403538https://leetcode.com/problems/sum-of-two-integers
13021Merge Two Sorted Lists53.5%Easy0.014012111332134735https://leetcode.com/problems/merge-two-sorted-lists
131443String Compression41.3%Easy0.01390843004613198https://leetcode.com/problems/string-compression
132141Linked List Cycle41.1%Easy0.01390238743679306https://leetcode.com/problems/linked-list-cycle
133703Kth Largest Element in a Stream49.7%Easy0.013898764390814973https://leetcode.com/problems/kth-largest-element-in-a-stream
134332Reconstruct Itinerary36.7%Medium0.013755375068485329https://leetcode.com/problems/reconstruct-itinerary
135767Reorganize String48.7%Medium0.01329806830463147https://leetcode.com/problems/reorganize-string
136120Triangle44.2%Medium0.013236460625830901https://leetcode.com/problems/triangle
13782Remove Duplicates from Sorted List II36.8%Medium0.01297035044262745https://leetcode.com/problems/remove-duplicates-from-sorted-list-ii
13877Combinations54.7%Medium0.01255115315451512https://leetcode.com/problems/combinations
139167Two Sum II - Input array is sorted54.1%Easy0.012349223898473458https://leetcode.com/problems/two-sum-ii-input-array-is-sorted
140445Add Two Numbers II54.5%Medium0.01233061245747872https://leetcode.com/problems/add-two-numbers-ii
141442Find All Duplicates in an Array67.8%Medium0.011675555865241341https://leetcode.com/problems/find-all-duplicates-in-an-array
142136Single Number65.5%Easy0.011429512235126808https://leetcode.com/problems/single-number
143232Implement Queue using Stacks49.6%Easy0.011242389348933884https://leetcode.com/problems/implement-queue-using-stacks
144171Excel Sheet Column Number55.9%Easy0.011195191092491645https://leetcode.com/problems/excel-sheet-column-number
145104Maximum Depth of Binary Tree66.0%Easy0.011105055822701604https://leetcode.com/problems/maximum-depth-of-binary-tree
146155Min Stack44.5%Easy0.010653509851791077https://leetcode.com/problems/min-stack
147211Add and Search Word - Data structure design38.1%Medium0.010438508143923443https://leetcode.com/problems/add-and-search-word-data-structure-design
148234Palindrome Linked List39.3%Easy0.010171877938733932https://leetcode.com/problems/palindrome-linked-list
149221Maximal Square37.7%Medium0.00988638798855515https://leetcode.com/problems/maximal-square
15022Generate Parentheses62.7%Medium0.009785877810632554https://leetcode.com/problems/generate-parentheses
15147Permutations II46.4%Medium0.009673594178378379https://leetcode.com/problems/permutations-ii
152905Sort Array By Parity74.1%Easy0.009603915354180344https://leetcode.com/problems/sort-array-by-parity
153151Reverse Words in a String21.9%Medium0.009570916441992467https://leetcode.com/problems/reverse-words-in-a-string
15445Jump Game II30.6%Hard0.009546611883579968https://leetcode.com/problems/jump-game-ii
155347Top K Frequent Elements61.2%Medium0.009249390740121013https://leetcode.com/problems/top-k-frequent-elements
15643Multiply Strings33.9%Medium0.009145011150062768https://leetcode.com/problems/multiply-strings
15732Longest Valid Parentheses28.4%Hard0.009111680351255843https://leetcode.com/problems/longest-valid-parentheses
158322Coin Change35.5%Medium0.00904437880665999https://leetcode.com/problems/coin-change
15928Implement strStr()34.5%Easy0.008850485542574548https://leetcode.com/problems/implement-strstr
160215Kth Largest Element in an Array55.4%Medium0.008759180089881562https://leetcode.com/problems/kth-largest-element-in-an-array
161977Squares of a Sorted Array72.1%Easy0.008733679968754604https://leetcode.com/problems/squares-of-a-sorted-array
162153Find Minimum in Rotated Sorted Array45.1%Medium0.008430963288799368https://leetcode.com/problems/find-minimum-in-rotated-sorted-array
163239Sliding Window Maximum43.0%Hard0.007898935224534491https://leetcode.com/problems/sliding-window-maximum
164175Combine Two Tables60.8%Easy0.007696786120491369https://leetcode.com/problems/combine-two-tables
165240Search a 2D Matrix II43.2%Medium0.0075829747244553335https://leetcode.com/problems/search-a-2d-matrix-ii
166692Top K Frequent Words51.8%Medium0.007516006820935329https://leetcode.com/problems/top-k-frequent-words
167191Number of 1 Bits49.8%Easy0.007472480128219255https://leetcode.com/problems/number-of-1-bits
168176Second Highest Salary31.6%Easy0.007393749024938284https://leetcode.com/problems/second-highest-salary
169344Reverse String68.5%Easy0.00734157796234515https://leetcode.com/problems/reverse-string
17073Set Matrix Zeroes43.1%Medium0.0070151111959223245https://leetcode.com/problems/set-matrix-zeroes
171114Flatten Binary Tree to Linked List49.3%Medium0.006896579059060353https://leetcode.com/problems/flatten-binary-tree-to-linked-list
17211Container With Most Water50.8%Medium0.006889188300412141https://leetcode.com/problems/container-with-most-water
173448Find All Numbers Disappeared in an Array55.9%Easy0.006863444924982415https://leetcode.com/problems/find-all-numbers-disappeared-in-an-array
1749Palindrome Number48.4%Easy0.006822343017166543https://leetcode.com/problems/palindrome-number
17529Divide Two Integers16.4%Medium0.006772799340092467https://leetcode.com/problems/divide-two-integers
176118Pascal's Triangle52.5%Easy0.006749941254175012https://leetcode.com/problems/pascals-triangle
177142Linked List Cycle II37.3%Medium0.006564934131150057https://leetcode.com/problems/linked-list-cycle-ii
17883Remove Duplicates from Sorted List45.4%Easy0.006353261522609498https://leetcode.com/problems/remove-duplicates-from-sorted-list
179162Find Peak Element43.3%Medium0.006350235659345837https://leetcode.com/problems/find-peak-element
18076Minimum Window Substring34.6%Hard0.006231520398723243https://leetcode.com/problems/minimum-window-substring
18124Swap Nodes in Pairs50.4%Medium0.0062218275061505365https://leetcode.com/problems/swap-nodes-in-pairs
182127Word Ladder29.6%Medium0.005979091056058075https://leetcode.com/problems/word-ladder
183973K Closest Points to Origin63.8%Medium0.005773688094426333https://leetcode.com/problems/k-closest-points-to-origin
18439Combination Sum56.1%Medium0.005715934396440999https://leetcode.com/problems/combination-sum
185124Binary Tree Maximum Path Sum34.3%Hard0.005531752454833179https://leetcode.com/problems/binary-tree-maximum-path-sum
186226Invert Binary Tree65.0%Easy0.005508138409792252https://leetcode.com/problems/invert-binary-tree
187300Longest Increasing Subsequence42.6%Medium0.005264555460003242https://leetcode.com/problems/longest-increasing-subsequence
188350Intersection of Two Arrays II51.4%Easy0.005210380421193978https://leetcode.com/problems/intersection-of-two-arrays-ii
189236Lowest Common Ancestor of a Binary Tree45.7%Medium0.004714210262726446https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree
190169Majority Element58.7%Easy0.004706444738837472https://leetcode.com/problems/majority-element
19135Search Insert Position42.6%Easy0.004646848510375352https://leetcode.com/problems/search-insert-position
19217Letter Combinations of a Phone Number46.8%Medium0.0044018999217624675https://leetcode.com/problems/letter-combinations-of-a-phone-number
193210Course Schedule II40.7%Medium0.0042893974831731225https://leetcode.com/problems/course-schedule-ii
194190Reverse Bits39.8%Easy0.004116549745909879https://leetcode.com/problems/reverse-bits
195103Binary Tree Zigzag Level Order Traversal48.3%Medium0.003839922800048048https://leetcode.com/problems/binary-tree-zigzag-level-order-traversal
19667Add Binary45.2%Easy0.003735684238128885https://leetcode.com/problems/add-binary
19778Subsets62.0%Medium0.00368765975195334https://leetcode.com/problems/subsets
19870Climbing Stairs47.8%Easy0.00339085548316782https://leetcode.com/problems/climbing-stairs
199122Best Time to Buy and Sell Stock II57.0%Easy0.0033545821461532107https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii
20066Plus One43.0%Easy0.00326211347832938https://leetcode.com/problems/plus-one
20120Valid Parentheses39.0%Easy0.0023005704055949323https://leetcode.com/problems/valid-parentheses
202260Single Number III64.3%Medium0.0020288097849578786https://leetcode.com/problems/single-number-iii
20326Remove Duplicates from Sorted Array45.1%Easy0.0019513153174351963https://leetcode.com/problems/remove-duplicates-from-sorted-array
20479Word Search35.6%Medium0.0016647248725526849https://leetcode.com/problems/word-search