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

17 KiB

1IDTitleAcceptanceDifficultyFrequencyLeetcode Question Link
21396Design Underground System64.7%Medium1.6336239764997664https://leetcode.com/problems/design-underground-system
31274Number of Ships in a Rectangle66.3%Hard1.3841012723467938https://leetcode.com/problems/number-of-ships-in-a-rectangle
41169Invalid Transactions31.2%Medium1.1345785681938212https://leetcode.com/problems/invalid-transactions
51209Remove All Adjacent Duplicates in String II56.9%Medium0.9182875611040503https://leetcode.com/problems/remove-all-adjacent-duplicates-in-string-ii
6394Decode String50.0%Medium0.8695403064407496https://leetcode.com/problems/decode-string
7430Flatten a Multilevel Doubly Linked List55.1%Medium0.620017602287777https://leetcode.com/problems/flatten-a-multilevel-doubly-linked-list
8200Number of Islands46.8%Medium0.581027429947078https://leetcode.com/problems/number-of-islands
9253Meeting Rooms II45.7%Medium0.46127061637748534https://leetcode.com/problems/meeting-rooms-ii
101472Design Browser History64.6%Medium0.41985384556026395https://leetcode.com/problems/design-browser-history
11146LRU Cache33.2%Medium0.4110212101491863https://leetcode.com/problems/lru-cache
12445Add Two Numbers II54.5%Medium0.3186792865497379https://leetcode.com/problems/add-two-numbers-ii
13987Vertical Order Traversal of a Binary Tree36.6%Medium0.30230623809780655https://leetcode.com/problems/vertical-order-traversal-of-a-binary-tree
141029Two City Scheduling56.1%Easy0.23361485118150516https://leetcode.com/problems/two-city-scheduling
1598Validate Binary Search Tree27.8%Medium0.21414088449315205https://leetcode.com/problems/validate-binary-search-tree
16117Populating Next Right Pointers in Each Node II39.1%Medium0.20860539286818253https://leetcode.com/problems/populating-next-right-pointers-in-each-node-ii
171244Design A Leaderboard60.7%Medium0.17763094743610072https://leetcode.com/problems/design-a-leaderboard
18387First Unique Character in a String53.4%Easy0.16314262087986708https://leetcode.com/problems/first-unique-character-in-a-string
192Add Two Numbers33.9%Medium0.15615258592389064https://leetcode.com/problems/add-two-numbers
20723Candy Crush69.2%Medium0.1475667107409061https://leetcode.com/problems/candy-crush
21380Insert Delete GetRandom O(1)47.5%Medium0.1466146891661091https://leetcode.com/problems/insert-delete-getrandom-o1
22384Shuffle an Array52.8%Medium0.12953764257899986https://leetcode.com/problems/shuffle-an-array
2342Trapping Rain Water48.9%Hard0.12389276378675394https://leetcode.com/problems/trapping-rain-water
24451Sort Characters By Frequency63.0%Medium0.11258362132121401https://leetcode.com/problems/sort-characters-by-frequency
25155Min Stack44.5%Easy0.11244000234885869https://leetcode.com/problems/min-stack
261188Design Bounded Blocking Queue70.5%Medium0.11030454201470608https://leetcode.com/problems/design-bounded-blocking-queue
27924Minimize Malware Spread42.0%Hard0.10821358464023274https://leetcode.com/problems/minimize-malware-spread
28314Binary Tree Vertical Order Traversal45.3%Medium0.10758430200165091https://leetcode.com/problems/binary-tree-vertical-order-traversal
29658Find K Closest Elements40.9%Medium0.0995648587647672https://leetcode.com/problems/find-k-closest-elements
30611Valid Triangle Number48.4%Medium0.09333193979221914https://leetcode.com/problems/valid-triangle-number
3120Valid Parentheses39.0%Easy0.09286263438126167https://leetcode.com/problems/valid-parentheses
32991Broken Calculator45.6%Medium0.08515780834030685https://leetcode.com/problems/broken-calculator
33582Kill Process60.8%Medium0.08355588569097351https://leetcode.com/problems/kill-process
3456Merge Intervals39.3%Medium0.08339552430579078https://leetcode.com/problems/merge-intervals
351297Maximum Number of Occurrences of a Substring47.3%Medium0.07770898432731625https://leetcode.com/problems/maximum-number-of-occurrences-of-a-substring
361347Minimum Number of Steps to Make Two Strings Anagram74.7%Medium0.07742472477971579https://leetcode.com/problems/minimum-number-of-steps-to-make-two-strings-anagram
37214Shortest Palindrome29.8%Hard0.0753494372417868https://leetcode.com/problems/shortest-palindrome
38463Island Perimeter65.7%Easy0.06646080650226213https://leetcode.com/problems/island-perimeter
391145Binary Tree Coloring Game51.2%Medium0.06592172080482424https://leetcode.com/problems/binary-tree-coloring-game
40242Valid Anagram56.9%Easy0.06447998055429512https://leetcode.com/problems/valid-anagram
413Longest Substring Without Repeating Characters30.4%Medium0.06370380162663494https://leetcode.com/problems/longest-substring-without-repeating-characters
42353Design Snake Game34.2%Medium0.06053284922884233https://leetcode.com/problems/design-snake-game
431Two Sum45.6%Easy0.057621231679235815https://leetcode.com/problems/two-sum
44128Longest Consecutive Sequence45.1%Hard0.05527490034186498https://leetcode.com/problems/longest-consecutive-sequence
451054Distant Barcodes43.2%Medium0.054435206555017046https://leetcode.com/problems/distant-barcodes
4612Integer to Roman55.1%Medium0.05217122936969127https://leetcode.com/problems/integer-to-roman
47286Walls and Gates54.5%Medium0.05155780966485001https://leetcode.com/problems/walls-and-gates
481312Minimum Insertion Steps to Make a String Palindrome58.1%Hard0.050261834780888255https://leetcode.com/problems/minimum-insertion-steps-to-make-a-string-palindrome
4910Regular Expression Matching26.8%Hard0.04409107726484965https://leetcode.com/problems/regular-expression-matching
50140Word Break II32.6%Hard0.04245795568707049https://leetcode.com/problems/word-break-ii
511155Number of Dice Rolls With Target Sum49.0%Medium0.04204262329555109https://leetcode.com/problems/number-of-dice-rolls-with-target-sum
5233Search in Rotated Sorted Array34.5%Medium0.03886602267922457https://leetcode.com/problems/search-in-rotated-sorted-array
53797All Paths From Source to Target77.9%Medium0.03881156536434583https://leetcode.com/problems/all-paths-from-source-to-target
54138Copy List with Random Pointer36.4%Medium0.03807953223592622https://leetcode.com/problems/copy-list-with-random-pointer
55139Word Break40.1%Medium0.03451593709018879https://leetcode.com/problems/word-break
5653Maximum Subarray46.5%Easy0.03412208634661372https://leetcode.com/problems/maximum-subarray
5779Word Search35.6%Medium0.03318208821436187https://leetcode.com/problems/word-search
58694Number of Distinct Islands56.0%Medium0.03278982282299087https://leetcode.com/problems/number-of-distinct-islands
591123Lowest Common Ancestor of Deepest Leaves66.8%Medium0.03147388037973136https://leetcode.com/problems/lowest-common-ancestor-of-deepest-leaves
60460LFU Cache34.2%Hard0.030962225603966897https://leetcode.com/problems/lfu-cache
61332Reconstruct Itinerary36.7%Medium0.030687713231237448https://leetcode.com/problems/reconstruct-itinerary
6285Maximal Rectangle37.7%Hard0.029754261081792705https://leetcode.com/problems/maximal-rectangle
63695Max Area of Island62.7%Medium0.028321590863246118https://leetcode.com/problems/max-area-of-island
64518Coin Change 250.2%Medium0.027969505010125056https://leetcode.com/problems/coin-change-2
65121Best Time to Buy and Sell Stock50.5%Easy0.0257124040167447https://leetcode.com/problems/best-time-to-buy-and-sell-stock
66283Move Zeroes57.8%Easy0.025673520193393074https://leetcode.com/problems/move-zeroes
6790Subsets II47.1%Medium0.025497131933483772https://leetcode.com/problems/subsets-ii
6841First Missing Positive32.0%Hard0.02540222313806603https://leetcode.com/problems/first-missing-positive
69322Coin Change35.5%Medium0.024924029676386045https://leetcode.com/problems/coin-change
7030Substring with Concatenation of All Words25.4%Hard0.02486144206532915https://leetcode.com/problems/substring-with-concatenation-of-all-words
71752Open the Lock51.8%Medium0.024586364440127736https://leetcode.com/problems/open-the-lock
72395Longest Substring with At Least K Repeating Characters41.4%Medium0.024228925974379843https://leetcode.com/problems/longest-substring-with-at-least-k-repeating-characters
73348Design Tic-Tac-Toe54.3%Medium0.024214258120594613https://leetcode.com/problems/design-tic-tac-toe
74662Maximum Width of Binary Tree41.0%Medium0.024116924478312346https://leetcode.com/problems/maximum-width-of-binary-tree
7578Subsets62.0%Medium0.022827872206034577https://leetcode.com/problems/subsets
76102Binary Tree Level Order Traversal54.6%Medium0.02252956425342345https://leetcode.com/problems/binary-tree-level-order-traversal
77285Inorder Successor in BST40.4%Medium0.02233482010057984https://leetcode.com/problems/inorder-successor-in-bst
78105Construct Binary Tree from Preorder and Inorder Traversal48.8%Medium0.022325470299025416https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal
79221Maximal Square37.7%Medium0.022108490754203434https://leetcode.com/problems/maximal-square
80424Longest Repeating Character Replacement47.0%Medium0.020461071871340063https://leetcode.com/problems/longest-repeating-character-replacement
815Longest Palindromic Substring29.5%Medium0.020329346568668867https://leetcode.com/problems/longest-palindromic-substring
82784Letter Case Permutation64.6%Medium0.02026411791905559https://leetcode.com/problems/letter-case-permutation
8369Sqrt(x)33.9%Easy0.020253856904497686https://leetcode.com/problems/sqrtx
84153Sum26.8%Medium0.019619157889188592https://leetcode.com/problems/3sum
85399Evaluate Division51.6%Medium0.019380451549662482https://leetcode.com/problems/evaluate-division
86721Accounts Merge48.8%Medium0.01888630262874805https://leetcode.com/problems/accounts-merge
87209Minimum Size Subarray Sum38.2%Medium0.018832948333092125https://leetcode.com/problems/minimum-size-subarray-sum
8888Merge Sorted Array39.4%Easy0.018667009593356397https://leetcode.com/problems/merge-sorted-array
8984Largest Rectangle in Histogram35.2%Hard0.01866112622166295https://leetcode.com/problems/largest-rectangle-in-histogram
90126Word Ladder II22.1%Hard0.017994187717865196https://leetcode.com/problems/word-ladder-ii
91292Nim Game54.9%Easy0.01796186592859277https://leetcode.com/problems/nim-game
926ZigZag Conversion36.3%Medium0.01726827253226344https://leetcode.com/problems/zigzag-conversion
93402Remove K Digits28.4%Medium0.016863806052004816https://leetcode.com/problems/remove-k-digits
94692Top K Frequent Words51.8%Medium0.016832265743172113https://leetcode.com/problems/top-k-frequent-words
95188Best Time to Buy and Sell Stock IV28.0%Hard0.01651565203072114https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iv
96116Populating Next Right Pointers in Each Node45.2%Medium0.016432723251567683https://leetcode.com/problems/populating-next-right-pointers-in-each-node
9723Merge k Sorted Lists40.2%Hard0.016108271385328228https://leetcode.com/problems/merge-k-sorted-lists
984Median of Two Sorted Arrays29.6%Hard0.015510198481701449https://leetcode.com/problems/median-of-two-sorted-arrays
99315Count of Smaller Numbers After Self41.5%Hard0.014352596574956585https://leetcode.com/problems/count-of-smaller-numbers-after-self
10021Merge Two Sorted Lists53.5%Easy0.014012111332134735https://leetcode.com/problems/merge-two-sorted-lists
101404Sum of Left Leaves50.9%Easy0.013981353230340547https://leetcode.com/problems/sum-of-left-leaves
102724Find Pivot Index44.0%Easy0.013850636933899008https://leetcode.com/problems/find-pivot-index
10344Wildcard Matching24.7%Hard0.013703537497261858https://leetcode.com/problems/wildcard-matching
104101Symmetric Tree46.8%Easy0.013553786479814183https://leetcode.com/problems/symmetric-tree
105127Word Ladder29.6%Medium0.013403030127340374https://leetcode.com/problems/word-ladder
106347Top K Frequent Elements61.2%Medium0.01329217620893675https://leetcode.com/problems/top-k-frequent-elements
107152Maximum Product Subarray31.7%Medium0.012534983069696118https://leetcode.com/problems/maximum-product-subarray
108112Path Sum41.2%Easy0.012265076074932503https://leetcode.com/problems/path-sum
109273Integer to English Words27.1%Hard0.012081089250339716https://leetcode.com/problems/integer-to-english-words
110123Best Time to Buy and Sell Stock III37.5%Hard0.011261380272539033https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iii
111338Counting Bits69.5%Medium0.01088446119842327https://leetcode.com/problems/counting-bits
11292Reverse Linked List II38.8%Medium0.010427623162259089https://leetcode.com/problems/reverse-linked-list-ii
113234Palindrome Linked List39.3%Easy0.010171877938733932https://leetcode.com/problems/palindrome-linked-list
114621Task Scheduler50.1%Medium0.009334412329990095https://leetcode.com/problems/task-scheduler
1151249Minimum Remove to Make Valid Parentheses62.5%Medium0.009195467093100304https://leetcode.com/problems/minimum-remove-to-make-valid-parentheses
116125Valid Palindrome36.7%Easy0.008933948641551634https://leetcode.com/problems/valid-palindrome
11749Group Anagrams56.9%Medium0.008538951314232168https://leetcode.com/problems/group-anagrams
118173Binary Search Tree Iterator56.6%Medium0.008489015324911316https://leetcode.com/problems/binary-search-tree-iterator
119153Find Minimum in Rotated Sorted Array45.1%Medium0.008430963288799368https://leetcode.com/problems/find-minimum-in-rotated-sorted-array
120239Sliding Window Maximum43.0%Hard0.007898935224534491https://leetcode.com/problems/sliding-window-maximum
121328Odd Even Linked List55.7%Medium0.00764383618585562https://leetcode.com/problems/odd-even-linked-list
122415Add Strings47.5%Easy0.007587289812159497https://leetcode.com/problems/add-strings
123122Best Time to Buy and Sell Stock II57.0%Easy0.007532046655581962https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii
124412Fizz Buzz62.3%Easy0.007165921026143679https://leetcode.com/problems/fizz-buzz
125110Balanced Binary Tree43.5%Easy0.007027435807456887https://leetcode.com/problems/balanced-binary-tree
126114Flatten Binary Tree to Linked List49.3%Medium0.006896579059060353https://leetcode.com/problems/flatten-binary-tree-to-linked-list
127448Find All Numbers Disappeared in an Array55.9%Easy0.006863444924982415https://leetcode.com/problems/find-all-numbers-disappeared-in-an-array
12854Spiral Matrix34.1%Medium0.0065941551175130245https://leetcode.com/problems/spiral-matrix
129136Single Number65.5%Easy0.006445166968713385https://leetcode.com/problems/single-number
13024Swap Nodes in Pairs50.4%Medium0.0062218275061505365https://leetcode.com/problems/swap-nodes-in-pairs
13164Minimum Path Sum54.5%Medium0.006127470152097104https://leetcode.com/problems/minimum-path-sum
13291Decode Ways24.7%Medium0.005968385368349129https://leetcode.com/problems/decode-ways
133199Binary Tree Right Side View54.1%Medium0.0056826406650506926https://leetcode.com/problems/binary-tree-right-side-view
134237Delete Node in a Linked List63.8%Easy0.005144705881237697https://leetcode.com/problems/delete-node-in-a-linked-list
135207Course Schedule43.1%Medium0.004964021114211758https://leetcode.com/problems/course-schedule
13662Unique Paths54.1%Medium0.004621080312067025https://leetcode.com/problems/unique-paths
13734Find First and Last Position of Element in Sorted Array36.2%Medium0.004247643638268045https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array
1388String to Integer (atoi)15.4%Medium0.0037925521897059712https://leetcode.com/problems/string-to-integer-atoi
13913Roman to Integer55.7%Easy0.003428770717317083https://leetcode.com/problems/roman-to-integer
14014Longest Common Prefix35.4%Easy0.003320331762984143https://leetcode.com/problems/longest-common-prefix
14119Remove Nth Node From End of List35.2%Medium0.003076452203393495https://leetcode.com/problems/remove-nth-node-from-end-of-list
1421480Running Sum of 1d Array90.5%Easy0.0026196884456014947https://leetcode.com/problems/running-sum-of-1d-array
143258Add Digits57.6%Easy0.0020686809197766587https://leetcode.com/problems/add-digits
14426Remove Duplicates from Sorted Array45.1%Easy0.0019513153174351963https://leetcode.com/problems/remove-duplicates-from-sorted-array
1457Reverse Integer25.8%Easy0.0018612447790907708https://leetcode.com/problems/reverse-integer
146103Binary Tree Zigzag Level Order Traversal48.3%Medium0.0017084529846397953https://leetcode.com/problems/binary-tree-zigzag-level-order-traversal
14750Pow(x;n)30.3%Medium0.0014016892647828818https://leetcode.com/problems/powx-n