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

11 KiB

1IDTitleAcceptanceDifficultyFrequencyLeetcode Question Link
2146LRU Cache33.2%Medium0.1499900812285872https://leetcode.com/problems/lru-cache
337Sudoku Solver43.6%Hard0.13242170014920152https://leetcode.com/problems/sudoku-solver
4221Maximal Square37.7%Medium0.11485331906981584https://leetcode.com/problems/maximal-square
5609Find Duplicate File in System59.5%Medium0.09898183354885093https://leetcode.com/problems/find-duplicate-file-in-system
620Valid Parentheses39.0%Easy0.09286263438126167https://leetcode.com/problems/valid-parentheses
71048Longest String Chain54.7%Medium0.07529425330187599https://leetcode.com/problems/longest-string-chain
849Group Anagrams56.9%Medium0.07434615245733686https://leetcode.com/problems/group-anagrams
9697Degree of an Array53.8%Easy0.07117627846789498https://leetcode.com/problems/degree-of-an-array
10460LFU Cache34.2%Hard0.06836374280939023https://leetcode.com/problems/lfu-cache
11706Design HashMap61.3%Easy0.0683442674369718https://leetcode.com/problems/design-hashmap
121328Break a Palindrome43.3%Medium0.05910139227591337https://leetcode.com/problems/break-a-palindrome
13829Consecutive Numbers Sum37.5%Hard0.05341723749698583https://leetcode.com/problems/consecutive-numbers-sum
1485Maximal Rectangle37.7%Hard0.05229949940284891https://leetcode.com/problems/maximal-rectangle
15186Reverse Words in a String II43.3%Medium0.05064373281875492https://leetcode.com/problems/reverse-words-in-a-string-ii
16269Alien Dictionary33.3%Hard0.04997917057465883https://leetcode.com/problems/alien-dictionary
17981Time Based Key-Value Store53.1%Medium0.049406315387071284https://leetcode.com/problems/time-based-key-value-store
18322Coin Change35.5%Medium0.04828048261319787https://leetcode.com/problems/coin-change
19698Partition to K Equal Sum Subsets45.0%Medium0.04685917114094188https://leetcode.com/problems/partition-to-k-equal-sum-subsets
20556Next Greater Element III31.7%Medium0.04679216150675895https://leetcode.com/problems/next-greater-element-iii
2197Interleaving String31.5%Hard0.04548535439411653https://leetcode.com/problems/interleaving-string
2293Restore IP Addresses35.6%Medium0.04393092922572675https://leetcode.com/problems/restore-ip-addresses
2356Merge Intervals39.3%Medium0.04173304225331761https://leetcode.com/problems/merge-intervals
24243Shortest Word Distance61.0%Easy0.040780370344928096https://leetcode.com/problems/shortest-word-distance
25380Insert Delete GetRandom O(1)47.5%Medium0.038717635350707984https://leetcode.com/problems/insert-delete-getrandom-o1
2647Permutations II46.4%Medium0.038145268259690404https://leetcode.com/problems/permutations-ii
27905Sort Array By Parity74.1%Easy0.03787434929243582https://leetcode.com/problems/sort-array-by-parity
28295Find Median from Data Stream44.3%Hard0.035519827248535335https://leetcode.com/problems/find-median-from-data-stream
29277Find the Celebrity41.8%Medium0.02969780239174205https://leetcode.com/problems/find-the-celebrity
3033Search in Rotated Sorted Array34.5%Medium0.0287009496170278https://leetcode.com/problems/search-in-rotated-sorted-array
31733Flood Fill55.3%Easy0.02506396866321625https://leetcode.com/problems/flood-fill
3223Merge k Sorted Lists40.2%Hard0.0250564321052577https://leetcode.com/problems/merge-k-sorted-lists
331Two Sum45.6%Easy0.024530411623017775https://leetcode.com/problems/two-sum
34426Convert Binary Search Tree to Sorted Doubly Linked List59.1%Medium0.024214258120594613https://leetcode.com/problems/convert-binary-search-tree-to-sorted-doubly-linked-list
351209Remove All Adjacent Duplicates in String II56.9%Medium0.02324334737232728https://leetcode.com/problems/remove-all-adjacent-duplicates-in-string-ii
36206Reverse Linked List62.5%Easy0.02086427467076072https://leetcode.com/problems/reverse-linked-list
37341Flatten Nested List Iterator52.9%Medium0.019980684690483426https://leetcode.com/problems/flatten-nested-list-iterator
38525Contiguous Array42.8%Medium0.01975372873623256https://leetcode.com/problems/contiguous-array
39402Remove K Digits28.4%Medium0.016863806052004816https://leetcode.com/problems/remove-k-digits
40116Populating Next Right Pointers in Each Node45.2%Medium0.016432723251567683https://leetcode.com/problems/populating-next-right-pointers-in-each-node
41238Product of Array Except Self60.1%Medium0.015629897160874744https://leetcode.com/problems/product-of-array-except-self
424Median of Two Sorted Arrays29.6%Hard0.015510198481701449https://leetcode.com/problems/median-of-two-sorted-arrays
4380Remove Duplicates from Sorted Array II44.0%Medium0.014815085785140639https://leetcode.com/problems/remove-duplicates-from-sorted-array-ii
44102Binary Tree Level Order Traversal54.6%Medium0.014477270588287548https://leetcode.com/problems/binary-tree-level-order-traversal
45109Convert Sorted List to Binary Search Tree47.7%Medium0.014440684154794336https://leetcode.com/problems/convert-sorted-list-to-binary-search-tree
46150Evaluate Reverse Polish Notation36.3%Medium0.01413451093490476https://leetcode.com/problems/evaluate-reverse-polish-notation
473Longest Substring Without Repeating Characters30.4%Medium0.01391434345649413https://leetcode.com/problems/longest-substring-without-repeating-characters
48304Range Sum Query 2D - Immutable38.6%Medium0.013913267916985026https://leetcode.com/problems/range-sum-query-2d-immutable
4939Combination Sum56.1%Medium0.012815211692867591https://leetcode.com/problems/combination-sum
50226Invert Binary Tree65.0%Easy0.01235091863400913https://leetcode.com/problems/invert-binary-tree
5188Merge Sorted Array39.4%Easy0.011986958032982505https://leetcode.com/problems/merge-sorted-array
5298Validate Binary Search Tree27.8%Medium0.01172346369605921https://leetcode.com/problems/validate-binary-search-tree
53647Palindromic Substrings60.6%Medium0.010400509768078022https://leetcode.com/problems/palindromic-substrings
5425Reverse Nodes in k-Group42.1%Hard0.01021198560502829https://leetcode.com/problems/reverse-nodes-in-k-group
5572Edit Distance44.8%Hard0.010017614452317782https://leetcode.com/problems/edit-distance
5617Letter Combinations of a Phone Number46.8%Medium0.00987716546167603https://leetcode.com/problems/letter-combinations-of-a-phone-number
57113Path Sum II46.7%Medium0.009784813879998279https://leetcode.com/problems/path-sum-ii
5821Merge Two Sorted Lists53.5%Easy0.008990339814651234https://leetcode.com/problems/merge-two-sorted-lists
59215Kth Largest Element in an Array55.4%Medium0.008759180089881562https://leetcode.com/problems/kth-largest-element-in-an-array
60977Squares of a Sorted Array72.1%Easy0.008733679968754604https://leetcode.com/problems/squares-of-a-sorted-array
6163Unique Paths II34.6%Medium0.008712753874961187https://leetcode.com/problems/unique-paths-ii
62416Partition Equal Subset Sum43.7%Medium0.008686265255960345https://leetcode.com/problems/partition-equal-subset-sum
638String to Integer (atoi)15.4%Medium0.008513104762248265https://leetcode.com/problems/string-to-integer-atoi
64394Decode String50.0%Medium0.008166644000272283https://leetcode.com/problems/decode-string
65133Clone Graph34.8%Medium0.008136741393061732https://leetcode.com/problems/clone-graph
66239Sliding Window Maximum43.0%Hard0.007898935224534491https://leetcode.com/problems/sliding-window-maximum
67163Sum Closest46.0%Medium0.0075259057003469075https://leetcode.com/problems/3sum-closest
68692Top K Frequent Words51.8%Medium0.007516006820935329https://leetcode.com/problems/top-k-frequent-words
6936Valid Sudoku48.7%Medium0.007258242715805398https://leetcode.com/problems/valid-sudoku
70297Serialize and Deserialize Binary Tree47.5%Hard0.007077170374085099https://leetcode.com/problems/serialize-and-deserialize-binary-tree
712Add Two Numbers33.9%Medium0.006737434951993369https://leetcode.com/problems/add-two-numbers
72200Number of Islands46.8%Medium0.006490251382779317https://leetcode.com/problems/number-of-islands
7341First Missing Positive32.0%Hard0.0064113058208121855https://leetcode.com/problems/first-missing-positive
74162Find Peak Element43.3%Medium0.006350235659345837https://leetcode.com/problems/find-peak-element
75230Kth Smallest Element in a BST60.2%Medium0.0063361529894967236https://leetcode.com/problems/kth-smallest-element-in-a-bst
7676Minimum Window Substring34.6%Hard0.006231520398723243https://leetcode.com/problems/minimum-window-substring
77127Word Ladder29.6%Medium0.005979091056058075https://leetcode.com/problems/word-ladder
78199Binary Tree Right Side View54.1%Medium0.0056826406650506926https://leetcode.com/problems/binary-tree-right-side-view
79124Binary Tree Maximum Path Sum34.3%Hard0.005531752454833179https://leetcode.com/problems/binary-tree-maximum-path-sum
80287Find the Duplicate Number55.5%Medium0.005501320434837602https://leetcode.com/problems/find-the-duplicate-number
81300Longest Increasing Subsequence42.6%Medium0.005264555460003242https://leetcode.com/problems/longest-increasing-subsequence
8255Jump Game34.6%Medium0.005022612266291382https://leetcode.com/problems/jump-game
8375Sort Colors47.3%Medium0.004992521603120986https://leetcode.com/problems/sort-colors
84153Sum26.8%Medium0.004940992758742591https://leetcode.com/problems/3sum
85268Missing Number51.7%Easy0.0048804391649084865https://leetcode.com/problems/missing-number
8662Unique Paths54.1%Medium0.004621080312067025https://leetcode.com/problems/unique-paths
87234Palindrome Linked List39.3%Easy0.004533613114828982https://leetcode.com/problems/palindrome-linked-list
8846Permutations63.5%Medium0.004216302230139218https://leetcode.com/problems/permutations
8928Implement strStr()34.5%Easy0.003943222775040032https://leetcode.com/problems/implement-strstr
90139Word Break40.1%Medium0.003894465052690167https://leetcode.com/problems/word-break
91153Find Minimum in Rotated Sorted Array45.1%Medium0.0037558729598054378https://leetcode.com/problems/find-minimum-in-rotated-sorted-array
92141Linked List Cycle41.1%Easy0.0034937584669245472https://leetcode.com/problems/linked-list-cycle
93101Symmetric Tree46.8%Easy0.0034057078469827435https://leetcode.com/problems/symmetric-tree
94347Top K Frequent Elements61.2%Medium0.0033396446491217604https://leetcode.com/problems/top-k-frequent-elements
9519Remove Nth Node From End of List35.2%Medium0.003076452203393495https://leetcode.com/problems/remove-nth-node-from-end-of-list
9611Container With Most Water50.8%Medium0.0030677223230101427https://leetcode.com/problems/container-with-most-water
97621Task Scheduler50.1%Medium0.002341784338144407https://leetcode.com/problems/task-scheduler
985Longest Palindromic Substring29.5%Medium0.002279333142507479https://leetcode.com/problems/longest-palindromic-substring
99121Best Time to Buy and Sell Stock50.5%Easy0.0021239321954525975https://leetcode.com/problems/best-time-to-buy-and-sell-stock
10026Remove Duplicates from Sorted Array45.1%Easy0.0019513153174351963https://leetcode.com/problems/remove-duplicates-from-sorted-array
10179Word Search35.6%Medium0.0016647248725526849https://leetcode.com/problems/word-search
102151Reverse Words in a String21.9%Medium0.0015375156780384337https://leetcode.com/problems/reverse-words-in-a-string
10350Pow(x;n)30.3%Medium0.0014016892647828818https://leetcode.com/problems/powx-n