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

6.5 KiB

1IDTitleAcceptanceDifficultyFrequencyLeetcode Question Link
26ZigZag Conversion36.3%Medium0.8494120771045042https://leetcode.com/problems/zigzag-conversion
31473Paint House III48.1%Hard0.6775218626568644https://leetcode.com/problems/paint-house-iii
41041Robot Bounded In Circle49.6%Medium0.583924058361535https://leetcode.com/problems/robot-bounded-in-circle
5243Shortest Word Distance61.0%Easy0.41203384391389536https://leetcode.com/problems/shortest-word-distance
61Two Sum45.6%Easy0.3475579001540161https://leetcode.com/problems/two-sum
71497Check If Array Pairs Are Divisible by k41.1%Medium0.30887395064431883https://leetcode.com/problems/check-if-array-pairs-are-divisible-by-k
81297Maximum Number of Occurrences of a Substring47.3%Medium0.2800774730665616https://leetcode.com/problems/maximum-number-of-occurrences-of-a-substring
9273Integer to English Words27.1%Hard0.26532833604818473https://leetcode.com/problems/integer-to-english-words
10146LRU Cache33.2%Medium0.2585885798043696https://leetcode.com/problems/lru-cache
1154Spiral Matrix34.1%Medium0.18243181645556916https://leetcode.com/problems/spiral-matrix
1256Merge Intervals39.3%Medium0.13713421800838543https://leetcode.com/problems/merge-intervals
13224Basic Calculator36.8%Hard0.12435274487954455https://leetcode.com/problems/basic-calculator
14242Valid Anagram56.9%Easy0.11860368841030557https://leetcode.com/problems/valid-anagram
1520Valid Parentheses39.0%Easy0.10693122823835342https://leetcode.com/problems/valid-parentheses
1668Text Justification27.7%Hard0.10627110304957266https://leetcode.com/problems/text-justification
17977Squares of a Sorted Array72.1%Easy0.07598590697792203https://leetcode.com/problems/squares-of-a-sorted-array
18532K-diff Pairs in an Array31.6%Easy0.07292523990467245https://leetcode.com/problems/k-diff-pairs-in-an-array
19283Move Zeroes57.8%Easy0.06974868393702997https://leetcode.com/problems/move-zeroes
20206Reverse Linked List62.5%Easy0.06846564614449077https://leetcode.com/problems/reverse-linked-list
21199Binary Tree Right Side View54.1%Medium0.06748154336946242https://leetcode.com/problems/binary-tree-right-side-view
2253Maximum Subarray46.5%Easy0.06356179958832935https://leetcode.com/problems/maximum-subarray
2325Reverse Nodes in k-Group42.1%Hard0.062178154907672076https://leetcode.com/problems/reverse-nodes-in-k-group
24416Partition Equal Subset Sum43.7%Medium0.05309102319682948https://leetcode.com/problems/partition-equal-subset-sum
2512Integer to Roman55.1%Medium0.05217122936969127https://leetcode.com/problems/integer-to-roman
2682Remove Duplicates from Sorted List II36.8%Medium0.05090157276603699https://leetcode.com/problems/remove-duplicates-from-sorted-list-ii
272Add Two Numbers33.9%Medium0.04985995397332526https://leetcode.com/problems/add-two-numbers
28240Search a 2D Matrix II43.2%Medium0.04647676584572884https://leetcode.com/problems/search-a-2d-matrix-ii
29236Lowest Common Ancestor of a Binary Tree45.7%Medium0.041648587234261826https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree
3046Permutations63.5%Medium0.03732163223353564https://leetcode.com/problems/permutations
31128Longest Consecutive Sequence45.1%Hard0.035726058864721646https://leetcode.com/problems/longest-consecutive-sequence
32238Product of Array Except Self60.1%Medium0.03482987258052727https://leetcode.com/problems/product-of-array-except-self
3375Sort Colors47.3%Medium0.030801991570373215https://leetcode.com/problems/sort-colors
34134Gas Station38.5%Medium0.030183377823098576https://leetcode.com/problems/gas-station
35344Reverse String68.5%Easy0.029048355159926334https://leetcode.com/problems/reverse-string
36324Wiggle Sort II29.9%Medium0.02898753687325229https://leetcode.com/problems/wiggle-sort-ii
3733Search in Rotated Sorted Array34.5%Medium0.0287009496170278https://leetcode.com/problems/search-in-rotated-sorted-array
3873Set Matrix Zeroes43.1%Medium0.027769920533553028https://leetcode.com/problems/set-matrix-zeroes
395Longest Palindromic Substring29.5%Medium0.02757010450426751https://leetcode.com/problems/longest-palindromic-substring
40735Asteroid Collision41.0%Medium0.024723138086794758https://leetcode.com/problems/asteroid-collision
413Longest Substring Without Repeating Characters30.4%Medium0.024604324231039386https://leetcode.com/problems/longest-substring-without-repeating-characters
4228Implement strStr()34.5%Easy0.02439383324633083https://leetcode.com/problems/implement-strstr
4372Edit Distance44.8%Hard0.022400140173127806https://leetcode.com/problems/edit-distance
4421Merge Two Sorted Lists53.5%Easy0.02011578137441701https://leetcode.com/problems/merge-two-sorted-lists
45153Sum26.8%Medium0.019619157889188592https://leetcode.com/problems/3sum
46121Best Time to Buy and Sell Stock50.5%Easy0.018954919107260947https://leetcode.com/problems/best-time-to-buy-and-sell-stock
47253Meeting Rooms II45.7%Medium0.018087309810579388https://leetcode.com/problems/meeting-rooms-ii
48322Coin Change35.5%Medium0.016022774188122292https://leetcode.com/problems/coin-change
49189Rotate Array34.7%Easy0.016022774188122292https://leetcode.com/problems/rotate-array
50557Reverse Words in a String III69.8%Easy0.013731764001315941https://leetcode.com/problems/reverse-words-in-a-string-iii
511047Remove All Adjacent Duplicates In String68.6%Easy0.013059277989179281https://leetcode.com/problems/remove-all-adjacent-duplicates-in-string
52227Basic Calculator II36.9%Medium0.01239941490503826https://leetcode.com/problems/basic-calculator-ii
53876Middle of the Linked List68.4%Easy0.007624893975696915https://leetcode.com/problems/middle-of-the-linked-list
54200Number of Islands46.8%Medium0.006490251382779317https://leetcode.com/problems/number-of-islands
55973K Closest Points to Origin63.8%Medium0.005773688094426333https://leetcode.com/problems/k-closest-points-to-origin
56167Two Sum II - Input array is sorted54.1%Easy0.005507380022589096https://leetcode.com/problems/two-sum-ii-input-array-is-sorted
57207Course Schedule43.1%Medium0.004964021114211758https://leetcode.com/problems/course-schedule
58104Maximum Depth of Binary Tree66.0%Easy0.002787846801433134https://leetcode.com/problems/maximum-depth-of-binary-tree
59203Remove Linked List Elements38.6%Easy0.0016237064659255223https://leetcode.com/problems/remove-linked-list-elements
601229Meeting Scheduler52.7%Medium0https://leetcode.com/problems/meeting-scheduler