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

7.5 KiB

1IDTitleAcceptanceDifficultyFrequencyLeetcode Question Link
2206Reverse Linked List62.5%Easy0.5096020824537725https://leetcode.com/problems/reverse-linked-list
31Two Sum45.6%Easy0.47406700041221206https://leetcode.com/problems/two-sum
41235Maximum Profit in Job Scheduling44.0%Hard0.4102843945441133https://leetcode.com/problems/maximum-profit-in-job-scheduling
556Merge Intervals39.3%Medium0.3513205757185784https://leetcode.com/problems/merge-intervals
6146LRU Cache33.2%Medium0.28753796985047964https://leetcode.com/problems/lru-cache
71290Convert Binary Number in a Linked List to Integer80.4%Easy0.27867750935869917https://leetcode.com/problems/convert-binary-number-in-a-linked-list-to-integer
82Add Two Numbers33.9%Medium0.23433638113782154https://leetcode.com/problems/add-two-numbers
93Longest Substring Without Repeating Characters30.4%Medium0.23357430753991837https://leetcode.com/problems/longest-substring-without-repeating-characters
1048Rotate Image56.7%Medium0.22339894653970727https://leetcode.com/problems/rotate-image
11909Snakes and Ladders38.4%Medium0.2176811889223697https://leetcode.com/problems/snakes-and-ladders
12344Reverse String68.5%Easy0.21237677460220186https://leetcode.com/problems/reverse-string
13468Validate IP Address24.1%Medium0.19827548473619627https://leetcode.com/problems/validate-ip-address
14246Strobogrammatic Number45.0%Easy0.187957697907993https://leetcode.com/problems/strobogrammatic-number
15394Decode String50.0%Medium0.18648126820299707https://leetcode.com/problems/decode-string
165Longest Palindromic Substring29.5%Medium0.1696048381235884https://leetcode.com/problems/longest-palindromic-substring
17235Lowest Common Ancestor of a Binary Search Tree49.9%Easy0.15450422411236212https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree
18191Number of 1 Bits49.8%Easy0.1413992905633252https://leetcode.com/problems/number-of-1-bits
1991Decode Ways24.7%Medium0.13946258598914826https://leetcode.com/problems/decode-ways
20198House Robber42.0%Easy0.12709898426651453https://leetcode.com/problems/house-robber
2125Reverse Nodes in k-Group42.1%Hard0.11843859582750475https://leetcode.com/problems/reverse-nodes-in-k-group
2253Maximum Subarray46.5%Easy0.11514006965309906https://leetcode.com/problems/maximum-subarray
23247Strobogrammatic Number II47.6%Medium0.1040197878075301https://leetcode.com/problems/strobogrammatic-number-ii
2488Merge Sorted Array39.4%Easy0.10303644235421959https://leetcode.com/problems/merge-sorted-array
25200Number of Islands46.8%Medium0.09910455319823885https://leetcode.com/problems/number-of-islands
2620Valid Parentheses39.0%Easy0.09286263438126167https://leetcode.com/problems/valid-parentheses
27141Linked List Cycle41.1%Easy0.08387846684791357https://leetcode.com/problems/linked-list-cycle
28905Sort Array By Parity74.1%Easy0.08328510247304294https://leetcode.com/problems/sort-array-by-parity
29143Reorder List37.1%Medium0.07027335591777661https://leetcode.com/problems/reorder-list
30121Best Time to Buy and Sell Stock50.5%Easy0.06233349258151901https://leetcode.com/problems/best-time-to-buy-and-sell-stock
31237Delete Node in a Linked List63.8%Easy0.06126915938306008https://leetcode.com/problems/delete-node-in-a-linked-list
32160Intersection of Two Linked Lists40.6%Easy0.05844735064567987https://leetcode.com/problems/intersection-of-two-linked-lists
3354Spiral Matrix34.1%Medium0.05783815482970009https://leetcode.com/problems/spiral-matrix
3414Longest Common Prefix35.4%Easy0.051846064173015856https://leetcode.com/problems/longest-common-prefix
3533Search in Rotated Sorted Array34.5%Medium0.05046797817178903https://leetcode.com/problems/search-in-rotated-sorted-array
3623Merge k Sorted Lists40.2%Hard0.04853398505532907https://leetcode.com/problems/merge-k-sorted-lists
37445Add Two Numbers II54.5%Medium0.04843561709959499https://leetcode.com/problems/add-two-numbers-ii
3826Remove Duplicates from Sorted Array45.1%Easy0.0476757427679509https://leetcode.com/problems/remove-duplicates-from-sorted-array
398String to Integer (atoi)15.4%Medium0.04549614908874012https://leetcode.com/problems/string-to-integer-atoi
40102Binary Tree Level Order Traversal54.6%Medium0.04369064305418892https://leetcode.com/problems/binary-tree-level-order-traversal
41241Different Ways to Add Parentheses55.2%Medium0.03880215185647971https://leetcode.com/problems/different-ways-to-add-parentheses
42628Maximum Product of Three Numbers47.1%Easy0.03681397312271631https://leetcode.com/problems/maximum-product-of-three-numbers
43242Valid Anagram56.9%Easy0.03678011874543614https://leetcode.com/problems/valid-anagram
44189Rotate Array34.7%Easy0.03569682997206547https://leetcode.com/problems/rotate-array
4521Merge Two Sorted Lists53.5%Easy0.03548634253021285https://leetcode.com/problems/merge-two-sorted-lists
46108Convert Sorted Array to Binary Search Tree57.9%Easy0.03421710570764629https://leetcode.com/problems/convert-sorted-array-to-binary-search-tree
47384Shuffle an Array52.8%Medium0.03399118781703353https://leetcode.com/problems/shuffle-an-array
48253Meeting Rooms II45.7%Medium0.03193246767820989https://leetcode.com/problems/meeting-rooms-ii
4917Letter Combinations of a Phone Number46.8%Medium0.027199239804368825https://leetcode.com/problems/letter-combinations-of-a-phone-number
50125Valid Palindrome36.7%Easy0.02462208292471368https://leetcode.com/problems/valid-palindrome
51605Can Place Flowers31.6%Easy0.02457126073050533https://leetcode.com/problems/can-place-flowers
52151Reverse Words in a String21.9%Medium0.024321004216273485https://leetcode.com/problems/reverse-words-in-a-string
53144Binary Tree Preorder Traversal55.7%Medium0.024170360927813044https://leetcode.com/problems/binary-tree-preorder-traversal
54212Word Search II34.9%Hard0.02201654487096149https://leetcode.com/problems/word-search-ii
55153Sum26.8%Medium0.019619157889188592https://leetcode.com/problems/3sum
5619Remove Nth Node From End of List35.2%Medium0.019074355670058666https://leetcode.com/problems/remove-nth-node-from-end-of-list
57450Delete Node in a BST43.1%Medium0.018536211907915243https://leetcode.com/problems/delete-node-in-a-bst
58234Palindrome Linked List39.3%Easy0.01801241989645556https://leetcode.com/problems/palindrome-linked-list
59412Fizz Buzz62.3%Easy0.016051709010507904https://leetcode.com/problems/fizz-buzz
60110Balanced Binary Tree43.5%Easy0.015742847432510365https://leetcode.com/problems/balanced-binary-tree
617Reverse Integer25.8%Easy0.011576347096986317https://leetcode.com/problems/reverse-integer
62207Course Schedule43.1%Medium0.01113459480911671https://leetcode.com/problems/course-schedule
63739Daily Temperatures63.3%Medium0.010032690121814417https://leetcode.com/problems/daily-temperatures
6422Generate Parentheses62.7%Medium0.009785877810632554https://leetcode.com/problems/generate-parentheses
6546Permutations63.5%Medium0.009461803137288448https://leetcode.com/problems/permutations
66279Perfect Squares47.4%Medium0.009216655104924008https://leetcode.com/problems/perfect-squares
6749Group Anagrams56.9%Medium0.008538951314232168https://leetcode.com/problems/group-anagrams
68173Binary Search Tree Iterator56.6%Medium0.008489015324911316https://leetcode.com/problems/binary-search-tree-iterator
69876Middle of the Linked List68.4%Easy0.007624893975696915https://leetcode.com/problems/middle-of-the-linked-list