Skip to content

nikhilesh-git/Leetcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,065 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetHub v2 - Automatically sync your code to GitHub.
LeetHub v2 - Automatically sync your code to GitHub.

license

What is LeetHub 2.0?

A chrome and (new) firefox extension that automatically pushes your code to GitHub when you pass all tests on a Leetcode problem. It's forked from the original LeetHub and improves on it to be faster, cleaner and compatible with the new dynamic LeetCode UI.

Why LeetHub?

1. Recruiters want to see your contributions to the Open Source community, be it through side projects, solving algorithms/data-structures, or contributing to existing OS projects.
As of now, GitHub is developers' #1 portfolio. LeetHub just makes it much easier (autonomous) to keep track of progress and contributions on the largest network of engineering community, GitHub.

2. There's no easy way of accessing your leetcode problems in one place!
Moreover, pushing code manually to GitHub from Leetcode is very time consuming. So, why not just automate it entirely without spending a SINGLE additional second on it?

How does LeetHub work?

It's as simple as:

  1. After installation, launch LeetHub.
  2. Click on "authorize with GitHub" button to automatically set up your account with LeetHub.
  3. Setup an existing/new repository with LeetHub (private by default) by clicking "Get Started" button.
  4. Begin Leetcoding! To view your progress, simply click on the extension!

BONUS: Star this repository for further development of features. If you want a particular feature, simply request for it!

Why did I decide to work on LeetHub?

After the 2023 SVB bank closure and growing layoffs, it became clear to me that maintaining your skills is incredibly important. In that effort, it helps to have a source to contain all your learnings over the years: a repo you can go back to and see your commit history and any notes you've taken. With the previous and other extensions broken by recent LeetCode and GitHub changes, I decided to build one out myself using the original as a starting point.

Let's see you ACE that coding interview!

leetcode view

How to set up LeetHub for local development?

  1. Fork this repo and clone to your local machine
  2. Run "npm run setup" to install the developer dependencies
  3. Run npm run build to build the final extension files into the ./dist/ directory
  4. Go to chrome://extensions or about:debugging in firefox a. In Chrome, enable Developer mode by toggling the switch on top right corner
  5. Click Load unpacked or Load Temporary Add-on...
  6. Select the ./dist/chrome or ./dist/firefox LeetHub folder
  7. That's it! Be sure to npm run build and reload the extension after making changes

Other npm commands available:

npm run               Show list of commands available
npm run format        Auto-format JavaScript, HTML/CSS
npm run format-test   Test all code is formatted properly
npm run lint          Lint JavaScript
npm run lint-test     Test all code is linted properly

LeetCode Topics

Array

0045-jump-game-ii
0055-jump-game
0056-merge-intervals
0057-insert-interval
0059-spiral-matrix-ii
0064-minimum-path-sum
0074-search-a-2d-matrix
0078-subsets
0079-word-search
0085-maximal-rectangle
0120-triangle
0121-best-time-to-buy-and-sell-stock
0122-best-time-to-buy-and-sell-stock-ii
0123-best-time-to-buy-and-sell-stock-iii
0135-candy
0169-majority-element
0198-house-robber
0204-count-primes
0213-house-robber-ii
0216-combination-sum-iii
0229-majority-element-ii
0240-search-a-2d-matrix-ii
0287-find-the-duplicate-number
0300-longest-increasing-subsequence
0309-best-time-to-buy-and-sell-stock-with-cooldown
0312-burst-balloons
0322-coin-change
0368-largest-divisible-subset
0410-split-array-largest-sum
0416-partition-equal-subset-sum
0435-non-overlapping-intervals
0455-assign-cookies
0485-max-consecutive-ones
0494-target-sum
0496-next-greater-element-i
0503-next-greater-element-ii
0518-coin-change-ii
0621-task-scheduler
0673-number-of-longest-increasing-subsequence
0714-best-time-to-buy-and-sell-stock-with-transaction-fee
0721-accounts-merge
0733-flood-fill
0735-asteroid-collision
0778-swim-in-rising-water
0827-making-a-large-island
0846-hand-of-straights
0940-fruit-into-baskets
0943-sum-of-subarray-minimums
0966-binary-subarrays-with-sum
0967-minimum-falling-path-sum
1034-subarrays-with-k-different-integers
1046-max-consecutive-ones-iii
1056-capacity-to-ship-packages-within-d-days
1121-partition-array-for-maximum-sum
1129-longest-string-chain
1370-count-number-of-nice-subarrays
1408-find-the-smallest-divisor-given-a-threshold
1538-maximum-points-you-can-obtain-from-cards
1559-cherry-pickup-ii
1631-path-with-minimum-effort
1646-kth-missing-positive-number
1669-minimum-cost-to-cut-a-stick
1839-decode-xored-array
2227-sum-of-subarray-ranges
2519-find-the-original-array-of-prefix-xor

Depth-First Search

0079-word-search
0099-recover-binary-search-tree
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0199-binary-tree-right-side-view
0210-course-schedule-ii
0236-lowest-common-ancestor-of-a-binary-tree
0721-accounts-merge
0733-flood-fill
0743-network-delay-time
0778-swim-in-rising-water
0787-cheapest-flights-within-k-stops
0802-find-eventual-safe-states
0827-making-a-large-island
0863-all-nodes-distance-k-in-binary-tree
1319-number-of-operations-to-make-network-connected
1631-path-with-minimum-effort

Breadth-First Search

0199-binary-tree-right-side-view
0210-course-schedule-ii
0322-coin-change
0721-accounts-merge
0733-flood-fill
0743-network-delay-time
0778-swim-in-rising-water
0787-cheapest-flights-within-k-stops
0802-find-eventual-safe-states
0827-making-a-large-island
0863-all-nodes-distance-k-in-binary-tree
1319-number-of-operations-to-make-network-connected
1631-path-with-minimum-effort

Matrix

0059-spiral-matrix-ii
0064-minimum-path-sum
0074-search-a-2d-matrix
0079-word-search
0085-maximal-rectangle
0240-search-a-2d-matrix-ii
0733-flood-fill
0778-swim-in-rising-water
0827-making-a-large-island
0967-minimum-falling-path-sum
1559-cherry-pickup-ii
1631-path-with-minimum-effort

Two Pointers

0005-longest-palindromic-substring
0061-rotate-list
0125-valid-palindrome
0141-linked-list-cycle
0142-linked-list-cycle-ii
0148-sort-list
0160-intersection-of-two-linked-lists
0234-palindrome-linked-list
0287-find-the-duplicate-number
0455-assign-cookies
0908-middle-of-the-linked-list
1129-longest-string-chain

Binary Search

0074-search-a-2d-matrix
0222-count-complete-tree-nodes
0240-search-a-2d-matrix-ii
0287-find-the-duplicate-number
0300-longest-increasing-subsequence
0410-split-array-largest-sum
0778-swim-in-rising-water
1046-max-consecutive-ones-iii
1056-capacity-to-ship-packages-within-d-days
1408-find-the-smallest-divisor-given-a-threshold
1631-path-with-minimum-effort
1646-kth-missing-positive-number

Bit Manipulation

0029-divide-two-integers
0078-subsets
0222-count-complete-tree-nodes
0231-power-of-two
0287-find-the-duplicate-number
1839-decode-xored-array
2323-minimum-bit-flips-to-convert-number
2519-find-the-original-array-of-prefix-xor

Math

0029-divide-two-integers
0050-powx-n
0062-unique-paths
0070-climbing-stairs
0204-count-primes
0231-power-of-two
0368-largest-divisible-subset
0856-consecutive-numbers-sum
1370-count-number-of-nice-subarrays
1885-count-number-of-homogenous-substrings
2050-count-good-numbers

Recursion

0044-wildcard-matching
0050-powx-n
0206-reverse-linked-list
0231-power-of-two
0234-palindrome-linked-list
2050-count-good-numbers

Dynamic Programming

0005-longest-palindromic-substring
0022-generate-parentheses
0044-wildcard-matching
0045-jump-game-ii
0055-jump-game
0062-unique-paths
0064-minimum-path-sum
0070-climbing-stairs
0085-maximal-rectangle
0115-distinct-subsequences
0120-triangle
0121-best-time-to-buy-and-sell-stock
0122-best-time-to-buy-and-sell-stock-ii
0123-best-time-to-buy-and-sell-stock-iii
0132-palindrome-partitioning-ii
0198-house-robber
0213-house-robber-ii
0300-longest-increasing-subsequence
0309-best-time-to-buy-and-sell-stock-with-cooldown
0312-burst-balloons
0322-coin-change
0368-largest-divisible-subset
0410-split-array-largest-sum
0416-partition-equal-subset-sum
0435-non-overlapping-intervals
0494-target-sum
0516-longest-palindromic-subsequence
0518-coin-change-ii
0583-delete-operation-for-two-strings
0673-number-of-longest-increasing-subsequence
0678-valid-parenthesis-string
0714-best-time-to-buy-and-sell-stock-with-transaction-fee
0787-cheapest-flights-within-k-stops
0943-sum-of-subarray-minimums
0967-minimum-falling-path-sum
1121-partition-array-for-maximum-sum
1129-longest-string-chain
1143-longest-common-subsequence
1170-shortest-common-supersequence
1250-longest-common-subsequence
1334-find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance
1437-minimum-insertion-steps-to-make-a-string-palindrome
1559-cherry-pickup-ii
1669-minimum-cost-to-cut-a-stick
1976-number-of-ways-to-arrive-at-destination

Combinatorics

0062-unique-paths

Linked List

0061-rotate-list
0141-linked-list-cycle
0142-linked-list-cycle-ii
0148-sort-list
0160-intersection-of-two-linked-lists
0206-reverse-linked-list
0234-palindrome-linked-list
0237-delete-node-in-a-linked-list
0328-odd-even-linked-list
0355-design-twitter
0908-middle-of-the-linked-list

String

0003-longest-substring-without-repeating-characters
0005-longest-palindromic-substring
0017-letter-combinations-of-a-phone-number
0022-generate-parentheses
0044-wildcard-matching
0079-word-search
0115-distinct-subsequences
0125-valid-palindrome
0132-palindrome-partitioning-ii
0205-isomorphic-strings
0402-remove-k-digits
0424-longest-repeating-character-replacement
0451-sort-characters-by-frequency
0516-longest-palindromic-subsequence
0583-delete-operation-for-two-strings
0678-valid-parenthesis-string
0721-accounts-merge
0812-rotate-string
0957-minimum-add-to-make-parentheses-valid
1129-longest-string-chain
1143-longest-common-subsequence
1170-shortest-common-supersequence
1250-longest-common-subsequence
1437-minimum-insertion-steps-to-make-a-string-palindrome
1460-number-of-substrings-containing-all-three-characters
1737-maximum-nesting-depth-of-the-parentheses
1885-count-number-of-homogenous-substrings
1890-sum-of-beauty-of-all-substrings

Hash Table

0003-longest-substring-without-repeating-characters
0017-letter-combinations-of-a-phone-number
0141-linked-list-cycle
0142-linked-list-cycle-ii
0160-intersection-of-two-linked-lists
0169-majority-element
0205-isomorphic-strings
0229-majority-element-ii
0355-design-twitter
0424-longest-repeating-character-replacement
0451-sort-characters-by-frequency
0496-next-greater-element-i
0621-task-scheduler
0721-accounts-merge
0846-hand-of-straights
0863-all-nodes-distance-k-in-binary-tree
0940-fruit-into-baskets
0966-binary-subarrays-with-sum
1034-subarrays-with-k-different-integers
1129-longest-string-chain
1370-count-number-of-nice-subarrays
1460-number-of-substrings-containing-all-three-characters
1890-sum-of-beauty-of-all-substrings

Divide and Conquer

0148-sort-list
0169-majority-element
0240-search-a-2d-matrix-ii

Sorting

0056-merge-intervals
0148-sort-list
0169-majority-element
0229-majority-element-ii
0368-largest-divisible-subset
0435-non-overlapping-intervals
0451-sort-characters-by-frequency
0455-assign-cookies
0621-task-scheduler
0721-accounts-merge
0846-hand-of-straights
1129-longest-string-chain
1669-minimum-cost-to-cut-a-stick

Counting

0169-majority-element
0229-majority-element-ii
0451-sort-characters-by-frequency
0621-task-scheduler
1034-subarrays-with-k-different-integers
1890-sum-of-beauty-of-all-substrings

Stack

0085-maximal-rectangle
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0234-palindrome-linked-list
0402-remove-k-digits
0496-next-greater-element-i
0503-next-greater-element-ii
0678-valid-parenthesis-string
0735-asteroid-collision
0943-sum-of-subarray-minimums
0957-minimum-add-to-make-parentheses-valid
1737-maximum-nesting-depth-of-the-parentheses
2227-sum-of-subarray-ranges

Tree

0099-recover-binary-search-tree
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0199-binary-tree-right-side-view
0222-count-complete-tree-nodes
0236-lowest-common-ancestor-of-a-binary-tree
0450-delete-node-in-a-bst
0701-insert-into-a-binary-search-tree
0863-all-nodes-distance-k-in-binary-tree

Binary Tree

0099-recover-binary-search-tree
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0199-binary-tree-right-side-view
0222-count-complete-tree-nodes
0236-lowest-common-ancestor-of-a-binary-tree
0450-delete-node-in-a-bst
0701-insert-into-a-binary-search-tree
0863-all-nodes-distance-k-in-binary-tree

Greedy

0044-wildcard-matching
0045-jump-game-ii
0055-jump-game
0122-best-time-to-buy-and-sell-stock-ii
0135-candy
0402-remove-k-digits
0410-split-array-largest-sum
0435-non-overlapping-intervals
0455-assign-cookies
0621-task-scheduler
0678-valid-parenthesis-string
0714-best-time-to-buy-and-sell-stock-with-transaction-fee
0846-hand-of-straights
0957-minimum-add-to-make-parentheses-valid

Simulation

0059-spiral-matrix-ii
0735-asteroid-collision

Enumeration

0204-count-primes
0856-consecutive-numbers-sum

Prefix Sum

0410-split-array-largest-sum
0966-binary-subarrays-with-sum
1046-max-consecutive-ones-iii
1370-count-number-of-nice-subarrays
1538-maximum-points-you-can-obtain-from-cards

Heap (Priority Queue)

0355-design-twitter
0451-sort-characters-by-frequency
0621-task-scheduler
0743-network-delay-time
0778-swim-in-rising-water
0787-cheapest-flights-within-k-stops
1631-path-with-minimum-effort

Bucket Sort

0451-sort-characters-by-frequency

String Matching

0812-rotate-string

Backtracking

0017-letter-combinations-of-a-phone-number
0022-generate-parentheses
0078-subsets
0079-word-search
0216-combination-sum-iii
0494-target-sum

Memoization

0070-climbing-stairs

Binary Indexed Tree

0673-number-of-longest-increasing-subsequence

Segment Tree

0673-number-of-longest-increasing-subsequence

Monotonic Stack

0085-maximal-rectangle
0402-remove-k-digits
0496-next-greater-element-i
0503-next-greater-element-ii
0943-sum-of-subarray-minimums
2227-sum-of-subarray-ranges

Merge Sort

0148-sort-list

Sliding Window

0003-longest-substring-without-repeating-characters
0424-longest-repeating-character-replacement
0940-fruit-into-baskets
0966-binary-subarrays-with-sum
1034-subarrays-with-k-different-integers
1046-max-consecutive-ones-iii
1370-count-number-of-nice-subarrays
1460-number-of-substrings-containing-all-three-characters
1538-maximum-points-you-can-obtain-from-cards

Number Theory

0204-count-primes

Design

0355-design-twitter

Binary Search Tree

0099-recover-binary-search-tree
0450-delete-node-in-a-bst
0701-insert-into-a-binary-search-tree

Graph Theory

0210-course-schedule-ii
0743-network-delay-time
0787-cheapest-flights-within-k-stops
0802-find-eventual-safe-states
1319-number-of-operations-to-make-network-connected
1334-find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance
1976-number-of-ways-to-arrive-at-destination

Topological Sort

0210-course-schedule-ii
0802-find-eventual-safe-states
1976-number-of-ways-to-arrive-at-destination

Union-Find

0721-accounts-merge
0778-swim-in-rising-water
0827-making-a-large-island
1319-number-of-operations-to-make-network-connected
1631-path-with-minimum-effort

Shortest Path

0743-network-delay-time
0787-cheapest-flights-within-k-stops
1334-find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance
1976-number-of-ways-to-arrive-at-destination

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors