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

16 KiB

1IDTitleAcceptanceDifficultyFrequencyLeetcode Question Link
2244Shortest Word Distance II52.3%Medium6.080030276326555https://leetcode.com/problems/shortest-word-distance-ii
3364Nested List Weight Sum II62.8%Medium5.858903208882962https://leetcode.com/problems/nested-list-weight-sum-ii
4170Two Sum III - Data structure design33.5%Easy5.339976985176443https://leetcode.com/problems/two-sum-iii-data-structure-design
5339Nested List Weight Sum74.0%Easy4.821050761469923https://leetcode.com/problems/nested-list-weight-sum
6272Closest Binary Search Tree Value II50.5%Hard4.69866052907543https://leetcode.com/problems/closest-binary-search-tree-value-ii
7156Binary Tree Upside Down55.0%Medium4.677621857655682https://leetcode.com/problems/binary-tree-upside-down
8716Max Stack42.6%Easy4.158695633949162https://leetcode.com/problems/max-stack
9254Factor Combinations46.7%Medium4.042679900269238https://leetcode.com/problems/factor-combinations
10243Shortest Word Distance61.0%Easy4.033402295442248https://leetcode.com/problems/shortest-word-distance
11366Find Leaves of Binary Tree70.6%Medium3.8874042537463542https://leetcode.com/problems/find-leaves-of-binary-tree
12256Paint House52.1%Easy3.830168081045509https://leetcode.com/problems/paint-house
13265Paint House II44.6%Hard3.643918157363893https://leetcode.com/problems/paint-house-ii
14149Max Points on a Line16.9%Hard3.593946561618369https://leetcode.com/problems/max-points-on-a-line
1565Valid Number15.3%Hard3.4859422228274832https://leetcode.com/problems/valid-number
16605Can Place Flowers31.6%Easy3.393038148985481https://leetcode.com/problems/can-place-flowers
17380Insert Delete GetRandom O(1)47.5%Medium3.226132922031484https://leetcode.com/problems/insert-delete-getrandom-o1
18432All O`one Data Structure32.4%Hard3.182278405836062https://leetcode.com/problems/all-oone-data-structure
1968Text Justification27.7%Hard3.1683420251214285https://leetcode.com/problems/text-justification
20341Flatten Nested List Iterator52.9%Medium2.8560409644057407https://leetcode.com/problems/flatten-nested-list-iterator
21150Evaluate Reverse Polish Notation36.3%Medium2.7457641678571494https://leetcode.com/problems/evaluate-reverse-polish-notation
22205Isomorphic Strings39.8%Easy2.6687791722177048https://leetcode.com/problems/isomorphic-strings
23245Shortest Word Distance III55.3%Medium2.4804776643766675https://leetcode.com/problems/shortest-word-distance-iii
24297Serialize and Deserialize Binary Tree47.5%Hard2.4208730516603993https://leetcode.com/problems/serialize-and-deserialize-binary-tree
25261Graph Valid Tree42.2%Medium2.361420232509446https://leetcode.com/problems/graph-valid-tree
26611Valid Triangle Number48.4%Medium2.3166166237983035https://leetcode.com/problems/valid-triangle-number
27730Count Different Palindromic Subsequences41.8%Hard2.3008291662917806https://leetcode.com/problems/count-different-palindromic-subsequences
2853Maximum Subarray46.5%Easy2.234231225147922https://leetcode.com/problems/maximum-subarray
29187Repeated DNA Sequences38.9%Medium2.1034320303164904https://leetcode.com/problems/repeated-dna-sequences
30698Partition to K Equal Sum Subsets45.0%Medium2.0188752204026974https://leetcode.com/problems/partition-to-k-equal-sum-subsets
31152Maximum Product Subarray31.7%Medium2.012330220619989https://leetcode.com/problems/maximum-product-subarray
3272Edit Distance44.8%Hard1.77034719073246https://leetcode.com/problems/edit-distance
33200Number of Islands46.8%Medium1.7486397840620904https://leetcode.com/problems/number-of-islands
34277Find the Celebrity41.8%Medium1.6753413644780486https://leetcode.com/problems/find-the-celebrity
3556Merge Intervals39.3%Medium1.660437199438034https://leetcode.com/problems/merge-intervals
36516Longest Palindromic Subsequence53.2%Medium1.6283626316034112https://leetcode.com/problems/longest-palindromic-subsequence
37671Second Minimum Node In a Binary Tree42.7%Easy1.6037158670068572https://leetcode.com/problems/second-minimum-node-in-a-binary-tree
3876Minimum Window Substring34.6%Hard1.5906343171159958https://leetcode.com/problems/minimum-window-substring
39464Can I Win28.8%Medium1.506328285095676https://leetcode.com/problems/can-i-win
40236Lowest Common Ancestor of a Binary Tree45.7%Medium1.4917287074839412https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree
4112Integer to Roman55.1%Medium1.4878558960006285https://leetcode.com/problems/integer-to-roman
42373Find K Pairs with Smallest Sums36.7%Medium1.4398887318809226https://leetcode.com/problems/find-k-pairs-with-smallest-sums
43235Lowest Common Ancestor of a Binary Search Tree49.9%Easy1.4200618278990031https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree
44102Binary Tree Level Order Traversal54.6%Medium1.4026563080569336https://leetcode.com/problems/binary-tree-level-order-traversal
45381Insert Delete GetRandom O(1) - Duplicates allowed34.1%Hard1.4015377574600891https://leetcode.com/problems/insert-delete-getrandom-o1-duplicates-allowed
461Two Sum45.6%Easy1.3998908606433091https://leetcode.com/problems/two-sum
4750Pow(x;n)30.3%Medium1.295878904893276https://leetcode.com/problems/powx-n
4833Search in Rotated Sorted Array34.5%Medium1.2373938135133047https://leetcode.com/problems/search-in-rotated-sorted-array
4920Valid Parentheses39.0%Easy1.2333689145339155https://leetcode.com/problems/valid-parentheses
50273Integer to English Words27.1%Hard1.2185425385498858https://leetcode.com/problems/integer-to-english-words
5134Find First and Last Position of Element in Sorted Array36.2%Medium1.2091842728345334https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array
52127Word Ladder29.6%Medium1.1879531176262481https://leetcode.com/problems/word-ladder
5357Insert Interval33.5%Hard1.1730267742341929https://leetcode.com/problems/insert-interval
54636Exclusive Time of Functions51.9%Medium1.1392005862073036https://leetcode.com/problems/exclusive-time-of-functions
55384Shuffle an Array52.8%Medium0.991100943542345https://leetcode.com/problems/shuffle-an-array
561117Building H2O52.6%Medium0.9829600869737358https://leetcode.com/problems/building-h2o
5769Sqrt(x)33.9%Easy0.9425416082510271https://leetcode.com/problems/sqrtx
58146LRU Cache33.2%Medium0.9138670478439253https://leetcode.com/problems/lru-cache
5946Permutations63.5%Medium0.8944850434890723https://leetcode.com/problems/permutations
60655Print Binary Tree55.0%Medium0.8942200477548448https://leetcode.com/problems/print-binary-tree
6113Roman to Integer55.7%Easy0.8933962612312258https://leetcode.com/problems/roman-to-integer
62744Find Smallest Letter Greater Than Target45.4%Easy0.8539612853364241https://leetcode.com/problems/find-smallest-letter-greater-than-target
63215Kth Largest Element in an Array55.4%Medium0.7561265689929935https://leetcode.com/problems/kth-largest-element-in-an-array
64449Serialize and Deserialize BST52.0%Medium0.7481106198504164https://leetcode.com/problems/serialize-and-deserialize-bst
65715Range Module38.5%Hard0.7472144018302211https://leetcode.com/problems/range-module
66296Best Meeting Point57.5%Hard0.7267024804081622https://leetcode.com/problems/best-meeting-point
671188Design Bounded Blocking Queue70.5%Medium0.7176264446447249https://leetcode.com/problems/design-bounded-blocking-queue
68460LFU Cache34.2%Hard0.668474221864485https://leetcode.com/problems/lfu-cache
69126Word Ladder II22.1%Hard0.6364159003926323https://leetcode.com/problems/word-ladder-ii
70160Intersection of Two Linked Lists40.6%Easy0.6045153022014824https://leetcode.com/problems/intersection-of-two-linked-lists
71101Symmetric Tree46.8%Easy0.5986256023076202https://leetcode.com/problems/symmetric-tree
72879Profitable Schemes39.8%Hard0.5560675878793254https://leetcode.com/problems/profitable-schemes
7347Permutations II46.4%Medium0.5319853456599372https://leetcode.com/problems/permutations-ii
74104Maximum Depth of Binary Tree66.0%Easy0.513251489692768https://leetcode.com/problems/maximum-depth-of-binary-tree
75706Design HashMap61.3%Easy0.49262383645737706https://leetcode.com/problems/design-hashmap
76412Fizz Buzz62.3%Easy0.4590212125771265https://leetcode.com/problems/fizz-buzz
77311Sparse Matrix Multiplication61.9%Medium0.4503238876572249https://leetcode.com/problems/sparse-matrix-multiplication
788String to Integer (atoi)15.4%Medium0.407141925712164https://leetcode.com/problems/string-to-integer-atoi
79739Daily Temperatures63.3%Medium0.40150804127350803https://leetcode.com/problems/daily-temperatures
80323Number of Connected Components in an Undirected Graph56.0%Medium0.32984288327605893https://leetcode.com/problems/number-of-connected-components-in-an-undirected-graph
81367Valid Perfect Square41.7%Easy0.3203744341373232https://leetcode.com/problems/valid-perfect-square
8261Rotate List30.0%Medium0.3068243673566749https://leetcode.com/problems/rotate-list
83349Intersection of Two Arrays62.5%Easy0.3049506996831345https://leetcode.com/problems/intersection-of-two-arrays
8423Merge k Sorted Lists40.2%Hard0.28430175890527876https://leetcode.com/problems/merge-k-sorted-lists
85547Friend Circles58.6%Medium0.2681916080548848https://leetcode.com/problems/friend-circles
86450Delete Node in a BST43.1%Medium0.2618604317292985https://leetcode.com/problems/delete-node-in-a-bst
87470Implement Rand10() Using Rand7()46.3%Medium0.2553466918088445https://leetcode.com/problems/implement-rand10-using-rand7
88173Binary Search Tree Iterator56.6%Medium0.22943234572951865https://leetcode.com/problems/binary-search-tree-iterator
89796Rotate String49.6%Easy0.22026466797690847https://leetcode.com/problems/rotate-string
90528Random Pick with Weight43.9%Medium0.21436399542669993https://leetcode.com/problems/random-pick-with-weight
91322Coin Change35.5%Medium0.20468224088850068https://leetcode.com/problems/coin-change
9240Combination Sum II48.2%Medium0.1780616138489939https://leetcode.com/problems/combination-sum-ii
9388Merge Sorted Array39.4%Easy0.17642540243837188https://leetcode.com/problems/merge-sorted-array
94721Accounts Merge48.8%Medium0.15836350116973763https://leetcode.com/problems/accounts-merge
95155Min Stack44.5%Easy0.15817175770099312https://leetcode.com/problems/min-stack
961148Article Views I75.8%Easy0.15441568579144338https://leetcode.com/problems/article-views-i
9739Combination Sum56.1%Medium0.1339254107186325https://leetcode.com/problems/combination-sum
98428Serialize and Deserialize N-ary Tree59.4%Hard0.13313574474596881https://leetcode.com/problems/serialize-and-deserialize-n-ary-tree
9954Spiral Matrix34.1%Medium0.12572728493821236https://leetcode.com/problems/spiral-matrix
1001042Flower Planting With No Adjacent48.5%Easy0.125457954276896https://leetcode.com/problems/flower-planting-with-no-adjacent
10121Merge Two Sorted Lists53.5%Easy0.11955628018646022https://leetcode.com/problems/merge-two-sorted-lists
10275Sort Colors47.3%Medium0.11789425180508288https://leetcode.com/problems/sort-colors
103103Binary Tree Zigzag Level Order Traversal48.3%Medium0.11648551004070631https://leetcode.com/problems/binary-tree-zigzag-level-order-traversal
104451Sort Characters By Frequency63.0%Medium0.11258362132121401https://leetcode.com/problems/sort-characters-by-frequency
105973K Closest Points to Origin63.8%Medium0.11087510283099485https://leetcode.com/problems/k-closest-points-to-origin
106198House Robber42.0%Easy0.10785152815546674https://leetcode.com/problems/house-robber
1071028Recover a Tree From Preorder Traversal69.9%Hard0.10734155493596446https://leetcode.com/problems/recover-a-tree-from-preorder-traversal
108238Product of Array Except Self60.1%Medium0.09390398065367858https://leetcode.com/problems/product-of-array-except-self
109833Find And Replace in String50.4%Medium0.08751937801655657https://leetcode.com/problems/find-and-replace-in-string
110100Same Tree53.4%Easy0.08633894223670877https://leetcode.com/problems/same-tree
111350Intersection of Two Arrays II51.4%Easy0.08027374155116185https://leetcode.com/problems/intersection-of-two-arrays-ii
112133Clone Graph34.8%Medium0.07095173597228444https://leetcode.com/problems/clone-graph
113270Closest Binary Search Tree Value48.5%Easy0.06680279511160087https://leetcode.com/problems/closest-binary-search-tree-value
11498Validate Binary Search Tree27.8%Medium0.057985181512132535https://leetcode.com/problems/validate-binary-search-tree
115362Design Hit Counter63.7%Medium0.05622967649867821https://leetcode.com/problems/design-hit-counter
116981Time Based Key-Value Store53.1%Medium0.049406315387071284https://leetcode.com/problems/time-based-key-value-store
117121Best Time to Buy and Sell Stock50.5%Easy0.04215422741819192https://leetcode.com/problems/best-time-to-buy-and-sell-stock
118647Palindromic Substrings60.6%Medium0.040968350772541844https://leetcode.com/problems/palindromic-substrings
119141Linked List Cycle41.1%Easy0.031012908394529512https://leetcode.com/problems/linked-list-cycle
120240Search a 2D Matrix II43.2%Medium0.02999287612403949https://leetcode.com/problems/search-a-2d-matrix-ii
121692Top K Frequent Words51.8%Medium0.029730915184679466https://leetcode.com/problems/top-k-frequent-words
122987Vertical Order Traversal of a Binary Tree36.6%Medium0.025915645579833068https://leetcode.com/problems/vertical-order-traversal-of-a-binary-tree
123387First Unique Character in a String53.4%Easy0.02587600384690711https://leetcode.com/problems/first-unique-character-in-a-string
124785Is Graph Bipartite?47.5%Medium0.02510592113107633https://leetcode.com/problems/is-graph-bipartite
12570Climbing Stairs47.8%Easy0.023866591309041507https://leetcode.com/problems/climbing-stairs
126113Path Sum II46.7%Medium0.021882711249507664https://leetcode.com/problems/path-sum-ii
127359Logger Rate Limiter70.8%Easy0.021053409197832343https://leetcode.com/problems/logger-rate-limiter
128207Course Schedule43.1%Medium0.019709926055136454https://leetcode.com/problems/course-schedule
129347Top K Frequent Elements61.2%Medium0.018049036874660983https://leetcode.com/problems/top-k-frequent-elements
13079Word Search35.6%Medium0.014883688014740005https://leetcode.com/problems/word-search
131142Linked List Cycle II37.3%Medium0.014710955064667802https://leetcode.com/problems/linked-list-cycle-ii
132560Subarray Sum Equals K43.9%Medium0.009603146783199741https://leetcode.com/problems/subarray-sum-equals-k
133279Perfect Squares47.4%Medium0.009216655104924008https://leetcode.com/problems/perfect-squares
134125Valid Palindrome36.7%Easy0.008933948641551634https://leetcode.com/problems/valid-palindrome
135515Find Largest Value in Each Tree Row61.1%Medium0https://leetcode.com/problems/find-largest-value-in-each-tree-row
136633Sum of Square Numbers32.2%Easy0https://leetcode.com/problems/sum-of-square-numbers
137946Validate Stack Sequences61.9%Medium0https://leetcode.com/problems/validate-stack-sequences
1381107New Users Daily Count45.1%Medium0https://leetcode.com/problems/new-users-daily-count
1391127User Purchase Platform48.9%Hard0https://leetcode.com/problems/user-purchase-platform
1401149Article Views II48.2%Medium0https://leetcode.com/problems/article-views-ii
1411343Number of Sub-arrays of Size K and Average Greater than or Equal to Threshold64.2%Medium0https://leetcode.com/problems/number-of-sub-arrays-of-size-k-and-average-greater-than-or-equal-to-threshold