LeetCode-Questions-CompanyWise/oracle_6months.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
2352Data Stream as Disjoint Intervals47.3%Hard0.26671077361397416https://leetcode.com/problems/data-stream-as-disjoint-intervals
3362Design Hit Counter63.7%Medium0.20812125379246896https://leetcode.com/problems/design-hit-counter
41242Web Crawler Multithreaded45.9%Medium0.14953173397096375https://leetcode.com/problems/web-crawler-multithreaded
5636Exclusive Time of Functions51.9%Medium0.12466318981419816https://leetcode.com/problems/exclusive-time-of-functions
61236Web Crawler64.3%Medium0.09531017980432487https://leetcode.com/problems/web-crawler
7227Basic Calculator II36.9%Medium0.07508779675444797https://leetcode.com/problems/basic-calculator-ii
8706Design HashMap61.3%Easy0.0683442674369718https://leetcode.com/problems/design-hashmap
956Merge Intervals39.3%Medium0.06807635025869622https://leetcode.com/problems/merge-intervals
101044Longest Duplicate Substring31.9%Hard0.062325463197828765https://leetcode.com/problems/longest-duplicate-substring
111190Reverse Substrings Between Each Pair of Parentheses61.5%Medium0.06007812394328337https://leetcode.com/problems/reverse-substrings-between-each-pair-of-parentheses
12355Design Twitter30.3%Medium0.05824061998094904https://leetcode.com/problems/design-twitter
13146LRU Cache33.2%Medium0.054946555458745445https://leetcode.com/problems/lru-cache
14545Boundary of Binary Tree38.9%Medium0.04158603377810283https://leetcode.com/problems/boundary-of-binary-tree
1575Sort Colors47.3%Medium0.030801991570373215https://leetcode.com/problems/sort-colors
16692Top K Frequent Words51.8%Medium0.029730915184679466https://leetcode.com/problems/top-k-frequent-words
17456132 Pattern28.9%Medium0.029306126585499394https://leetcode.com/problems/132-pattern
181305All Elements in Two Binary Search Trees76.1%Medium0.026282721799194744https://leetcode.com/problems/all-elements-in-two-binary-search-trees
19981Time Based Key-Value Store53.1%Medium0.02226024024151985https://leetcode.com/problems/time-based-key-value-store
20380Insert Delete GetRandom O(1)47.5%Medium0.021962815449093263https://leetcode.com/problems/insert-delete-getrandom-o1
21341Flatten Nested List Iterator52.9%Medium0.019980684690483426https://leetcode.com/problems/flatten-nested-list-iterator
22155Min Stack44.5%Easy0.01886181109797383https://leetcode.com/problems/min-stack
23209Minimum Size Subarray Sum38.2%Medium0.018832948333092125https://leetcode.com/problems/minimum-size-subarray-sum
24450Delete Node in a BST43.1%Medium0.018536211907915243https://leetcode.com/problems/delete-node-in-a-bst
2537Sudoku Solver43.6%Hard0.01821543989134118https://leetcode.com/problems/sudoku-solver
26200Number of Islands46.8%Medium0.017925481766054456https://leetcode.com/problems/number-of-islands
27402Remove K Digits28.4%Medium0.016863806052004816https://leetcode.com/problems/remove-k-digits
2871Simplify Path32.6%Medium0.016260520871780308https://leetcode.com/problems/simplify-path
2923Merge k Sorted Lists40.2%Hard0.016108271385328228https://leetcode.com/problems/merge-k-sorted-lists
3054Spiral Matrix34.1%Medium0.014776167707688753https://leetcode.com/problems/spiral-matrix
3120Valid Parentheses39.0%Easy0.014292491180025941https://leetcode.com/problems/valid-parentheses
32179Largest Number28.8%Medium0.013865040137171665https://leetcode.com/problems/largest-number
3394Binary Tree Inorder Traversal63.3%Medium0.013353561806134713https://leetcode.com/problems/binary-tree-inorder-traversal
34767Reorganize String48.7%Medium0.01329806830463147https://leetcode.com/problems/reorganize-string
35112Path Sum41.2%Easy0.012265076074932503https://leetcode.com/problems/path-sum
36437Path Sum III47.2%Medium0.012128711446614806https://leetcode.com/problems/path-sum-iii
3788Merge Sorted Array39.4%Easy0.011986958032982505https://leetcode.com/problems/merge-sorted-array
38986Interval List Intersections67.3%Medium0.011969023795320735https://leetcode.com/problems/interval-list-intersections
39205Isomorphic Strings39.8%Easy0.011544139746865315https://leetcode.com/problems/isomorphic-strings
40207Course Schedule43.1%Medium0.01113459480911671https://leetcode.com/problems/course-schedule
4192Reverse Linked List II38.8%Medium0.010427623162259089https://leetcode.com/problems/reverse-linked-list-ii
42113Path Sum II46.7%Medium0.009784813879998279https://leetcode.com/problems/path-sum-ii
4334Find First and Last Position of Element in Sorted Array36.2%Medium0.009531951009811851https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array
44206Reverse Linked List62.5%Easy0.009326794511974934https://leetcode.com/problems/reverse-linked-list
45347Top K Frequent Elements61.2%Medium0.009249390740121013https://leetcode.com/problems/top-k-frequent-elements
465Longest Palindromic Substring29.5%Medium0.009086325220960808https://leetcode.com/problems/longest-palindromic-substring
4721Merge Two Sorted Lists53.5%Easy0.008990339814651234https://leetcode.com/problems/merge-two-sorted-lists
48125Valid Palindrome36.7%Easy0.008933948641551634https://leetcode.com/problems/valid-palindrome
49153Sum26.8%Medium0.00876717944353383https://leetcode.com/problems/3sum
50139Word Break40.1%Medium0.008741314401573542https://leetcode.com/problems/word-break
51173Binary Search Tree Iterator56.6%Medium0.008489015324911316https://leetcode.com/problems/binary-search-tree-iterator
52394Decode String50.0%Medium0.008166644000272283https://leetcode.com/problems/decode-string
53438Find All Anagrams in a String43.3%Medium0.008126822460497498https://leetcode.com/problems/find-all-anagrams-in-a-string
54253Meeting Rooms II45.7%Medium0.008079219870546493https://leetcode.com/problems/meeting-rooms-ii
55239Sliding Window Maximum43.0%Hard0.007898935224534491https://leetcode.com/problems/sliding-window-maximum
5638Count and Say44.6%Easy0.007829360800435779https://leetcode.com/problems/count-and-say
57101Symmetric Tree46.8%Easy0.007646596306528098https://leetcode.com/problems/symmetric-tree
58876Middle of the Linked List68.4%Easy0.007624893975696915https://leetcode.com/problems/middle-of-the-linked-list
59415Add Strings47.5%Easy0.007587289812159497https://leetcode.com/problems/add-strings
60240Search a 2D Matrix II43.2%Medium0.0075829747244553335https://leetcode.com/problems/search-a-2d-matrix-ii
6110Regular Expression Matching26.8%Hard0.0071865203293987245https://leetcode.com/problems/regular-expression-matching
62204Count Primes31.5%Easy0.007072165261362441https://leetcode.com/problems/count-primes
63938Range Sum of BST81.3%Easy0.007011422237803984https://leetcode.com/problems/range-sum-of-bst
64114Flatten Binary Tree to Linked List49.3%Medium0.006896579059060353https://leetcode.com/problems/flatten-binary-tree-to-linked-list
65230Kth Smallest Element in a BST60.2%Medium0.0063361529894967236https://leetcode.com/problems/kth-smallest-element-in-a-bst
66138Copy List with Random Pointer36.4%Medium0.006191011880825271https://leetcode.com/problems/copy-list-with-random-pointer
67199Binary Tree Right Side View54.1%Medium0.0056826406650506926https://leetcode.com/problems/binary-tree-right-side-view
68543Diameter of Binary Tree48.4%Easy0.005305755914149804https://leetcode.com/problems/diameter-of-binary-tree
691Two Sum45.6%Easy0.0051178232035212715https://leetcode.com/problems/two-sum
7053Maximum Subarray46.5%Easy0.004869349014182134https://leetcode.com/problems/maximum-subarray
71121Best Time to Buy and Sell Stock50.5%Easy0.0047725193990346675https://leetcode.com/problems/best-time-to-buy-and-sell-stock
7262Unique Paths54.1%Medium0.004621080312067025https://leetcode.com/problems/unique-paths
7317Letter Combinations of a Phone Number46.8%Medium0.0044018999217624675https://leetcode.com/problems/letter-combinations-of-a-phone-number
7442Trapping Rain Water48.9%Hard0.004350670338744988https://leetcode.com/problems/trapping-rain-water
75242Valid Anagram56.9%Easy0.004154123743115972https://leetcode.com/problems/valid-anagram
7628Implement strStr()34.5%Easy0.003943222775040032https://leetcode.com/problems/implement-strstr
774Median of Two Sorted Arrays29.6%Hard0.003900160950094767https://leetcode.com/problems/median-of-two-sorted-arrays
7849Group Anagrams56.9%Medium0.0038040939835560453https://leetcode.com/problems/group-anagrams
798String to Integer (atoi)15.4%Medium0.0037925521897059712https://leetcode.com/problems/string-to-integer-atoi
8014Longest Common Prefix35.4%Easy0.003320331762984143https://leetcode.com/problems/longest-common-prefix
8133Search in Rotated Sorted Array34.5%Medium0.003229976968332634https://leetcode.com/problems/search-in-rotated-sorted-array
82283Move Zeroes57.8%Easy0.0028853803470673955https://leetcode.com/problems/move-zeroes
8326Remove Duplicates from Sorted Array45.1%Easy0.0019513153174351963https://leetcode.com/problems/remove-duplicates-from-sorted-array
84210Course Schedule II40.7%Medium0.0019086707135282834https://leetcode.com/problems/course-schedule-ii
853Longest Substring Without Repeating Characters30.4%Medium0.0015556336509412823https://leetcode.com/problems/longest-substring-without-repeating-characters
86151Reverse Words in a String21.9%Medium0.0015375156780384337https://leetcode.com/problems/reverse-words-in-a-string
8750Pow(x;n)30.3%Medium0.0014016892647828818https://leetcode.com/problems/powx-n