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

1.8 KiB

1IDTitleAcceptanceDifficultyFrequencyLeetcode Question Link
2592Fraction Addition and Subtraction49.0%Medium2.1852914017256673https://leetcode.com/problems/fraction-addition-and-subtraction
3691Stickers to Spell Word42.9%Hard1.614456743546043https://leetcode.com/problems/stickers-to-spell-word
4598Range Addition II49.6%Easy1.5459245067117746https://leetcode.com/problems/range-addition-ii
5634Find the Derangement of An Array40.1%Medium1.3910002521573033https://leetcode.com/problems/find-the-derangement-of-an-array
6166Fraction to Recurring Decimal21.6%Medium1.1471239400937834https://leetcode.com/problems/fraction-to-recurring-decimal
7697Degree of an Array53.8%Easy0.5762892819141592https://leetcode.com/problems/degree-of-an-array
87171-bit and 2-bit Characters48.8%Easy0.33241507811894616https://leetcode.com/problems/1-bit-and-2-bit-characters
914Longest Common Prefix35.4%Easy0.276319223139963https://leetcode.com/problems/longest-common-prefix
10945Minimum Increment to Make Array Unique46.3%Medium0.26121549926361765https://leetcode.com/problems/minimum-increment-to-make-array-unique
11234Palindrome Linked List39.3%Easy0.19278946654918988https://leetcode.com/problems/palindrome-linked-list
1223Merge k Sorted Lists40.2%Hard0.1308579191643603https://leetcode.com/problems/merge-k-sorted-lists
13227Basic Calculator II36.9%Medium0.07203574248429732https://leetcode.com/problems/basic-calculator-ii
14518Coin Change 250.2%Medium0.04656063549394753https://leetcode.com/problems/coin-change-2
1533Search in Rotated Sorted Array34.5%Medium0.03732913608127183https://leetcode.com/problems/search-in-rotated-sorted-array
16162Find Peak Element43.3%Medium0.013607709218149423https://leetcode.com/problems/find-peak-element