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

4.0 KiB

1IDTitleAcceptanceDifficultyFrequencyLeetcode Question Link
2273Integer to English Words27.1%Hard0.37861967367115135https://leetcode.com/problems/integer-to-english-words
3146LRU Cache33.2%Medium0.3225459261278396https://leetcode.com/problems/lru-cache
4387First Unique Character in a String53.4%Easy0.29387200474932007https://leetcode.com/problems/first-unique-character-in-a-string
5236Lowest Common Ancestor of a Binary Tree45.7%Medium0.27050984255037824https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree
6353Design Snake Game34.2%Medium0.2144360950070665https://leetcode.com/problems/design-snake-game
7449Serialize and Deserialize BST52.0%Medium0.17895898716948455https://leetcode.com/problems/serialize-and-deserialize-bst
8981Time Based Key-Value Store53.1%Medium0.17728013452102853https://leetcode.com/problems/time-based-key-value-store
9127Word Ladder29.6%Medium0.16031071649701922https://leetcode.com/problems/word-ladder
10739Daily Temperatures63.3%Medium0.14268538871155678https://leetcode.com/problems/daily-temperatures
1143Multiply Strings33.9%Medium0.13149814559900883https://leetcode.com/problems/multiply-strings
12113Path Sum II46.7%Medium0.10919117261048063https://leetcode.com/problems/path-sum-ii
13362Design Hit Counter63.7%Medium0.09391059944990159https://leetcode.com/problems/design-hit-counter
14139Word Break40.1%Medium0.07342247443539282https://leetcode.com/problems/word-break
15437Path Sum III47.2%Medium0.07021412138431063https://leetcode.com/problems/path-sum-iii
16112Path Sum41.2%Easy0.062250218772217134https://leetcode.com/problems/path-sum
17443String Compression41.3%Easy0.052333720049023605https://leetcode.com/problems/string-compression
1820Valid Parentheses39.0%Easy0.034596174971291214https://leetcode.com/problems/valid-parentheses
194Median of Two Sorted Arrays29.6%Hard0.032966999734600134https://leetcode.com/problems/median-of-two-sorted-arrays
201Two Sum45.6%Easy0.03267443218434049https://leetcode.com/problems/two-sum
2153Maximum Subarray46.5%Easy0.02512179687463535https://leetcode.com/problems/maximum-subarray
22121Best Time to Buy and Sell Stock50.5%Easy0.02468763599282147https://leetcode.com/problems/best-time-to-buy-and-sell-stock
2323Merge k Sorted Lists40.2%Hard0.023981964686485415https://leetcode.com/problems/merge-k-sorted-lists
24285Inorder Successor in BST40.4%Medium0.021266085846178402https://leetcode.com/problems/inorder-successor-in-bst
25212Word Search II34.9%Hard0.021038644146708085https://leetcode.com/problems/word-search-ii
2633Search in Rotated Sorted Array34.5%Medium0.019219533793635182https://leetcode.com/problems/search-in-rotated-sorted-array
27268Missing Number51.7%Easy0.01854480591539982https://leetcode.com/problems/missing-number
28151Reverse Words in a String21.9%Medium0.018535861301292162https://leetcode.com/problems/reverse-words-in-a-string
29289Game of Life54.5%Medium0.01662548684613402https://leetcode.com/problems/game-of-life
30299Bulls and Cows42.4%Easy0.015504186535965254https://leetcode.com/problems/bulls-and-cows
3179Word Search35.6%Medium0.014673179500416637https://leetcode.com/problems/word-search
32150Evaluate Reverse Polish Notation36.3%Medium0.01355493475171521https://leetcode.com/problems/evaluate-reverse-polish-notation
333Longest Substring Without Repeating Characters30.4%Medium0.013288251045064422https://leetcode.com/problems/longest-substring-without-repeating-characters
3413Roman to Integer55.7%Easy0.01303586978808304https://leetcode.com/problems/roman-to-integer
35695Max Area of Island62.7%Medium0.012132390248237822https://leetcode.com/problems/max-area-of-island
36140Word Break II32.6%Hard0.010661081786113668https://leetcode.com/problems/word-break-ii
378String to Integer (atoi)15.4%Medium0.008133799926770198https://leetcode.com/problems/string-to-integer-atoi
38283Move Zeroes57.8%Easy0.002758622439079723https://leetcode.com/problems/move-zeroes