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

15 KiB

1IDTitleAcceptanceDifficultyFrequencyLeetcode Question Link
21Two Sum45.6%Easy0.3464144405513164https://leetcode.com/problems/two-sum
32Add Two Numbers33.9%Medium0.303844163691924https://leetcode.com/problems/add-two-numbers
421Merge Two Sorted Lists53.5%Easy0.2612738868325316https://leetcode.com/problems/merge-two-sorted-lists
51096Brace Expansion II62.2%Hard0.2363887780642304https://leetcode.com/problems/brace-expansion-ii
6741Cherry Pickup33.9%Hard0.20909179785855941https://leetcode.com/problems/cherry-pickup
75Longest Palindromic Substring29.5%Medium0.18726302339313927https://leetcode.com/problems/longest-palindromic-substring
83Longest Substring Without Repeating Characters30.4%Medium0.14469274653374686https://leetcode.com/problems/longest-substring-without-repeating-characters
982Remove Duplicates from Sorted List II36.8%Medium0.1110882064011508https://leetcode.com/problems/remove-duplicates-from-sorted-list-ii
10274H-Index36.1%Medium0.07416907257227875https://leetcode.com/problems/h-index
11706Design HashMap61.3%Easy0.0683442674369718https://leetcode.com/problems/design-hashmap
1222Generate Parentheses62.7%Medium0.06759329113252818https://leetcode.com/problems/generate-parentheses
13115Distinct Subsequences38.3%Hard0.061494781607806234https://leetcode.com/problems/distinct-subsequences
14739Daily Temperatures63.3%Medium0.06111383323222972https://leetcode.com/problems/daily-temperatures
15420Strong Password Checker14.0%Hard0.061087691979838175https://leetcode.com/problems/strong-password-checker
16218The Skyline Problem34.6%Hard0.0564413109049518https://leetcode.com/problems/the-skyline-problem
1776Minimum Window Substring34.6%Hard0.05473322196089386https://leetcode.com/problems/minimum-window-substring
18728Self Dividing Numbers74.3%Easy0.054658412537864055https://leetcode.com/problems/self-dividing-numbers
19153Sum26.8%Medium0.05357467464947331https://leetcode.com/problems/3sum
20206Reverse Linked List62.5%Easy0.046346967254127305https://leetcode.com/problems/reverse-linked-list
21725Split Linked List in Parts52.2%Medium0.04603804920255727https://leetcode.com/problems/split-linked-list-in-parts
2253Maximum Subarray46.5%Easy0.04299340685592046https://leetcode.com/problems/maximum-subarray
2337Sudoku Solver43.6%Hard0.040527833612118376https://leetcode.com/problems/sudoku-solver
2425Reverse Nodes in k-Group42.1%Hard0.040236757867738004https://leetcode.com/problems/reverse-nodes-in-k-group
25202Happy Number50.4%Easy0.03853744444187023https://leetcode.com/problems/happy-number
2642Trapping Rain Water48.9%Hard0.038490960607653675https://leetcode.com/problems/trapping-rain-water
27560Subarray Sum Equals K43.9%Medium0.037871360699521406https://leetcode.com/problems/subarray-sum-equals-k
287Reverse Integer25.8%Easy0.03703110993069894https://leetcode.com/problems/reverse-integer
2931Next Permutation32.6%Medium0.03686102113159897https://leetcode.com/problems/next-permutation
3074Search a 2D Matrix36.5%Medium0.03685354875882915https://leetcode.com/problems/search-a-2d-matrix
314Median of Two Sorted Arrays29.6%Hard0.034565653112280895https://leetcode.com/problems/median-of-two-sorted-arrays
32214Shortest Palindrome29.8%Hard0.03419136474827932https://leetcode.com/problems/shortest-palindrome
3312Integer to Roman55.1%Medium0.03370158881097552https://leetcode.com/problems/integer-to-roman
34617Merge Two Binary Trees74.1%Easy0.03264929866766111https://leetcode.com/problems/merge-two-binary-trees
351114Print in Order65.7%Easy0.0317486983145803https://leetcode.com/problems/print-in-order
3655Jump Game34.6%Medium0.030985252381807864https://leetcode.com/problems/jump-game
37368Largest Divisible Subset38.0%Medium0.030351343424138456https://leetcode.com/problems/largest-divisible-subset
38176Second Highest Salary31.6%Easy0.029252542837437355https://leetcode.com/problems/second-highest-salary
391108Defanging an IP Address87.5%Easy0.02901382119071579https://leetcode.com/problems/defanging-an-ip-address
40219Contains Duplicate II37.7%Easy0.028500979167549973https://leetcode.com/problems/contains-duplicate-ii
4111Container With Most Water50.8%Medium0.02727648457622222https://leetcode.com/problems/container-with-most-water
42343Integer Break50.4%Medium0.027157133968907482https://leetcode.com/problems/integer-break
43312Burst Balloons51.8%Hard0.02552786995334295https://leetcode.com/problems/burst-balloons
44220Contains Duplicate III20.9%Medium0.024876904755404577https://leetcode.com/problems/contains-duplicate-iii
45395Longest Substring with At Least K Repeating Characters41.4%Medium0.024228925974379843https://leetcode.com/problems/longest-substring-with-at-least-k-repeating-characters
46836Rectangle Overlap48.6%Easy0.024228925974379843https://leetcode.com/problems/rectangle-overlap
47221Maximal Square37.7%Medium0.022108490754203434https://leetcode.com/problems/maximal-square
48184Sum33.7%Medium0.022011160101351537https://leetcode.com/problems/4sum
4945Jump Game II30.6%Hard0.021353124470568974https://leetcode.com/problems/jump-game-ii
50300Longest Increasing Subsequence42.6%Medium0.020893943681912164https://leetcode.com/problems/longest-increasing-subsequence
51525Contiguous Array42.8%Medium0.01975372873623256https://leetcode.com/problems/contiguous-array
52229Majority Element II35.6%Medium0.019057270410286146https://leetcode.com/problems/majority-element-ii
53146LRU Cache33.2%Medium0.01827577993873683https://leetcode.com/problems/lru-cache
54200Number of Islands46.8%Medium0.017925481766054456https://leetcode.com/problems/number-of-islands
55993Cousins in Binary Tree52.0%Easy0.017414458368636587https://leetcode.com/problems/cousins-in-binary-tree
566ZigZag Conversion36.3%Medium0.01726827253226344https://leetcode.com/problems/zigzag-conversion
57175Combine Two Tables60.8%Easy0.017235202581487984https://leetcode.com/problems/combine-two-tables
58994Rotting Oranges49.2%Medium0.017087941897195622https://leetcode.com/problems/rotting-oranges
59389Find the Difference55.3%Easy0.016978336534417868https://leetcode.com/problems/find-the-difference
60178Rank Scores45.8%Medium0.016785958549561074https://leetcode.com/problems/rank-scores
61191Number of 1 Bits49.8%Easy0.01673523624045844https://leetcode.com/problems/number-of-1-bits
6251N-Queens46.6%Hard0.016393809775676407https://leetcode.com/problems/n-queens
63322Coin Change35.5%Medium0.016022774188122292https://leetcode.com/problems/coin-change
64204Count Primes31.5%Easy0.015842612639489526https://leetcode.com/problems/count-primes
6559Spiral Matrix II53.9%Medium0.01579187969789165https://leetcode.com/problems/spiral-matrix-ii
66238Product of Array Except Self60.1%Medium0.015629897160874744https://leetcode.com/problems/product-of-array-except-self
67561Array Partition I72.0%Easy0.015186320707985562https://leetcode.com/problems/array-partition-i
68217Contains Duplicate56.0%Easy0.015106027431013205https://leetcode.com/problems/contains-duplicate
69198House Robber42.0%Easy0.014946565030639177https://leetcode.com/problems/house-robber
7054Spiral Matrix34.1%Medium0.014776167707688753https://leetcode.com/problems/spiral-matrix
71142Linked List Cycle II37.3%Medium0.014710955064667802https://leetcode.com/problems/linked-list-cycle-ii
7241First Missing Positive32.0%Hard0.014368063266920193https://leetcode.com/problems/first-missing-positive
73315Count of Smaller Numbers After Self41.5%Hard0.014352596574956585https://leetcode.com/problems/count-of-smaller-numbers-after-self
7424Swap Nodes in Pairs50.4%Medium0.013945066390122038https://leetcode.com/problems/swap-nodes-in-pairs
75703Kth Largest Element in a Stream49.7%Easy0.013898764390814973https://leetcode.com/problems/kth-largest-element-in-a-stream
7664Minimum Path Sum54.5%Medium0.013734383449598314https://leetcode.com/problems/minimum-path-sum
7744Wildcard Matching24.7%Hard0.013703537497261858https://leetcode.com/problems/wildcard-matching
7813Roman to Integer55.7%Easy0.013645103403569418https://leetcode.com/problems/roman-to-integer
791192Critical Connections in a Network48.6%Hard0.01352742981715631https://leetcode.com/problems/critical-connections-in-a-network
8070Climbing Stairs47.8%Easy0.013494975575004323https://leetcode.com/problems/climbing-stairs
81329Longest Increasing Path in a Matrix43.4%Hard0.013400535537482126https://leetcode.com/problems/longest-increasing-path-in-a-matrix
8285Maximal Rectangle37.7%Hard0.013333530869465187https://leetcode.com/problems/maximal-rectangle
83344Reverse String68.5%Easy0.013014662307854044https://leetcode.com/problems/reverse-string
84137Single Number II52.4%Medium0.012527567532662891https://leetcode.com/problems/single-number-ii
8588Merge Sorted Array39.4%Easy0.011986958032982505https://leetcode.com/problems/merge-sorted-array
86543Diameter of Binary Tree48.4%Easy0.011898606798495848https://leetcode.com/problems/diameter-of-binary-tree
87987Vertical Order Traversal of a Binary Tree36.6%Medium0.011601058182762062https://leetcode.com/problems/vertical-order-traversal-of-a-binary-tree
881051Height Checker71.1%Easy0.011468015591641189https://leetcode.com/problems/height-checker
8948Rotate Image56.7%Medium0.011428695823622754https://leetcode.com/problems/rotate-image
90148Sort List42.3%Medium0.011204599012863078https://leetcode.com/problems/sort-list
91236Lowest Common Ancestor of a Binary Tree45.7%Medium0.010575891759058162https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree
9292Reverse Linked List II38.8%Medium0.010427623162259089https://leetcode.com/problems/reverse-linked-list-ii
93234Palindrome Linked List39.3%Easy0.010171877938733932https://leetcode.com/problems/palindrome-linked-list
9461Rotate List30.0%Medium0.009925639799969955https://leetcode.com/problems/rotate-list
95113Path Sum II46.7%Medium0.009784813879998279https://leetcode.com/problems/path-sum-ii
96387First Unique Character in a String53.4%Easy0.009392680199054166https://leetcode.com/problems/first-unique-character-in-a-string
9796Unique Binary Search Trees52.9%Medium0.009242209964820877https://leetcode.com/problems/unique-binary-search-trees
98279Perfect Squares47.4%Medium0.009216655104924008https://leetcode.com/problems/perfect-squares
9920Valid Parentheses39.0%Easy0.009170695326061695https://leetcode.com/problems/valid-parentheses
10023Merge k Sorted Lists40.2%Hard0.009092808657599025https://leetcode.com/problems/merge-k-sorted-lists
101128Longest Consecutive Sequence45.1%Hard0.009051883485315484https://leetcode.com/problems/longest-consecutive-sequence
102295Find Median from Data Stream44.3%Hard0.00899893586856953https://leetcode.com/problems/find-median-from-data-stream
103139Word Break40.1%Medium0.008741314401573542https://leetcode.com/problems/word-break
104977Squares of a Sorted Array72.1%Easy0.008733679968754604https://leetcode.com/problems/squares-of-a-sorted-array
10549Group Anagrams56.9%Medium0.008538951314232168https://leetcode.com/problems/group-anagrams
106239Sliding Window Maximum43.0%Hard0.007898935224534491https://leetcode.com/problems/sliding-window-maximum
10756Merge Intervals39.3%Medium0.007796972706004796https://leetcode.com/problems/merge-intervals
108876Middle of the Linked List68.4%Easy0.007624893975696915https://leetcode.com/problems/middle-of-the-linked-list
109240Search a 2D Matrix II43.2%Medium0.0075829747244553335https://leetcode.com/problems/search-a-2d-matrix-ii
110163Sum Closest46.0%Medium0.0075259057003469075https://leetcode.com/problems/3sum-closest
11110Regular Expression Matching26.8%Hard0.0071865203293987245https://leetcode.com/problems/regular-expression-matching
1121365How Many Numbers Are Smaller Than the Current Number85.6%Easy0.007109877088701047https://leetcode.com/problems/how-many-numbers-are-smaller-than-the-current-number
113110Balanced Binary Tree43.5%Easy0.007027435807456887https://leetcode.com/problems/balanced-binary-tree
11473Set Matrix Zeroes43.1%Medium0.0070151111959223245https://leetcode.com/problems/set-matrix-zeroes
115114Flatten Binary Tree to Linked List49.3%Medium0.006896579059060353https://leetcode.com/problems/flatten-binary-tree-to-linked-list
116118Pascal's Triangle52.5%Easy0.006749941254175012https://leetcode.com/problems/pascals-triangle
11783Remove Duplicates from Sorted List45.4%Easy0.006353261522609498https://leetcode.com/problems/remove-duplicates-from-sorted-list
11891Decode Ways24.7%Medium0.005968385368349129https://leetcode.com/problems/decode-ways
119152Maximum Product Subarray31.7%Medium0.005590510716885066https://leetcode.com/problems/maximum-product-subarray
120287Find the Duplicate Number55.5%Medium0.005501320434837602https://leetcode.com/problems/find-the-duplicate-number
121112Path Sum41.2%Easy0.00546972510956646https://leetcode.com/problems/path-sum
122278First Bad Version35.7%Easy0.005391575265790431https://leetcode.com/problems/first-bad-version
123237Delete Node in a Linked List63.8%Easy0.005144705881237697https://leetcode.com/problems/delete-node-in-a-linked-list
124155Min Stack44.5%Easy0.00474891074128171https://leetcode.com/problems/min-stack
125169Majority Element58.7%Easy0.004706444738837472https://leetcode.com/problems/majority-element
12635Search Insert Position42.6%Easy0.004646848510375352https://leetcode.com/problems/search-insert-position
1271470Shuffle the Array88.9%Easy0.004527967890154029https://leetcode.com/problems/shuffle-the-array
128125Valid Palindrome36.7%Easy0.0039805008274065926https://leetcode.com/problems/valid-palindrome
129215Kth Largest Element in an Array55.4%Medium0.003902443976931749https://leetcode.com/problems/kth-largest-element-in-an-array
1308String to Integer (atoi)15.4%Medium0.0037925521897059712https://leetcode.com/problems/string-to-integer-atoi
131141Linked List Cycle41.1%Easy0.0034937584669245472https://leetcode.com/problems/linked-list-cycle
132101Symmetric Tree46.8%Easy0.0034057078469827435https://leetcode.com/problems/symmetric-tree
13314Longest Common Prefix35.4%Easy0.003320331762984143https://leetcode.com/problems/longest-common-prefix
13466Plus One43.0%Easy0.00326211347832938https://leetcode.com/problems/plus-one
13533Search in Rotated Sorted Array34.5%Medium0.003229976968332634https://leetcode.com/problems/search-in-rotated-sorted-array
1369Palindrome Number48.4%Easy0.0030379001110948244https://leetcode.com/problems/palindrome-number
13798Validate Binary Search Tree27.8%Medium0.002943776044013381https://leetcode.com/problems/validate-binary-search-tree
138104Maximum Depth of Binary Tree66.0%Easy0.002787846801433134https://leetcode.com/problems/maximum-depth-of-binary-tree
139121Best Time to Buy and Sell Stock50.5%Easy0.0021239321954525975https://leetcode.com/problems/best-time-to-buy-and-sell-stock
14026Remove Duplicates from Sorted Array45.1%Easy0.0019513153174351963https://leetcode.com/problems/remove-duplicates-from-sorted-array
14179Word Search35.6%Medium0.0016647248725526849https://leetcode.com/problems/word-search