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

9.6 KiB

1IDTitleAcceptanceDifficultyFrequencyLeetcode Question Link
2289Game of Life54.5%Medium1.9095955742703714https://leetcode.com/problems/game-of-life
31086High Five79.7%Easy1.8728225432316814https://leetcode.com/problems/high-five
442Trapping Rain Water48.9%Hard1.7465805642808125https://leetcode.com/problems/trapping-rain-water
5209Minimum Size Subarray Sum38.2%Medium1.3987846835630127https://leetcode.com/problems/minimum-size-subarray-sum
6780Reaching Points29.4%Hard1.0654848189471613https://leetcode.com/problems/reaching-points
7166Fraction to Recurring Decimal21.6%Medium1.042800072024958https://leetcode.com/problems/fraction-to-recurring-decimal
81041Robot Bounded In Circle49.6%Medium0.695004191307158https://leetcode.com/problems/robot-bounded-in-circle
9387First Unique Character in a String53.4%Easy0.632243999450364https://leetcode.com/problems/first-unique-character-in-a-string
101163Last Substring in Lexicographical Order33.9%Hard0.6115111972698513https://leetcode.com/problems/last-substring-in-lexicographical-order
11238Product of Array Except Self60.1%Medium0.6032226884679701https://leetcode.com/problems/product-of-array-except-self
124Median of Two Sorted Arrays29.6%Hard0.5686741732514908https://leetcode.com/problems/median-of-two-sorted-arrays
13862Shortest Subarray with Sum at Least K24.6%Hard0.4965766780244703https://leetcode.com/problems/shortest-subarray-with-sum-at-least-k
14443String Compression41.3%Easy0.35323767072881695https://leetcode.com/problems/string-compression
15524Longest Word in Dictionary through Deleting48.4%Medium0.3371083689581862https://leetcode.com/problems/longest-word-in-dictionary-through-deleting
16592Fraction Addition and Subtraction49.0%Medium0.32423966818557853https://leetcode.com/problems/fraction-addition-and-subtraction
1749Group Anagrams56.9%Medium0.2956303911813633https://leetcode.com/problems/group-anagrams
1864Minimum Path Sum54.5%Medium0.26326216391582735https://leetcode.com/problems/minimum-path-sum
19532K-diff Pairs in an Array31.6%Easy0.15718558352241233https://leetcode.com/problems/k-diff-pairs-in-an-array
20706Design HashMap61.3%Easy0.1476880076475794https://leetcode.com/problems/design-hashmap
21688Knight Probability in Chessboard48.9%Medium0.14465605390747982https://leetcode.com/problems/knight-probability-in-chessboard
22121Best Time to Buy and Sell Stock50.5%Easy0.14290237960985536https://leetcode.com/problems/best-time-to-buy-and-sell-stock
2354Spiral Matrix34.1%Medium0.12572728493821236https://leetcode.com/problems/spiral-matrix
24657Robot Return to Origin73.5%Easy0.10469804461670518https://leetcode.com/problems/robot-return-to-origin
25326Power of Three42.1%Easy0.09026419332308504https://leetcode.com/problems/power-of-three
26942DI String Match72.6%Easy0.08495672247596549https://leetcode.com/problems/di-string-match
27939Minimum Area Rectangle51.8%Medium0.08361414004113359https://leetcode.com/problems/minimum-area-rectangle
28887Super Egg Drop27.1%Hard0.08054440988796595https://leetcode.com/problems/super-egg-drop
298String to Integer (atoi)15.4%Medium0.07412832776627384https://leetcode.com/problems/string-to-integer-atoi
30547Friend Circles58.6%Medium0.07408600065076033https://leetcode.com/problems/friend-circles
311051Height Checker71.1%Easy0.06960783038095686https://leetcode.com/problems/height-checker
32460LFU Cache34.2%Hard0.06836374280939023https://leetcode.com/problems/lfu-cache
3333Search in Rotated Sorted Array34.5%Medium0.06345616594863132https://leetcode.com/problems/search-in-rotated-sorted-array
3411Container With Most Water50.8%Medium0.060358007567261264https://leetcode.com/problems/container-with-most-water
35588Design In-Memory File System45.9%Hard0.05841076215641451https://leetcode.com/problems/design-in-memory-file-system
361395Count Number of Teams82.0%Medium0.056405927913552076https://leetcode.com/problems/count-number-of-teams
3776Minimum Window Substring34.6%Hard0.05473322196089386https://leetcode.com/problems/minimum-window-substring
38724Find Pivot Index44.0%Easy0.05428741283782842https://leetcode.com/problems/find-pivot-index
39332Reconstruct Itinerary36.7%Medium0.053921416793820044https://leetcode.com/problems/reconstruct-itinerary
4091Decode Ways24.7%Medium0.05247487679829598https://leetcode.com/problems/decode-ways
4199Recover Binary Search Tree39.7%Hard0.051264071283762605https://leetcode.com/problems/recover-binary-search-tree
42560Subarray Sum Equals K43.9%Medium0.0512021569656579https://leetcode.com/problems/subarray-sum-equals-k
43322Coin Change35.5%Medium0.04828048261319787https://leetcode.com/problems/coin-change
44119Pascal's Triangle II49.0%Easy0.04675113677738821https://leetcode.com/problems/pascals-triangle-ii
45153Find Minimum in Rotated Sorted Array45.1%Medium0.04506509646857976https://leetcode.com/problems/find-minimum-in-rotated-sorted-array
46720Longest Word in Dictionary48.2%Easy0.042695919196489414https://leetcode.com/problems/longest-word-in-dictionary
471219Path with Maximum Gold65.1%Medium0.04111576039097048https://leetcode.com/problems/path-with-maximum-gold
48647Palindromic Substrings60.6%Medium0.040968350772541844https://leetcode.com/problems/palindromic-substrings
49722Remove Comments34.6%Medium0.04049136135473691https://leetcode.com/problems/remove-comments
50993Cousins in Binary Tree52.0%Easy0.03876454345024432https://leetcode.com/problems/cousins-in-binary-tree
51992Subarrays with K Different Integers48.6%Hard0.03700699810869683https://leetcode.com/problems/subarrays-with-k-different-integers
52200Number of Islands46.8%Medium0.03483682053721545https://leetcode.com/problems/number-of-islands
531Two Sum45.6%Easy0.03409719244428431https://leetcode.com/problems/two-sum
5462Unique Paths54.1%Medium0.02853749186115581https://leetcode.com/problems/unique-paths
55146LRU Cache33.2%Medium0.028411001832779885https://leetcode.com/problems/lru-cache
56218The Skyline Problem34.6%Hard0.025479085300984906https://leetcode.com/problems/the-skyline-problem
57836Rectangle Overlap48.6%Easy0.024228925974379843https://leetcode.com/problems/rectangle-overlap
581209Remove All Adjacent Duplicates in String II56.9%Medium0.02324334737232728https://leetcode.com/problems/remove-all-adjacent-duplicates-in-string-ii
5919Remove Nth Node From End of List35.2%Medium0.019074355670058666https://leetcode.com/problems/remove-nth-node-from-end-of-list
60155Min Stack44.5%Easy0.01886181109797383https://leetcode.com/problems/min-stack
61206Reverse Linked List62.5%Easy0.01453513961911317https://leetcode.com/problems/reverse-linked-list
623Longest Substring Without Repeating Characters30.4%Medium0.01391434345649413https://leetcode.com/problems/longest-substring-without-repeating-characters
6344Wildcard Matching24.7%Hard0.013703537497261858https://leetcode.com/problems/wildcard-matching
64122Best Time to Buy and Sell Stock II57.0%Easy0.013351333174864208https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii
65120Triangle44.2%Medium0.013236460625830901https://leetcode.com/problems/triangle
66739Daily Temperatures63.3%Medium0.010032690121814417https://leetcode.com/problems/daily-temperatures
6717Letter Combinations of a Phone Number46.8%Medium0.00987716546167603https://leetcode.com/problems/letter-combinations-of-a-phone-number
68380Insert Delete GetRandom O(1)47.5%Medium0.009820849864094454https://leetcode.com/problems/insert-delete-getrandom-o1
69189Rotate Array34.7%Easy0.00904437880665999https://leetcode.com/problems/rotate-array
7053Maximum Subarray46.5%Easy0.008640295679602939https://leetcode.com/problems/maximum-subarray
71253Meeting Rooms II45.7%Medium0.008079219870546493https://leetcode.com/problems/meeting-rooms-ii
72141Linked List Cycle41.1%Easy0.007843861028908454https://leetcode.com/problems/linked-list-cycle
7356Merge Intervals39.3%Medium0.007796972706004796https://leetcode.com/problems/merge-intervals
74876Middle of the Linked List68.4%Easy0.007624893975696915https://leetcode.com/problems/middle-of-the-linked-list
75163Sum Closest46.0%Medium0.0075259057003469075https://leetcode.com/problems/3sum-closest
76118Pascal's Triangle52.5%Easy0.006749941254175012https://leetcode.com/problems/pascals-triangle
77283Move Zeroes57.8%Easy0.006480437425856766https://leetcode.com/problems/move-zeroes
78973K Closest Points to Origin63.8%Medium0.005773688094426333https://leetcode.com/problems/k-closest-points-to-origin
79237Delete Node in a Linked List63.8%Easy0.005144705881237697https://leetcode.com/problems/delete-node-in-a-linked-list
8046Permutations63.5%Medium0.004216302230139218https://leetcode.com/problems/permutations
81242Valid Anagram56.9%Easy0.004154123743115972https://leetcode.com/problems/valid-anagram
82215Kth Largest Element in an Array55.4%Medium0.003902443976931749https://leetcode.com/problems/kth-largest-element-in-an-array
8378Subsets62.0%Medium0.00368765975195334https://leetcode.com/problems/subsets
8498Validate Binary Search Tree27.8%Medium0.002943776044013381https://leetcode.com/problems/validate-binary-search-tree
85104Maximum Depth of Binary Tree66.0%Easy0.002787846801433134https://leetcode.com/problems/maximum-depth-of-binary-tree
8620Valid Parentheses39.0%Easy0.0023005704055949323https://leetcode.com/problems/valid-parentheses
87347Top K Frequent Elements61.2%Medium0.0014856636219477439https://leetcode.com/problems/top-k-frequent-elements
8850Pow(x;n)30.3%Medium0.0014016892647828818https://leetcode.com/problems/powx-n