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

9.1 KiB

1IDTitleAcceptanceDifficultyFrequencyLeetcode Question Link
2433Minimum Genetic Mutation41.8%Medium3.6380005958321364https://leetcode.com/problems/minimum-genetic-mutation
3635Design Log Storage System58.6%Medium2.6952344479401242https://leetcode.com/problems/design-log-storage-system
4780Reaching Points29.4%Hard1.752468300048112https://leetcode.com/problems/reaching-points
5341Flatten Nested List Iterator52.9%Medium1.7121511329488845https://leetcode.com/problems/flatten-nested-list-iterator
6256Paint House52.1%Easy1.6915174692517947https://leetcode.com/problems/paint-house
7296Best Meeting Point57.5%Hard1.6625988978022896https://leetcode.com/problems/best-meeting-point
857Insert Interval33.5%Hard1.2776821685359496https://leetcode.com/problems/insert-interval
9608Tree Node67.1%Medium1.204906947317733https://leetcode.com/problems/tree-node
10355Design Twitter30.3%Medium1.1502303678885653https://leetcode.com/problems/design-twitter
11269Alien Dictionary33.3%Hard1.099252698552309https://leetcode.com/problems/alien-dictionary
12468Validate IP Address24.1%Medium1.0898016589859547https://leetcode.com/problems/validate-ip-address
13585Investments in 201654.7%Medium0.9249487946172696https://leetcode.com/problems/investments-in-2016
14647Palindromic Substrings60.6%Medium0.7666949181474819https://leetcode.com/problems/palindromic-substrings
1567924 Game46.4%Hard0.7472144018302211https://leetcode.com/problems/24-game
1620Valid Parentheses39.0%Easy0.6769810494443036https://leetcode.com/problems/valid-parentheses
17831Masking Personal Information44.1%Medium0.5705448584676129https://leetcode.com/problems/masking-personal-information
18920Number of Music Playlists46.5%Hard0.5596157879354227https://leetcode.com/problems/number-of-music-playlists
19547Friend Circles58.6%Medium0.5259672525715527https://leetcode.com/problems/friend-circles
20580Count Student Number in Departments48.7%Medium0.487438691067837https://leetcode.com/problems/count-student-number-in-departments
21146LRU Cache33.2%Medium0.37918622364432397https://leetcode.com/problems/lru-cache
22161One Edit Distance32.3%Medium0.3732496560572872https://leetcode.com/problems/one-edit-distance
2368Text Justification27.7%Hard0.37052394220493184https://leetcode.com/problems/text-justification
2456Merge Intervals39.3%Medium0.3513205757185784https://leetcode.com/problems/merge-intervals
25295Find Median from Data Stream44.3%Hard0.32347449067924283https://leetcode.com/problems/find-median-from-data-stream
26307Range Sum Query - Mutable34.6%Medium0.30730282294419214https://leetcode.com/problems/range-sum-query-mutable
2742Trapping Rain Water48.9%Hard0.30245147181648074https://leetcode.com/problems/trapping-rain-water
281326Minimum Number of Taps to Open to Water a Garden43.6%Hard0.2786048543006643https://leetcode.com/problems/minimum-number-of-taps-to-open-to-water-a-garden
29218The Skyline Problem34.6%Hard0.27469487692496974https://leetcode.com/problems/the-skyline-problem
30945Minimum Increment to Make Array Unique46.3%Medium0.27427904232444056https://leetcode.com/problems/minimum-increment-to-make-array-unique
31149Max Points on a Line16.9%Hard0.2686338774810864https://leetcode.com/problems/max-points-on-a-line
3210Regular Expression Matching26.8%Hard0.2659916203394624https://leetcode.com/problems/regular-expression-matching
331348Tweet Counts Per Frequency29.0%Medium0.25131442828090605https://leetcode.com/problems/tweet-counts-per-frequency
34251Flatten 2D Vector45.7%Medium0.2425088583672668https://leetcode.com/problems/flatten-2d-vector
35200Number of Islands46.8%Medium0.21059224281730043https://leetcode.com/problems/number-of-islands
36532K-diff Pairs in an Array31.6%Easy0.20837786270708894https://leetcode.com/problems/k-diff-pairs-in-an-array
37139Word Break40.1%Medium0.19843337930716162https://leetcode.com/problems/word-break
38706Design HashMap61.3%Easy0.1960785423771685https://leetcode.com/problems/design-hashmap
39133Clone Graph34.8%Medium0.1530997075812833https://leetcode.com/problems/clone-graph
40380Insert Delete GetRandom O(1)47.5%Medium0.1466146891661091https://leetcode.com/problems/insert-delete-getrandom-o1
41528Random Pick with Weight43.9%Medium0.12617342152539626https://leetcode.com/problems/random-pick-with-weight
4284Largest Rectangle in Histogram35.2%Hard0.12570469475928556https://leetcode.com/problems/largest-rectangle-in-histogram
43586Customer Placing the Largest Number of Orders73.0%Easy0.12361395596717664https://leetcode.com/problems/customer-placing-the-largest-number-of-orders
44208Implement Trie (Prefix Tree)49.4%Medium0.1062062589908652https://leetcode.com/problems/implement-trie-prefix-tree
4512Integer to Roman55.1%Medium0.09981819303484349https://leetcode.com/problems/integer-to-roman
4691Decode Ways24.7%Medium0.09146617076347968https://leetcode.com/problems/decode-ways
4760Permutation Sequence38.4%Hard0.07948571541724253https://leetcode.com/problems/permutation-sequence
4843Multiply Strings33.9%Medium0.07944184170158367https://leetcode.com/problems/multiply-strings
4923Merge k Sorted Lists40.2%Hard0.07900382769570498https://leetcode.com/problems/merge-k-sorted-lists
50271Encode and Decode Strings31.5%Medium0.07197349962508924https://leetcode.com/problems/encode-and-decode-strings
51346Moving Average from Data Stream70.9%Easy0.06887402901251127https://leetcode.com/problems/moving-average-from-data-stream
521Two Sum45.6%Easy0.06437944929577392https://leetcode.com/problems/two-sum
53202Happy Number50.4%Easy0.05503451923624455https://leetcode.com/problems/happy-number
54767Reorganize String48.7%Medium0.05216306328458592https://leetcode.com/problems/reorganize-string
55981Time Based Key-Value Store53.1%Medium0.049406315387071284https://leetcode.com/problems/time-based-key-value-store
561041Robot Bounded In Circle49.6%Medium0.0483770263821056https://leetcode.com/problems/robot-bounded-in-circle
57239Sliding Window Maximum43.0%Hard0.0483746857022364https://leetcode.com/problems/sliding-window-maximum
58490The Maze51.4%Medium0.04287902305923364https://leetcode.com/problems/the-maze
59540Single Element in a Sorted Array57.9%Medium0.042721256704769804https://leetcode.com/problems/single-element-in-a-sorted-array
60716Max Stack42.6%Easy0.042695919196489414https://leetcode.com/problems/max-stack
61235Lowest Common Ancestor of a Binary Search Tree49.9%Easy0.032470385030784074https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree
62814Binary Tree Pruning74.5%Medium0.03113091859517317https://leetcode.com/problems/binary-tree-pruning
6344Wildcard Matching24.7%Hard0.030573033362282363https://leetcode.com/problems/wildcard-matching
64496Next Greater Element I63.8%Easy0.029462032730316202https://leetcode.com/problems/next-greater-element-i
6536Valid Sudoku48.7%Medium0.028722132350970705https://leetcode.com/problems/valid-sudoku
66482License Key Formatting43.1%Easy0.024799783060416587https://leetcode.com/problems/license-key-formatting
67124Binary Tree Maximum Path Sum34.3%Hard0.021945744272529284https://leetcode.com/problems/binary-tree-maximum-path-sum
68140Word Break II32.6%Hard0.016800341389107805https://leetcode.com/problems/word-break-ii
69118Pascal's Triangle52.5%Easy0.015123796918620345https://leetcode.com/problems/pascals-triangle
70206Reverse Linked List62.5%Easy0.01453513961911317https://leetcode.com/problems/reverse-linked-list
7176Minimum Window Substring34.6%Hard0.013966707481708198https://leetcode.com/problems/minimum-window-substring
72105Construct Binary Tree from Preorder and Inorder Traversal48.8%Medium0.01261934861981589https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal
73210Course Schedule II40.7%Medium0.011869857339029215https://leetcode.com/problems/course-schedule-ii
74169Majority Element58.7%Easy0.010558521365115802https://leetcode.com/problems/majority-element
75101Symmetric Tree46.8%Easy0.007646596306528098https://leetcode.com/problems/symmetric-tree
76106Construct Binary Tree from Inorder and Postorder Traversal47.2%Medium0.00234041415121758https://leetcode.com/problems/construct-binary-tree-from-inorder-and-postorder-traversal
77323Number of Connected Components in an Undirected Graph56.0%Medium0https://leetcode.com/problems/number-of-connected-components-in-an-undirected-graph
78378Kth Smallest Element in a Sorted Matrix54.3%Medium0https://leetcode.com/problems/kth-smallest-element-in-a-sorted-matrix
79407Trapping Rain Water II42.4%Hard0https://leetcode.com/problems/trapping-rain-water-ii
80868Binary Gap60.6%Easy0https://leetcode.com/problems/binary-gap
811206Design Skiplist57.3%Hard0https://leetcode.com/problems/design-skiplist
821347Minimum Number of Steps to Make Two Strings Anagram74.7%Medium0https://leetcode.com/problems/minimum-number-of-steps-to-make-two-strings-anagram
831459Rectangles Area61.5%Medium0https://leetcode.com/problems/rectangles-area