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

14 KiB

1IDTitleAcceptanceDifficultyFrequencyLeetcode Question Link
2364Nested List Weight Sum II62.8%Medium3.4314026516185074https://leetcode.com/problems/nested-list-weight-sum-ii
3244Shortest Word Distance II52.3%Medium3.3074402860776226https://leetcode.com/problems/shortest-word-distance-ii
4272Closest Binary Search Tree Value II50.5%Hard3.009985507576158https://leetcode.com/problems/closest-binary-search-tree-value-ii
5716Max Stack42.6%Easy2.8905651319656047https://leetcode.com/problems/max-stack
6366Find Leaves of Binary Tree70.6%Medium2.719366575451067https://leetcode.com/problems/find-leaves-of-binary-tree
7170Two Sum III - Data structure design33.5%Easy2.4219117969496025https://leetcode.com/problems/two-sum-iii-data-structure-design
8432All O`one Data Structure32.4%Hard2.34464696026554https://leetcode.com/problems/all-oone-data-structure
9605Can Place Flowers31.6%Easy2.300593060462805https://leetcode.com/problems/can-place-flowers
10339Nested List Weight Sum74.0%Easy2.217225244042889https://leetcode.com/problems/nested-list-weight-sum
11254Factor Combinations46.7%Medium2.157039260360306https://leetcode.com/problems/factor-combinations
12156Binary Tree Upside Down55.0%Medium1.9388429818322208https://leetcode.com/problems/binary-tree-upside-down
13243Shortest Word Distance61.0%Easy1.6413882033307563https://leetcode.com/problems/shortest-word-distance
14150Evaluate Reverse Polish Notation36.3%Medium1.631958216745279https://leetcode.com/problems/evaluate-reverse-polish-notation
15256Paint House52.1%Easy1.447627449136699https://leetcode.com/problems/paint-house
1668Text Justification27.7%Hard1.2612363282688142https://leetcode.com/problems/text-justification
17149Max Points on a Line16.9%Hard1.0358890301947536https://leetcode.com/problems/max-points-on-a-line
18698Partition to K Equal Sum Subsets45.0%Medium1.0032310331325633https://leetcode.com/problems/partition-to-k-equal-sum-subsets
19730Count Different Palindromic Subsequences41.8%Hard1.0003738490846965https://leetcode.com/problems/count-different-palindromic-subsequences
2065Valid Number15.3%Hard0.98227329658396https://leetcode.com/problems/valid-number
21671Second Minimum Node In a Binary Tree42.7%Easy0.904813710696626https://leetcode.com/problems/second-minimum-node-in-a-binary-tree
22380Insert Delete GetRandom O(1)47.5%Medium0.8842506895781851https://leetcode.com/problems/insert-delete-getrandom-o1
23265Paint House II44.6%Hard0.8788156207076087https://leetcode.com/problems/paint-house-ii
24297Serialize and Deserialize Binary Tree47.5%Hard0.7885864842588262https://leetcode.com/problems/serialize-and-deserialize-binary-tree
25373Find K Pairs with Smallest Sums36.7%Medium0.7534978029618075https://leetcode.com/problems/find-k-pairs-with-smallest-sums
26235Lowest Common Ancestor of a Binary Search Tree49.9%Easy0.6923217574837778https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree
27261Graph Valid Tree42.2%Medium0.661701044953794https://leetcode.com/problems/graph-valid-tree
2876Minimum Window Substring34.6%Hard0.641927908156958https://leetcode.com/problems/minimum-window-substring
29611Valid Triangle Number48.4%Medium0.6315030174487386https://leetcode.com/problems/valid-triangle-number
30205Isomorphic Strings39.8%Easy0.6091659093074805https://leetcode.com/problems/isomorphic-strings
31152Maximum Product Subarray31.7%Medium0.5918273884045084https://leetcode.com/problems/maximum-product-subarray
32341Flatten Nested List Iterator52.9%Medium0.5461187395622055https://leetcode.com/problems/flatten-nested-list-iterator
3353Maximum Subarray46.5%Easy0.5323304442417232https://leetcode.com/problems/maximum-subarray
3457Insert Interval33.5%Hard0.4990029568338001https://leetcode.com/problems/insert-interval
35636Exclusive Time of Functions51.9%Medium0.49627524402791723https://leetcode.com/problems/exclusive-time-of-functions
36277Find the Celebrity41.8%Medium0.47648222098694015https://leetcode.com/problems/find-the-celebrity
37127Word Ladder29.6%Medium0.46981620538612967https://leetcode.com/problems/word-ladder
3872Edit Distance44.8%Hard0.4487306287546189https://leetcode.com/problems/edit-distance
391117Building H2O52.6%Medium0.43571951646596674https://leetcode.com/problems/building-h2o
40706Design HashMap61.3%Easy0.3660911265048934https://leetcode.com/problems/design-hashmap
41715Range Module38.5%Hard0.33647223662121295https://leetcode.com/problems/range-module
4220Valid Parentheses39.0%Easy0.32875969157833257https://leetcode.com/problems/valid-parentheses
4356Merge Intervals39.3%Medium0.324649020144345https://leetcode.com/problems/merge-intervals
44236Lowest Common Ancestor of a Binary Tree45.7%Medium0.32407608535777543https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree
45200Number of Islands46.8%Medium0.3240548843543058https://leetcode.com/problems/number-of-islands
46381Insert Delete GetRandom O(1) - Duplicates allowed34.1%Hard0.32306557634109756https://leetcode.com/problems/insert-delete-getrandom-o1-duplicates-allowed
47273Integer to English Words27.1%Hard0.3131081243495928https://leetcode.com/problems/integer-to-english-words
48879Profitable Schemes39.8%Hard0.2856138193877219https://leetcode.com/problems/profitable-schemes
49102Binary Tree Level Order Traversal54.6%Medium0.28444131830888175https://leetcode.com/problems/binary-tree-level-order-traversal
5047Permutations II46.4%Medium0.2577738774664557https://leetcode.com/problems/permutations-ii
51470Implement Rand10() Using Rand7()46.3%Medium0.2553466918088445https://leetcode.com/problems/implement-rand10-using-rand7
52460LFU Cache34.2%Hard0.24921579162398486https://leetcode.com/problems/lfu-cache
53215Kth Largest Element in an Array55.4%Medium0.24881320355240788https://leetcode.com/problems/kth-largest-element-in-an-array
54655Print Binary Tree55.0%Medium0.23545681154756673https://leetcode.com/problems/print-binary-tree
551188Design Bounded Blocking Queue70.5%Medium0.23300728083654992https://leetcode.com/problems/design-bounded-blocking-queue
56464Can I Win28.8%Medium0.2228314901476892https://leetcode.com/problems/can-i-win
57516Longest Palindromic Subsequence53.2%Medium0.2156692799855616https://leetcode.com/problems/longest-palindromic-subsequence
5833Search in Rotated Sorted Array34.5%Medium0.21005273947217698https://leetcode.com/problems/search-in-rotated-sorted-array
5946Permutations63.5%Medium0.18816690901782251https://leetcode.com/problems/permutations
60449Serialize and Deserialize BST52.0%Medium0.1860058460684763https://leetcode.com/problems/serialize-and-deserialize-bst
61547Friend Circles58.6%Medium0.17970355268064825https://leetcode.com/problems/friend-circles
62739Daily Temperatures63.3%Medium0.14956674442158685https://leetcode.com/problems/daily-temperatures
6334Find First and Last Position of Element in Sorted Array36.2%Medium0.14257571553993023https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array
64428Serialize and Deserialize N-ary Tree59.4%Hard0.13313574474596881https://leetcode.com/problems/serialize-and-deserialize-n-ary-tree
65367Valid Perfect Square41.7%Easy0.1274707680128316https://leetcode.com/problems/valid-perfect-square
6650Pow(x;n)30.3%Medium0.11919639741435266https://leetcode.com/problems/powx-n
67101Symmetric Tree46.8%Easy0.11583847861592966https://leetcode.com/problems/symmetric-tree
6861Rotate List30.0%Medium0.11528615545779625https://leetcode.com/problems/rotate-list
69721Accounts Merge48.8%Medium0.11257939199174459https://leetcode.com/problems/accounts-merge
70296Best Meeting Point57.5%Hard0.11216225709564905https://leetcode.com/problems/best-meeting-point
71349Intersection of Two Arrays62.5%Easy0.11013353452843663https://leetcode.com/problems/intersection-of-two-arrays
72126Word Ladder II22.1%Hard0.10749169745614619https://leetcode.com/problems/word-ladder-ii
731028Recover a Tree From Preorder Traversal69.9%Hard0.10734155493596446https://leetcode.com/problems/recover-a-tree-from-preorder-traversal
74744Find Smallest Letter Greater Than Target45.4%Easy0.10446541455492596https://leetcode.com/problems/find-smallest-letter-greater-than-target
75796Rotate String49.6%Easy0.10392210998497661https://leetcode.com/problems/rotate-string
7612Integer to Roman55.1%Medium0.09981819303484349https://leetcode.com/problems/integer-to-roman
7769Sqrt(x)33.9%Easy0.09855995053811686https://leetcode.com/problems/sqrtx
78104Maximum Depth of Binary Tree66.0%Easy0.09576690509200843https://leetcode.com/problems/maximum-depth-of-binary-tree
791Two Sum45.6%Easy0.08664530282302181https://leetcode.com/problems/two-sum
80322Coin Change35.5%Medium0.07859731751631634https://leetcode.com/problems/coin-change
81160Intersection of Two Linked Lists40.6%Easy0.07567727378601781https://leetcode.com/problems/intersection-of-two-linked-lists
8288Merge Sorted Array39.4%Easy0.0726641464118391https://leetcode.com/problems/merge-sorted-array
831042Flower Planting With No Adjacent48.5%Easy0.07249550203815351https://leetcode.com/problems/flower-planting-with-no-adjacent
84450Delete Node in a BST43.1%Medium0.07216836682371046https://leetcode.com/problems/delete-node-in-a-bst
851148Article Views I75.8%Easy0.0715869066639981https://leetcode.com/problems/article-views-i
86187Repeated DNA Sequences38.9%Medium0.06947237281476738https://leetcode.com/problems/repeated-dna-sequences
87323Number of Connected Components in an Undirected Graph56.0%Medium0.06931179989022884https://leetcode.com/problems/number-of-connected-components-in-an-undirected-graph
88528Random Pick with Weight43.9%Medium0.05805039128849884https://leetcode.com/problems/random-pick-with-weight
8913Roman to Integer55.7%Easy0.05349762932680746https://leetcode.com/problems/roman-to-integer
90451Sort Characters By Frequency63.0%Medium0.05160771036247213https://leetcode.com/problems/sort-characters-by-frequency
9139Combination Sum56.1%Medium0.05030398316850793https://leetcode.com/problems/combination-sum
92412Fizz Buzz62.3%Easy0.04396698989626337https://leetcode.com/problems/fizz-buzz
93146LRU Cache33.2%Medium0.040660598211268925https://leetcode.com/problems/lru-cache
94833Find And Replace in String50.4%Medium0.03984590854719967https://leetcode.com/problems/find-and-replace-in-string
9540Combination Sum II48.2%Medium0.037775974158907266https://leetcode.com/problems/combination-sum-ii
9623Merge k Sorted Lists40.2%Hard0.035885441255624394https://leetcode.com/problems/merge-k-sorted-lists
97103Binary Tree Zigzag Level Order Traversal48.3%Medium0.03403976010989293https://leetcode.com/problems/binary-tree-zigzag-level-order-traversal
988String to Integer (atoi)15.4%Medium0.03362603162985522https://leetcode.com/problems/string-to-integer-atoi
99173Binary Search Tree Iterator56.6%Medium0.03353206029057467https://leetcode.com/problems/binary-search-tree-iterator
10075Sort Colors47.3%Medium0.030801991570373215https://leetcode.com/problems/sort-colors
101362Design Hit Counter63.7%Medium0.025382073271417165https://leetcode.com/problems/design-hit-counter
102785Is Graph Bipartite?47.5%Medium0.02510592113107633https://leetcode.com/problems/is-graph-bipartite
103981Time Based Key-Value Store53.1%Medium0.02226024024151985https://leetcode.com/problems/time-based-key-value-store
104359Logger Rate Limiter70.8%Easy0.021053409197832343https://leetcode.com/problems/logger-rate-limiter
105350Intersection of Two Arrays II51.4%Easy0.020680587107206983https://leetcode.com/problems/intersection-of-two-arrays-ii
106270Closest Binary Search Tree Value48.5%Easy0.017123706078591462https://leetcode.com/problems/closest-binary-search-tree-value
107384Shuffle an Array52.8%Medium0.015250009609723824https://leetcode.com/problems/shuffle-an-array
10854Spiral Matrix34.1%Medium0.014776167707688753https://leetcode.com/problems/spiral-matrix
109973K Closest Points to Origin63.8%Medium0.012944233661064114https://leetcode.com/problems/k-closest-points-to-origin
110987Vertical Order Traversal of a Binary Tree36.6%Medium0.011601058182762062https://leetcode.com/problems/vertical-order-traversal-of-a-binary-tree
111207Course Schedule43.1%Medium0.01113459480911671https://leetcode.com/problems/course-schedule
112113Path Sum II46.7%Medium0.009784813879998279https://leetcode.com/problems/path-sum-ii
113279Perfect Squares47.4%Medium0.009216655104924008https://leetcode.com/problems/perfect-squares
114198House Robber42.0%Easy0.008434914115059812https://leetcode.com/problems/house-robber
115133Clone Graph34.8%Medium0.008136741393061732https://leetcode.com/problems/clone-graph
116141Linked List Cycle41.1%Easy0.007843861028908454https://leetcode.com/problems/linked-list-cycle
117240Search a 2D Matrix II43.2%Medium0.0075829747244553335https://leetcode.com/problems/search-a-2d-matrix-ii
118692Top K Frequent Words51.8%Medium0.007516006820935329https://leetcode.com/problems/top-k-frequent-words
119142Linked List Cycle II37.3%Medium0.006564934131150057https://leetcode.com/problems/linked-list-cycle-ii
12021Merge Two Sorted Lists53.5%Easy0.005067007800877041https://leetcode.com/problems/merge-two-sorted-lists
121155Min Stack44.5%Easy0.00474891074128171https://leetcode.com/problems/min-stack
122560Subarray Sum Equals K43.9%Medium0.004279454482267064https://leetcode.com/problems/subarray-sum-equals-k
123387First Unique Character in a String53.4%Easy0.00418541994270691https://leetcode.com/problems/first-unique-character-in-a-string
124125Valid Palindrome36.7%Easy0.0039805008274065926https://leetcode.com/problems/valid-palindrome
125100Same Tree53.4%Easy0.003165227373565798https://leetcode.com/problems/same-tree
12698Validate Binary Search Tree27.8%Medium0.002943776044013381https://leetcode.com/problems/validate-binary-search-tree
127121Best Time to Buy and Sell Stock50.5%Easy0.0021239321954525975https://leetcode.com/problems/best-time-to-buy-and-sell-stock
12879Word Search35.6%Medium0.0016647248725526849https://leetcode.com/problems/word-search
12970Climbing Stairs47.8%Easy0.0015084665529624085https://leetcode.com/problems/climbing-stairs
130347Top K Frequent Elements61.2%Medium0.0014856636219477439https://leetcode.com/problems/top-k-frequent-elements