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

6.1 KiB

1IDTitleAcceptanceDifficultyFrequencyLeetcode Question Link
2366Find Leaves of Binary Tree70.6%Medium0.5289140003341137https://leetcode.com/problems/find-leaves-of-binary-tree
3981Time Based Key-Value Store53.1%Medium0.40162982547051973https://leetcode.com/problems/time-based-key-value-store
4860Lemonade Change51.6%Easy0.3967602828188025https://leetcode.com/problems/lemonade-change
51120Maximum Average Subtree61.9%Medium0.2694761079552085https://leetcode.com/problems/maximum-average-subtree
61071Greatest Common Divisor of Strings52.9%Easy0.25580276615686737https://leetcode.com/problems/greatest-common-divisor-of-strings
7821Shortest Distance to a Character66.9%Easy0.24320527953164725https://leetcode.com/problems/shortest-distance-to-a-character
817Letter Combinations of a Phone Number46.8%Medium0.22166457131988548https://leetcode.com/problems/letter-combinations-of-a-phone-number
9362Design Hit Counter63.7%Medium0.20812125379246896https://leetcode.com/problems/design-hit-counter
10253Meeting Rooms II45.7%Medium0.12203276379668937https://leetcode.com/problems/meeting-rooms-ii
11284Peeking Iterator45.7%Medium0.11901099827011974https://leetcode.com/problems/peeking-iterator
121223Dice Roll Simulation45.6%Medium0.10212949507637983https://leetcode.com/problems/dice-roll-simulation
13300Longest Increasing Subsequence42.6%Medium0.10155280044326445https://leetcode.com/problems/longest-increasing-subsequence
1423Merge k Sorted Lists40.2%Hard0.09666556212354038https://leetcode.com/problems/merge-k-sorted-lists
1520Valid Parentheses39.0%Easy0.09286263438126167https://leetcode.com/problems/valid-parentheses
16359Logger Rate Limiter70.8%Easy0.08167803101426718https://leetcode.com/problems/logger-rate-limiter
171366Rank Teams by Votes53.8%Medium0.07223355735937158https://leetcode.com/problems/rank-teams-by-votes
18200Number of Islands46.8%Medium0.06985103785996453https://leetcode.com/problems/number-of-islands
19706Design HashMap61.3%Easy0.0683442674369718https://leetcode.com/problems/design-hashmap
2098Validate Binary Search Tree27.8%Medium0.057985181512132535https://leetcode.com/problems/validate-binary-search-tree
21540Single Element in a Sorted Array57.9%Medium0.042721256704769804https://leetcode.com/problems/single-element-in-a-sorted-array
22844Backspace String Compare46.4%Easy0.041499730906752734https://leetcode.com/problems/backspace-string-compare
2331Next Permutation32.6%Medium0.03686102113159897https://leetcode.com/problems/next-permutation
24394Decode String50.0%Medium0.03227387813668991https://leetcode.com/problems/decode-string
25150Evaluate Reverse Polish Notation36.3%Medium0.031526253646773944https://leetcode.com/problems/evaluate-reverse-polish-notation
26547Friend Circles58.6%Medium0.027307522052851193https://leetcode.com/problems/friend-circles
27123Best Time to Buy and Sell Stock III37.5%Hard0.02516207671950806https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iii
28713Subarray Product Less Than K39.1%Medium0.02473842915612247https://leetcode.com/problems/subarray-product-less-than-k
29647Palindromic Substrings60.6%Medium0.023250853650202817https://leetcode.com/problems/palindromic-substrings
30199Binary Tree Right Side View54.1%Medium0.022539339846061532https://leetcode.com/problems/binary-tree-right-side-view
31101Symmetric Tree46.8%Easy0.02109782896463587https://leetcode.com/problems/symmetric-tree
32341Flatten Nested List Iterator52.9%Medium0.019980684690483426https://leetcode.com/problems/flatten-nested-list-iterator
3353Maximum Subarray46.5%Easy0.019336728821707075https://leetcode.com/problems/maximum-subarray
34173Binary Search Tree Iterator56.6%Medium0.01899993824490396https://leetcode.com/problems/binary-search-tree-iterator
35872Leaf-Similar Trees64.5%Easy0.01752125418714782https://leetcode.com/problems/leaf-similar-trees
3646Permutations63.5%Medium0.016759583649075344https://leetcode.com/problems/permutations
37680Valid Palindrome II36.6%Easy0.01632541245860885https://leetcode.com/problems/valid-palindrome-ii
38701Insert into a Binary Search Tree77.7%Medium0.015522236371561826https://leetcode.com/problems/insert-into-a-binary-search-tree
39528Random Pick with Weight43.9%Medium0.014831565905995232https://leetcode.com/problems/random-pick-with-weight
40227Basic Calculator II36.9%Medium0.01239941490503826https://leetcode.com/problems/basic-calculator-ii
41543Diameter of Binary Tree48.4%Easy0.011898606798495848https://leetcode.com/problems/diameter-of-binary-tree
423Longest Substring Without Repeating Characters30.4%Medium0.009683242444739549https://leetcode.com/problems/longest-substring-without-repeating-characters
43295Find Median from Data Stream44.3%Hard0.00899893586856953https://leetcode.com/problems/find-median-from-data-stream
4421Merge Two Sorted Lists53.5%Easy0.008990339814651234https://leetcode.com/problems/merge-two-sorted-lists
45215Kth Largest Element in an Array55.4%Medium0.008759180089881562https://leetcode.com/problems/kth-largest-element-in-an-array
4678Subsets62.0%Medium0.008278192969371254https://leetcode.com/problems/subsets
47102Binary Tree Level Order Traversal54.6%Medium0.008169238497129479https://leetcode.com/problems/binary-tree-level-order-traversal
48692Top K Frequent Words51.8%Medium0.007516006820935329https://leetcode.com/problems/top-k-frequent-words
49136Single Number65.5%Easy0.006445166968713385https://leetcode.com/problems/single-number
50121Best Time to Buy and Sell Stock50.5%Easy0.0047725193990346675https://leetcode.com/problems/best-time-to-buy-and-sell-stock
51236Lowest Common Ancestor of a Binary Tree45.7%Medium0.004714210262726446https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree
5222Generate Parentheses62.7%Medium0.0043611059090124735https://leetcode.com/problems/generate-parentheses
5356Merge Intervals39.3%Medium0.0034728286335985107https://leetcode.com/problems/merge-intervals
541307Verbal Arithmetic Puzzle37.7%Hard0https://leetcode.com/problems/verbal-arithmetic-puzzle