Skip to content

This plugin will automatically push your code to GitHub after you successfully pass all tests for a Leetcode problem.

Notifications You must be signed in to change notification settings

Ash0508/Leetcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetHub

LeetHub is a Chrome extension that automatically pushes your code to GitHub when you pass all tests on a LeetCode problem. It is a fork of LeetHub-2.0, which is no longer compatible with LeetCode due to recent updates.

Why LeetHub?

LeetCode problems are not easily accessible in one place, and manually pushing code to GitHub from LeetCode can be time-consuming. LeetHub automates this process, saving you time and effort by eliminating the need for manual uploads.

Supported UI

LeetHub supports two different LeetCode UIs. Please note that there are known issues with the "non-dynamic layout." For optimal performance, use one of the following:

Old layout

New "dynamic layout" Manual Synchronization If you update the text in the editor too quickly, your submission may not upload to GitHub successfully. It is necessary to wait for 4 seconds (until the spinner stops) after submitting your solution before making any changes, switching languages, or switching editors. During this period, your solution is being pushed to GitHub, and the website layout should remain unchanged. We apologize for this inconvenience and are open to any solutions or improvements you may have.

A manual synchronization button is available next to the notes icon. Use this button only after successfully submitting your solution to LeetCode. You can also push previous submissions to GitHub by selecting the submission and clicking the manual synchronization button.

Installation

Download from Chrome Web Store The preferred way to install LeetHub is through the Chrome Web Store. Updates will be installed automatically.

Manual Installation

If you prefer manual installation, follow these steps:

Create your own OAuth app in GitHub:

Go to GitHub OAuth Applications Application Name: [CUSTOM] Homepage URL: https://github.com/Ash0508/Leetcode Authorization Callback URL: https://github.com/ Store CLIENT_ID and CLIENT_SECRET confidentially. Download the project ZIP from the Releases section or clone the repository.

Run npm run setup to install the developer dependencies.

Update CLIENT_ID and CLIENT_SECRET in scripts/authorize.js and scripts/oauth2.js with your credentials.

Go to chrome://extensions.

Enable Developer mode by toggling the switch in the top-right corner.

Click "Load unpacked."

Select the entire LeetHub folder.

Setup

After installing LeetHub, launch the extension. Click on "Authorize with GitHub" to set up your account with LeetHub. Set up an existing or new repository with LeetHub (default is private) by clicking "Get Started." Start coding on LeetCode! To view your progress, simply click on the extension.

LeetCode Solutions in JAVA

Welcome to my LeetCode Solutions repository! Here, I have uploaded solutions to more than 100 LeetCode problems. Each solution is written in Java and is accompanied by the problem statement for easy reference.

Table of Contents

Introduction

Welcome to the [Repository Name]! This repository is designed to provide comprehensive resources on various [topics covered]. Whether you're a student, developer, or data scientist, you'll find valuable information and code examples to help you understand and implement these concepts.

Structure of the Repository

The repository is organized as follows:

Problem # Problem Title Execution Time Memory Usage
0001 Two Sum 2 ms 44.7 MB
0002 Add Two Numbers 2 ms 44.1 MB
0003 Longest Substring Without Repeating Characters 6 ms 44.5 MB
0004 Median of Two Sorted Arrays 2 ms 45.9 MB
0007 Reverse Integer 0 ms 40.9 MB
0014 Longest Common Prefix 3 ms 9.5 MB
0015 3Sum 28 ms 51.3 MB
0016 3Sum Closest 16 ms 42.6 MB
0019 Remove Nth Node From End of List 0 ms 41.5 MB
0021 Merge Two Sorted Lists 0 ms 42.7 MB
0022 Generate Parentheses 1 ms 41.8 MB
0023 Merge K Sorted Lists 98 ms 20.9 MB
0024 Swap Nodes in Pairs 0 ms 7.8 MB
0025 Reverse Nodes in K-Group 3 ms 44.2 MB
0026 Remove Duplicates from Sorted Array 1 ms 44.9 MB
0028 Find the Index of the First Occurrence in a String 0 ms 41.3 MB
0029 Divide Two Integers 1 ms 40 MB
0030 Substring with Concatenation of All Words 2154 ms 45.2 MB
0031 Next Permutation 0 ms 42.8 MB
0032 Longest Valid Parentheses 46 ms 16.9 MB
0033 Search in Rotated Sorted Array 40 ms 16.4 MB
0034 Find First and Last Position of Element in Sorted Array 83 ms 17.7 MB
0035 Search Insert Position 55 ms 17.1 MB
0036 Valid Sudoku 19 ms 44.7 MB
0037 Sudoku Solver 8 ms 40.8 MB
0038 Count and Say 62 ms 16.2 MB
0039 Combination Sum 8 ms 11.1 MB
0040 Combination Sum II 13 ms 11.8 MB
0041 First Missing Positive Attach NOTES 8 months ago
0042 Trapping Rain Water 1 ms 45.4 MB
0043 Multiply Strings 10 ms 42.8 MB
0044 Wildcard Matching 881 ms 661.9 MB
0045 Jump Game II 1 ms 44.2 MB
0046 Permutations 1 ms 44.3 MB
0047 Permutations II 160 ms 40.9 MB
0048 Rotate Image 4 ms 7.6 MB
0049 Group Anagrams 6 ms 47.2 MB
0050 Pow(x, n) 4 ms 7.9 MB
0051 N-Queens 12 ms 45.1 MB
0053 Maximum Subarray 1 ms 56.7 MB
0056 Merge Intervals 4 ms 44.7 MB
0061 Rotate List 0 ms 40.2 MB
0062 Unique Paths 0 ms 39.4 MB
0063 Unique Paths II 0 ms 39.4 MB
0064 Minimum Path Sum 4 ms 15.4 MB
0065 Valid Number 4 ms 39.1 MB
0066 Plus One 0 ms 37.9 MB
0067 Add Binary 0 ms 37.9 MB
0069 Sqrt(x) 0 ms 5.7 MB
0070 Climbing Stairs 0 ms 35.6 MB
0071 Simplify Path 3 ms 39.5 MB
0072 Edit Distance 7 ms 39.3 MB
0073 Set Matrix Zeroes 5 ms 15.3 MB
0074 Search a 2D Matrix 0 ms 38.8 MB
0075 Sort Colors 0 ms 37.9 MB
0076 Minimum Window Substring 6 ms 9.7 MB
0077 Combinations 1 ms 32.8 MB
0078 Subsets 1 ms 34.1 MB
0079 Word Search 190 ms 15.1 MB
0080 Remove Duplicates from Sorted Array II 0 ms 37.9 MB
0081 Search in Rotated Sorted Array II 0 ms 39.5 MB
0082 Remove Duplicates from Sorted List II 1 ms 36.4 MB
0083 Remove Duplicates from Sorted List 0 ms 36.6 MB
0084 Largest Rectangle in Histogram 17 ms 19.1 MB
0085 Maximal Rectangle 17 ms 19.5 MB
0086 Partition List 0 ms 39.4 MB
0087 Scramble String 3 ms 39.5 MB
0088 Merge Sorted Array 0 ms 39.5 MB
0089 Gray Code 0 ms 37.9 MB
0090 Subsets II 1 ms 39.5 MB
0091 Decode Ways 1 ms 37.1 MB
0092 Reverse Linked List II 0 ms 36.7 MB
0093 Restore IP Addresses 1 ms 35.9 MB
0094 Binary Tree Inorder Traversal 0 ms 37.1 MB
0095 Unique Binary Search Trees II 1 ms 38.1 MB
0096 Unique Binary Search Trees 0 ms 36.8 MB
0097 Interleaving String 2 ms 39.4 MB
0098 Validate Binary Search Tree 0 ms 41.2 MB
0099 Recover Binary Search Tree 1 ms 39.5 MB
0100 Same Tree 0 ms 37.1 MB
0101 Symmetric Tree 0 ms 38.4 MB
0102 Binary Tree Level Order Traversal 0 ms 39.7 MB
0103 Binary Tree Zigzag Level Order Traversal 0 ms 39.8 MB
0104 Maximum Depth of Binary Tree 0 ms 40.1 MB
0105 Construct Binary Tree from Preorder and Inorder Traversal 1 ms 39.7 MB

How to Use

To get started, follow these steps:

  1. Clone the repository:

    git clone https://github.com/username/repository-name.git
    cd repository-name
  2. Install the required dependencies:

    pip install -r requirements.txt
  3. Follow the instructions in the relevant folders to run the code examples or access the resources.

Topics Covered

This repository covers the following topics:

  • Arrays: Techniques for manipulating and traversing arrays.
  • Linked Lists: Implementations and algorithms involving singly and doubly linked lists.
  • Stacks and Queues: Concepts, operations, and applications of stacks and queues.
  • Trees: Tree traversal methods, binary search trees, AVL trees, and other tree-based structures.
  • Graphs: Graph representation, traversal algorithms (BFS, DFS), shortest path algorithms (Dijkstra, Bellman-Ford).
  • Hashing: Hash tables, hash functions, and collision resolution strategies.
  • Dynamic Programming: Solving problems using memoization and tabulation techniques.
  • Recursion: Understanding and applying recursive algorithms.
  • Sorting and Searching: Various sorting algorithms (Quick Sort, Merge Sort, Heap Sort) and searching techniques.
  • Greedy Algorithms: Strategies for making the locally optimal choice at each step.
  • Bit Manipulation: Performing operations directly on bits for optimization.
  • Backtracking: Techniques for solving constraint satisfaction problems.
  • Strings: String manipulation, pattern matching algorithms, and parsing.
  • Mathematics: Number theory, combinatorics, and other mathematical concepts in problem-solving.
  • Geometry: Computational geometry algorithms.
  • Advanced Data Structures: Heaps, Tries, Segment Trees, Fenwick Trees, and Disjoint Set Union (DSU).

Contact

If you have any questions or feedback, feel free to reach out:

LeetCode Topics

String

1006-vowel-spellchecker
2887-sort-vowels-in-a-string
3872-find-most-frequent-vowel-and-consonant

Sorting

2887-sort-vowels-in-a-string

Array

0493-reverse-pairs
1006-vowel-spellchecker

Binary Search

0493-reverse-pairs

Divide and Conquer

0493-reverse-pairs

Binary Indexed Tree

0493-reverse-pairs

Segment Tree

0493-reverse-pairs

Merge Sort

0493-reverse-pairs

Ordered Set

0493-reverse-pairs

Hash Table

1006-vowel-spellchecker
3872-find-most-frequent-vowel-and-consonant

Counting

3872-find-most-frequent-vowel-and-consonant

About

This plugin will automatically push your code to GitHub after you successfully pass all tests for a Leetcode problem.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published