Git Product home page Git Product logo

leetcode-solution's Introduction

A collection of LeetCode questions to ace the coding interview! - Created using LeetHub v2

LeetCode Topics

Array

0307-range-sum-query-mutable
0309-best-time-to-buy-and-sell-stock-with-cooldown
0350-intersection-of-two-arrays-ii
0376-wiggle-subsequence
0416-partition-equal-subset-sum
0518-coin-change-ii
0624-maximum-distance-in-arrays
0646-maximum-length-of-pair-chain
0719-find-k-th-smallest-pair-distance
0870-magic-squares-in-grid
0890-lemonade-change
0907-koko-eating-bananas
0921-spiral-matrix-iii
0948-sort-an-array
1196-filling-bookcase-shelves
1207-delete-nodes-and-return-forest
1293-three-consecutive-odds
1330-longest-arithmetic-subsequence-of-given-difference
1333-sort-the-jumbled-numbers
1496-lucky-numbers-in-a-matrix
1511-count-number-of-teams
1556-make-two-arrays-equal-by-reversing-subarrays
1615-range-sum-of-sorted-subarray-sums
1616-minimum-difference-between-largest-and-smallest-value-in-three-moves
1691-minimum-number-of-days-to-disconnect-island
1711-find-valid-matrix-given-row-and-column-sums
1720-crawler-log-folder
1741-sort-array-by-increasing-frequency
1803-average-waiting-time
2067-maximum-number-of-points-with-cost
2163-kth-distinct-string-in-an-array
2255-minimum-swaps-to-group-all-1s-together-ii
2306-create-binary-tree-from-descriptions
2472-build-a-matrix-with-conditions
2502-sort-the-people
2727-number-of-senior-citizens
2846-robot-collisions
3235-minimum-cost-to-convert-string-i
3504-minimum-moves-to-get-a-peaceful-board

Binary Search

0350-intersection-of-two-arrays-ii
0719-find-k-th-smallest-pair-distance
0907-koko-eating-bananas
1615-range-sum-of-sorted-subarray-sums

Depth-First Search

1207-delete-nodes-and-return-forest
1431-all-ancestors-of-a-node-in-a-directed-acyclic-graph
1653-number-of-good-leaf-nodes-pairs
1691-minimum-number-of-days-to-disconnect-island
2217-step-by-step-directions-from-a-binary-tree-node-to-another

Breadth-First Search

1431-all-ancestors-of-a-node-in-a-directed-acyclic-graph
1691-minimum-number-of-days-to-disconnect-island

Graph

1431-all-ancestors-of-a-node-in-a-directed-acyclic-graph
1456-find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance
1701-remove-max-number-of-edges-to-keep-graph-fully-traversable
2472-build-a-matrix-with-conditions
3235-minimum-cost-to-convert-string-i

Topological Sort

1431-all-ancestors-of-a-node-in-a-directed-acyclic-graph
2472-build-a-matrix-with-conditions

Union Find

1701-remove-max-number-of-edges-to-keep-graph-fully-traversable

Hash Table

0264-ugly-number-ii
0350-intersection-of-two-arrays-ii
0726-number-of-atoms
0870-magic-squares-in-grid
1207-delete-nodes-and-return-forest
1330-longest-arithmetic-subsequence-of-given-difference
1556-make-two-arrays-equal-by-reversing-subarrays
1741-sort-array-by-increasing-frequency
1982-remove-duplicates-from-an-unsorted-linked-list
2163-kth-distinct-string-in-an-array
2306-create-binary-tree-from-descriptions
2502-sort-the-people
3276-minimum-number-of-pushes-to-type-word-ii

Two Pointers

0350-intersection-of-two-arrays-ii
0719-find-k-th-smallest-pair-distance
1615-range-sum-of-sorted-subarray-sums

Sorting

0350-intersection-of-two-arrays-ii
0646-maximum-length-of-pair-chain
0719-find-k-th-smallest-pair-distance
0726-number-of-atoms
0948-sort-an-array
1333-sort-the-jumbled-numbers
1556-make-two-arrays-equal-by-reversing-subarrays
1615-range-sum-of-sorted-subarray-sums
1616-minimum-difference-between-largest-and-smallest-value-in-three-moves
1741-sort-array-by-increasing-frequency
2502-sort-the-people
2846-robot-collisions
3276-minimum-number-of-pushes-to-type-word-ii
3504-minimum-moves-to-get-a-peaceful-board

Dynamic Programming

0264-ugly-number-ii
0309-best-time-to-buy-and-sell-stock-with-cooldown
0376-wiggle-subsequence
0416-partition-equal-subset-sum
0518-coin-change-ii
0646-maximum-length-of-pair-chain
1196-filling-bookcase-shelves
1330-longest-arithmetic-subsequence-of-given-difference
1456-find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance
1511-count-number-of-teams
1756-minimum-deletions-to-make-string-balanced
2067-maximum-number-of-points-with-cost

Greedy

0376-wiggle-subsequence
0624-maximum-distance-in-arrays
0646-maximum-length-of-pair-chain
0890-lemonade-change
1616-minimum-difference-between-largest-and-smallest-value-in-three-moves
1711-find-valid-matrix-given-row-and-column-sums
1818-maximum-score-from-removing-substrings
3276-minimum-number-of-pushes-to-type-word-ii
3504-minimum-moves-to-get-a-peaceful-board

Linked List

1982-remove-duplicates-from-an-unsorted-linked-list
2182-find-the-minimum-and-maximum-number-of-nodes-between-critical-points
2299-merge-nodes-in-between-zeros

Simulation

0921-spiral-matrix-iii
1642-water-bottles
1803-average-waiting-time
2299-merge-nodes-in-between-zeros
2645-pass-the-pillow
2846-robot-collisions

Math

0264-ugly-number-ii
0870-magic-squares-in-grid
1642-water-bottles
2645-pass-the-pillow

String

0726-number-of-atoms
1298-reverse-substrings-between-each-pair-of-parentheses
1720-crawler-log-folder
1756-minimum-deletions-to-make-string-balanced
1818-maximum-score-from-removing-substrings
2163-kth-distinct-string-in-an-array
2217-step-by-step-directions-from-a-binary-tree-node-to-another
2502-sort-the-people
2727-number-of-senior-citizens
3235-minimum-cost-to-convert-string-i
3276-minimum-number-of-pushes-to-type-word-ii

Stack

0726-number-of-atoms
1298-reverse-substrings-between-each-pair-of-parentheses
1720-crawler-log-folder
1756-minimum-deletions-to-make-string-balanced
1818-maximum-score-from-removing-substrings
2846-robot-collisions

Tree

0789-kth-largest-element-in-a-stream
1207-delete-nodes-and-return-forest
1653-number-of-good-leaf-nodes-pairs
2217-step-by-step-directions-from-a-binary-tree-node-to-another
2306-create-binary-tree-from-descriptions

Binary Tree

0789-kth-largest-element-in-a-stream
1207-delete-nodes-and-return-forest
1653-number-of-good-leaf-nodes-pairs
2217-step-by-step-directions-from-a-binary-tree-node-to-another
2306-create-binary-tree-from-descriptions

Matrix

0870-magic-squares-in-grid
0921-spiral-matrix-iii
1496-lucky-numbers-in-a-matrix
1691-minimum-number-of-days-to-disconnect-island
1711-find-valid-matrix-given-row-and-column-sums
2472-build-a-matrix-with-conditions

Design

0307-range-sum-query-mutable
0789-kth-largest-element-in-a-stream

Binary Indexed Tree

0307-range-sum-query-mutable
1511-count-number-of-teams

Segment Tree

0307-range-sum-query-mutable

Divide and Conquer

0948-sort-an-array

Heap (Priority Queue)

0264-ugly-number-ii
0789-kth-largest-element-in-a-stream
0948-sort-an-array

Merge Sort

0948-sort-an-array

Bucket Sort

0948-sort-an-array

Radix Sort

0948-sort-an-array

Counting Sort

0948-sort-an-array
2163-kth-distinct-string-in-an-array
3276-minimum-number-of-pushes-to-type-word-ii
3504-minimum-moves-to-get-a-peaceful-board

Shortest Path

1456-find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance
3235-minimum-cost-to-convert-string-i

Sliding Window

2255-minimum-swaps-to-group-all-1s-together-ii

Strongly Connected Component

1691-minimum-number-of-days-to-disconnect-island

Binary Search Tree

0789-kth-largest-element-in-a-stream

Data Stream

0789-kth-largest-element-in-a-stream

Bit Manipulation

0476-number-complement

leetcode-solution's People

Contributors

mneach avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.