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

12 KiB

1IDTitleAcceptanceDifficultyFrequencyLeetcode Question Link
242Trapping Rain Water48.9%Hard3.4017115728252114https://leetcode.com/problems/trapping-rain-water
31086High Five79.7%Easy3.081613006775713https://leetcode.com/problems/high-five
4209Minimum Size Subarray Sum38.2%Medium2.761514440726214https://leetcode.com/problems/minimum-size-subarray-sum
5289Game of Life54.5%Medium2.4414158746767156https://leetcode.com/problems/game-of-life
64Median of Two Sorted Arrays29.6%Hard2.2841074960153698https://leetcode.com/problems/median-of-two-sorted-arrays
7688Knight Probability in Chessboard48.9%Medium2.217128926271222https://leetcode.com/problems/knight-probability-in-chessboard
8387First Unique Character in a String53.4%Easy2.12805942959263https://leetcode.com/problems/first-unique-character-in-a-string
9592Fraction Addition and Subtraction49.0%Medium1.8162790864023735https://leetcode.com/problems/fraction-addition-and-subtraction
10443String Compression41.3%Easy1.7567223362906532https://leetcode.com/problems/string-compression
11862Shortest Subarray with Sum at Least K24.6%Hard1.7383767819805511https://leetcode.com/problems/shortest-subarray-with-sum-at-least-k
12166Fraction to Recurring Decimal21.6%Medium1.719216136548627https://leetcode.com/problems/fraction-to-recurring-decimal
13722Remove Comments34.6%Medium1.6355405363367377https://leetcode.com/problems/remove-comments
14238Product of Array Except Self60.1%Medium1.5653986776487465https://leetcode.com/problems/product-of-array-except-self
1570Climbing Stairs47.8%Easy1.515339965084781https://leetcode.com/problems/climbing-stairs
1649Group Anagrams56.9%Medium1.514137260931213https://leetcode.com/problems/group-anagrams
17780Reaching Points29.4%Hard1.4774527855096036https://leetcode.com/problems/reaching-points
18706Design HashMap61.3%Easy1.4405011789563176https://leetcode.com/problems/design-hashmap
19121Best Time to Buy and Sell Stock50.5%Easy1.343547532072845https://leetcode.com/problems/best-time-to-buy-and-sell-stock
201041Robot Bounded In Circle49.6%Medium1.3318656536208857https://leetcode.com/problems/robot-bounded-in-circle
211Two Sum45.6%Easy1.0889331084185998https://leetcode.com/problems/two-sum
2211Container With Most Water50.8%Medium0.8565164282104613https://leetcode.com/problems/container-with-most-water
238String to Integer (atoi)15.4%Medium0.8331114806091768https://leetcode.com/problems/string-to-integer-atoi
24657Robot Return to Origin73.5%Easy0.7562359758559519https://leetcode.com/problems/robot-return-to-origin
251163Last Substring in Lexicographical Order33.9%Hard0.7261919753374027https://leetcode.com/problems/last-substring-in-lexicographical-order
2664Minimum Path Sum54.5%Medium0.6731263364629722https://leetcode.com/problems/minimum-path-sum
27146LRU Cache33.2%Medium0.6099535003338225https://leetcode.com/problems/lru-cache
28153Find Minimum in Rotated Sorted Array45.1%Medium0.552467601857292https://leetcode.com/problems/find-minimum-in-rotated-sorted-array
29524Longest Word in Dictionary through Deleting48.4%Medium0.5380680817633897https://leetcode.com/problems/longest-word-in-dictionary-through-deleting
3091Decode Ways24.7%Medium0.5068067838189668https://leetcode.com/problems/decode-ways
31532K-diff Pairs in an Array31.6%Easy0.4524148616095762https://leetcode.com/problems/k-diff-pairs-in-an-array
3233Search in Rotated Sorted Array34.5%Medium0.43615506649398705https://leetcode.com/problems/search-in-rotated-sorted-array
33322Coin Change35.5%Medium0.42789160115933317https://leetcode.com/problems/coin-change
34887Super Egg Drop27.1%Hard0.37614858779077814https://leetcode.com/problems/super-egg-drop
3553Maximum Subarray46.5%Easy0.3543183348432278https://leetcode.com/problems/maximum-subarray
3654Spiral Matrix34.1%Medium0.35306273805914157https://leetcode.com/problems/spiral-matrix
371010Pairs of Songs With Total Durations Divisible by 6047.4%Easy0.3251259020780217https://leetcode.com/problems/pairs-of-songs-with-total-durations-divisible-by-60
38942DI String Match72.6%Easy0.30356511862478397https://leetcode.com/problems/di-string-match
39215Kth Largest Element in an Array55.4%Medium0.30223837022598843https://leetcode.com/problems/kth-largest-element-in-an-array
40200Number of Islands46.8%Medium0.27691676627418055https://leetcode.com/problems/number-of-islands
41218The Skyline Problem34.6%Hard0.27469487692496974https://leetcode.com/problems/the-skyline-problem
42141Linked List Cycle41.1%Easy0.27449284203401514https://leetcode.com/problems/linked-list-cycle
43122Best Time to Buy and Sell Stock II57.0%Easy0.2648683639779438https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii
44119Pascal's Triangle II49.0%Easy0.26169674611472327https://leetcode.com/problems/pascals-triangle-ii
4544Wildcard Matching24.7%Hard0.2463964485679353https://leetcode.com/problems/wildcard-matching
46240Search a 2D Matrix II43.2%Medium0.24218097481422138https://leetcode.com/problems/search-a-2d-matrix-ii
47326Power of Three42.1%Easy0.2330133408255935https://leetcode.com/problems/power-of-three
48992Subarrays with K Different Integers48.6%Hard0.2115783451497167https://leetcode.com/problems/subarrays-with-k-different-integers
49560Subarray Sum Equals K43.9%Medium0.19073820122876284https://leetcode.com/problems/subarray-sum-equals-k
50206Reverse Linked List62.5%Easy0.1737441239828363https://leetcode.com/problems/reverse-linked-list
51344Reverse String68.5%Easy0.16907996884887766https://leetcode.com/problems/reverse-string
523Longest Substring Without Repeating Characters30.4%Medium0.15840625330250555https://leetcode.com/problems/longest-substring-without-repeating-characters
53155Min Stack44.5%Easy0.15817175770099312https://leetcode.com/problems/min-stack
54332Reconstruct Itinerary36.7%Medium0.15671959735502852https://leetcode.com/problems/reconstruct-itinerary
55931Minimum Falling Path Sum62.5%Medium0.1563727956152988https://leetcode.com/problems/minimum-falling-path-sum
56242Valid Anagram56.9%Easy0.13963976683590715https://leetcode.com/problems/valid-anagram
5756Merge Intervals39.3%Medium0.13713421800838543https://leetcode.com/problems/merge-intervals
5862Unique Paths54.1%Medium0.1311257686834479https://leetcode.com/problems/unique-paths
59460LFU Cache34.2%Hard0.11848160362052347https://leetcode.com/problems/lfu-cache
6072Edit Distance44.8%Hard0.11629970881467097https://leetcode.com/problems/edit-distance
61295Find Median from Data Stream44.3%Hard0.10502147513923703https://leetcode.com/problems/find-median-from-data-stream
6246Permutations63.5%Medium0.10041538372599258https://leetcode.com/problems/permutations
631051Height Checker71.1%Easy0.09876441467241241https://leetcode.com/problems/height-checker
641395Count Number of Teams82.0%Medium0.09817811071565465https://leetcode.com/problems/count-number-of-teams
6576Minimum Window Substring34.6%Hard0.09532438646867135https://leetcode.com/problems/minimum-window-substring
66720Longest Word in Dictionary48.2%Easy0.09362342046209744https://leetcode.com/problems/longest-word-in-dictionary
67836Rectangle Overlap48.6%Easy0.09358079943969791https://leetcode.com/problems/rectangle-overlap
68647Palindromic Substrings60.6%Medium0.08992575300574686https://leetcode.com/problems/palindromic-substrings
6978Subsets62.0%Medium0.08834203894021862https://leetcode.com/problems/subsets
70939Minimum Area Rectangle51.8%Medium0.08361414004113359https://leetcode.com/problems/minimum-area-rectangle
71724Find Pivot Index44.0%Easy0.08357684789821086https://leetcode.com/problems/find-pivot-index
72118Pascal's Triangle52.5%Easy0.07970401164997687https://leetcode.com/problems/pascals-triangle
73547Friend Circles58.6%Medium0.07408600065076033https://leetcode.com/problems/friend-circles
7413Roman to Integer55.7%Easy0.067239661116769https://leetcode.com/problems/roman-to-integer
75588Design In-Memory File System45.9%Hard0.05841076215641451https://leetcode.com/problems/design-in-memory-file-system
76104Maximum Depth of Binary Tree66.0%Easy0.05499247412856504https://leetcode.com/problems/maximum-depth-of-binary-tree
77153Sum26.8%Medium0.05357467464947331https://leetcode.com/problems/3sum
78120Triangle44.2%Medium0.05192600557601006https://leetcode.com/problems/triangle
7999Recover Binary Search Tree39.7%Hard0.051264071283762605https://leetcode.com/problems/recover-binary-search-tree
80445Add Two Numbers II54.5%Medium0.04843561709959499https://leetcode.com/problems/add-two-numbers-ii
8119Remove Nth Node From End of List35.2%Medium0.048122350207849794https://leetcode.com/problems/remove-nth-node-from-end-of-list
8220Valid Parentheses39.0%Easy0.045585204865984434https://leetcode.com/problems/valid-parentheses
83283Move Zeroes57.8%Easy0.04519585811312136https://leetcode.com/problems/move-zeroes
84204Count Primes31.5%Easy0.04340205577484725https://leetcode.com/problems/count-primes
851219Path with Maximum Gold65.1%Medium0.04111576039097048https://leetcode.com/problems/path-with-maximum-gold
86993Cousins in Binary Tree52.0%Easy0.03876454345024432https://leetcode.com/problems/cousins-in-binary-tree
87380Insert Delete GetRandom O(1)47.5%Medium0.038717635350707984https://leetcode.com/problems/insert-delete-getrandom-o1
88317Shortest Distance from All Buildings41.4%Hard0.03795522000043556https://leetcode.com/problems/shortest-distance-from-all-buildings
8950Pow(x;n)30.3%Medium0.034465967879243095https://leetcode.com/problems/powx-n
90167Two Sum II - Input array is sorted54.1%Easy0.03393376616898467https://leetcode.com/problems/two-sum-ii-input-array-is-sorted
91198House Robber42.0%Easy0.033320991026093004https://leetcode.com/problems/house-robber
92237Delete Node in a Linked List63.8%Easy0.031728549820175866https://leetcode.com/problems/delete-node-in-a-linked-list
93163Sum Closest46.0%Medium0.02976964023166436https://leetcode.com/problems/3sum-closest
9498Validate Binary Search Tree27.8%Medium0.026187123416340663https://leetcode.com/problems/validate-binary-search-tree
9523Merge k Sorted Lists40.2%Hard0.0250564321052577https://leetcode.com/problems/merge-k-sorted-lists
961209Remove All Adjacent Duplicates in String II56.9%Medium0.02324334737232728https://leetcode.com/problems/remove-all-adjacent-duplicates-in-string-ii
9739Combination Sum56.1%Medium0.02267028230338623https://leetcode.com/problems/combination-sum
98739Daily Temperatures63.3%Medium0.022433642692117093https://leetcode.com/problems/daily-temperatures
99207Course Schedule43.1%Medium0.019709926055136454https://leetcode.com/problems/course-schedule
10088Merge Sorted Array39.4%Easy0.018667009593356397https://leetcode.com/problems/merge-sorted-array
101438Find All Anagrams in a String43.3%Medium0.01819334596120571https://leetcode.com/problems/find-all-anagrams-in-a-string
102253Meeting Rooms II45.7%Medium0.018087309810579388https://leetcode.com/problems/meeting-rooms-ii
10317Letter Combinations of a Phone Number46.8%Medium0.017492519932499718https://leetcode.com/problems/letter-combinations-of-a-phone-number
104876Middle of the Linked List68.4%Easy0.01707497375257815https://leetcode.com/problems/middle-of-the-linked-list
105628Maximum Product of Three Numbers47.1%Easy0.016529301951210565https://leetcode.com/problems/maximum-product-of-three-numbers
106189Rotate Array34.7%Easy0.016022774188122292https://leetcode.com/problems/rotate-array
107160Intersection of Two Linked Lists40.6%Easy0.010994491398666248https://leetcode.com/problems/intersection-of-two-linked-lists
10863Unique Paths II34.6%Medium0.008712753874961187https://leetcode.com/problems/unique-paths-ii
109347Top K Frequent Elements61.2%Medium0.005929457040438874https://leetcode.com/problems/top-k-frequent-elements
110973K Closest Points to Origin63.8%Medium0.005773688094426333https://leetcode.com/problems/k-closest-points-to-origin
1111109Corporate Flight Bookings52.8%Medium0https://leetcode.com/problems/corporate-flight-bookings
1121116Print Zero Even Odd56.0%Medium0https://leetcode.com/problems/print-zero-even-odd
1131427Perform String Shifts53.1%Easy0https://leetcode.com/problems/perform-string-shifts