Files
LeetCode-Questions-CompanyWise/snapchat_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.5 KiB

1IDTitleAcceptanceDifficultyFrequencyLeetcode Question Link
2296Best Meeting Point57.5%Hard1.0585568181106577https://leetcode.com/problems/best-meeting-point
3146LRU Cache33.2%Medium0.9412050074721253https://leetcode.com/problems/lru-cache
4212Word Search II34.9%Hard0.7871523471289301https://leetcode.com/problems/word-search-ii
568Text Justification27.7%Hard0.7812966622905007https://leetcode.com/problems/text-justification
6527Word Abbreviation54.3%Hard0.7435780341868372https://leetcode.com/problems/word-abbreviation
736Valid Sudoku48.7%Medium0.589525373843642https://leetcode.com/problems/valid-sudoku
8772Basic Calculator III41.3%Hard0.5881497072005337https://leetcode.com/problems/basic-calculator-iii
9439Ternary Expression Parser55.9%Medium0.5705448584676129https://leetcode.com/problems/ternary-expression-parser
10253Meeting Rooms II45.7%Medium0.5493362897220211https://leetcode.com/problems/meeting-rooms-ii
11332Reconstruct Itinerary36.7%Medium0.5180020277364334https://leetcode.com/problems/reconstruct-itinerary
12403Frog Jump39.7%Hard0.504766595745896https://leetcode.com/problems/frog-jump
13289Game of Life54.5%Medium0.48802506022625414https://leetcode.com/problems/game-of-life
14317Shortest Distance from All Buildings41.4%Hard0.4817811959810462https://leetcode.com/problems/shortest-distance-from-all-buildings
15127Word Ladder29.6%Medium0.4325804000994867https://leetcode.com/problems/word-ladder
16227Basic Calculator II36.9%Medium0.4233944910226638https://leetcode.com/problems/basic-calculator-ii
17139Word Break40.1%Medium0.32945181788981065https://leetcode.com/problems/word-break
18460LFU Cache34.2%Hard0.3258590625960574https://leetcode.com/problems/lfu-cache
19224Basic Calculator36.8%Hard0.291910408561302https://leetcode.com/problems/basic-calculator
2037Sudoku Solver43.6%Hard0.2578291093020998https://leetcode.com/problems/sudoku-solver
21415Add Strings47.5%Easy0.24230382668402778https://leetcode.com/problems/add-strings
22269Alien Dictionary33.3%Hard0.2306743801916798https://leetcode.com/problems/alien-dictionary
23635Design Log Storage System58.6%Medium0.22440062250426088https://leetcode.com/problems/design-log-storage-system
24161One Edit Distance32.3%Medium0.20769707317771804https://leetcode.com/problems/one-edit-distance
25295Find Median from Data Stream44.3%Hard0.2037476209666304https://leetcode.com/problems/find-median-from-data-stream
26200Number of Islands46.8%Medium0.1699216454242077https://leetcode.com/problems/number-of-islands
27632Smallest Range Covering Elements from K Lists52.4%Hard0.15283920422944758https://leetcode.com/problems/smallest-range-covering-elements-from-k-lists
28169Majority Element58.7%Easy0.13339870308100113https://leetcode.com/problems/majority-element
29839Similar String Groups38.6%Hard0.11934675763256619https://leetcode.com/problems/similar-string-groups
3079Word Search35.6%Medium0.11366482626329145https://leetcode.com/problems/word-search
31140Word Break II32.6%Hard0.10843250681427455https://leetcode.com/problems/word-break-ii
32311Sparse Matrix Multiplication61.9%Medium0.10648348040245009https://leetcode.com/problems/sparse-matrix-multiplication
3342Trapping Rain Water48.9%Hard0.10346205022559302https://leetcode.com/problems/trapping-rain-water
3454Spiral Matrix34.1%Medium0.10061889164064056https://leetcode.com/problems/spiral-matrix
35282Expression Add Operators35.5%Hard0.08720118433574389https://leetcode.com/problems/expression-add-operators
3656Merge Intervals39.3%Medium0.08339552430579078https://leetcode.com/problems/merge-intervals
37341Flatten Nested List Iterator52.9%Medium0.07763353611776078https://leetcode.com/problems/flatten-nested-list-iterator
38480Sliding Window Median37.2%Hard0.0743529801177063https://leetcode.com/problems/sliding-window-median
39986Interval List Intersections67.3%Medium0.07255865182314948https://leetcode.com/problems/interval-list-intersections
40394Decode String50.0%Medium0.07120444629179161https://leetcode.com/problems/decode-string
411146Snapshot Array37.0%Medium0.07017687679183775https://leetcode.com/problems/snapshot-array
421Two Sum45.6%Easy0.06437944929577392https://leetcode.com/problems/two-sum
43340Longest Substring with At Most K Distinct Characters44.1%Hard0.06298815293235048https://leetcode.com/problems/longest-substring-with-at-most-k-distinct-characters
44305Number of Islands II40.1%Hard0.06007812394328337https://leetcode.com/problems/number-of-islands-ii
45362Design Hit Counter63.7%Medium0.05622967649867821https://leetcode.com/problems/design-hit-counter
46653Two Sum IV - Input is a BST55.5%Easy0.055724721838100025https://leetcode.com/problems/two-sum-iv-input-is-a-bst
4776Minimum Window Substring34.6%Hard0.05473322196089386https://leetcode.com/problems/minimum-window-substring
48310Minimum Height Trees32.3%Medium0.05423015406086025https://leetcode.com/problems/minimum-height-trees
4939Combination Sum56.1%Medium0.05030398316850793https://leetcode.com/problems/combination-sum
50242Valid Anagram56.9%Easy0.04973624974928908https://leetcode.com/problems/valid-anagram
51238Product of Array Except Self60.1%Medium0.04711503937510501https://leetcode.com/problems/product-of-array-except-self
52733Flood Fill55.3%Easy0.04413292021115189https://leetcode.com/problems/flood-fill
53153Sum26.8%Medium0.04361391077370199https://leetcode.com/problems/3sum
54642Design Search Autocomplete System44.7%Hard0.04334372921647208https://leetcode.com/problems/design-search-autocomplete-system
55716Max Stack42.6%Easy0.042695919196489414https://leetcode.com/problems/max-stack
56314Binary Tree Vertical Order Traversal45.3%Medium0.04007660092703385https://leetcode.com/problems/binary-tree-vertical-order-traversal
571031Maximum Sum of Two Non-Overlapping Subarrays57.9%Medium0.03711000965123125https://leetcode.com/problems/maximum-sum-of-two-non-overlapping-subarrays
58658Find K Closest Elements40.9%Medium0.03699558767659505https://leetcode.com/problems/find-k-closest-elements
5991Decode Ways24.7%Medium0.03673102791879485https://leetcode.com/problems/decode-ways
6096Unique Binary Search Trees52.9%Medium0.036467121912812143https://leetcode.com/problems/unique-binary-search-trees
6149Group Anagrams56.9%Medium0.03372685005765885https://leetcode.com/problems/group-anagrams
6244Wildcard Matching24.7%Hard0.030573033362282363https://leetcode.com/problems/wildcard-matching
63210Course Schedule II40.7%Medium0.030110003854123765https://leetcode.com/problems/course-schedule-ii
64329Longest Increasing Path in a Matrix43.4%Hard0.029902560173869868https://leetcode.com/problems/longest-increasing-path-in-a-matrix
65155Min Stack44.5%Easy0.029317296678520607https://leetcode.com/problems/min-stack
6633Search in Rotated Sorted Array34.5%Medium0.0287009496170278https://leetcode.com/problems/search-in-rotated-sorted-array
67206Reverse Linked List62.5%Easy0.028292880260936595https://leetcode.com/problems/reverse-linked-list
68121Best Time to Buy and Sell Stock50.5%Easy0.0257124040167447https://leetcode.com/problems/best-time-to-buy-and-sell-stock
69377Combination Sum IV45.3%Medium0.02087758502155521https://leetcode.com/problems/combination-sum-iv
7014Longest Common Prefix35.4%Easy0.02057347087022327https://leetcode.com/problems/longest-common-prefix
713Longest Substring Without Repeating Characters30.4%Medium0.018891763947827014https://leetcode.com/problems/longest-substring-without-repeating-characters
72234Palindrome Linked List39.3%Easy0.01801241989645556https://leetcode.com/problems/palindrome-linked-list
7322Generate Parentheses62.7%Medium0.017331456351639924https://leetcode.com/problems/generate-parentheses
74297Serialize and Deserialize Binary Tree47.5%Hard0.01585377577217724https://leetcode.com/problems/serialize-and-deserialize-binary-tree
75215Kth Largest Element in an Array55.4%Medium0.015519225147600912https://leetcode.com/problems/kth-largest-element-in-an-array
76557Reverse Words in a String III69.8%Easy0.013731764001315941https://leetcode.com/problems/reverse-words-in-a-string-iii
7762Unique Paths54.1%Medium0.010367562048856941https://leetcode.com/problems/unique-paths
78560Subarray Sum Equals K43.9%Medium0.009603146783199741https://leetcode.com/problems/subarray-sum-equals-k
79347Top K Frequent Elements61.2%Medium0.009249390740121013https://leetcode.com/problems/top-k-frequent-elements
8063Unique Paths II34.6%Medium0.008712753874961187https://leetcode.com/problems/unique-paths-ii
81344Reverse String68.5%Easy0.00734157796234515https://leetcode.com/problems/reverse-string
82189Rotate Array34.7%Easy0.004029826126500844https://leetcode.com/problems/rotate-array
83151Reverse Words in a String21.9%Medium0.003456091915988908https://leetcode.com/problems/reverse-words-in-a-string
84270Closest Binary Search Tree Value48.5%Easy0https://leetcode.com/problems/closest-binary-search-tree-value
8540Combination Sum II48.2%Medium0https://leetcode.com/problems/combination-sum-ii
86312Burst Balloons51.8%Hard0https://leetcode.com/problems/burst-balloons
87402Remove K Digits28.4%Medium0https://leetcode.com/problems/remove-k-digits
88443String Compression41.3%Easy0https://leetcode.com/problems/string-compression
89964Least Operators to Express Number43.8%Hard0https://leetcode.com/problems/least-operators-to-express-number