Skip to content

hihanghoeng33/One-Problem-a-day

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is my repo to save every problem that I solved on online website


Every accepted solution will be documented in every folder in this repo. The folder such as Codeforces, Codewars, and Leetcode(auto commit using extension). Current language used: C/C++.

Eat Code Sleep

Stay foolish

Array

0033-search-in-rotated-sorted-array
0034-find-first-and-last-position-of-element-in-sorted-array
0118-pascals-triangle
0121-best-time-to-buy-and-sell-stock
0136-single-number
0204-count-primes
1137-height-checker

Dynamic Programming

0118-pascals-triangle
0121-best-time-to-buy-and-sell-stock

Two Pointers

0028-find-the-index-of-the-first-occurrence-in-a-string
0125-valid-palindrome
0141-linked-list-cycle
0344-reverse-string
0633-sum-of-square-numbers
0680-valid-palindrome-ii

String

0013-roman-to-integer
0020-valid-parentheses
0028-find-the-index-of-the-first-occurrence-in-a-string
0125-valid-palindrome
0344-reverse-string

Linked List

0083-remove-duplicates-from-sorted-list
0141-linked-list-cycle

Bit Manipulation

0136-single-number
0231-power-of-two
0342-power-of-four

Math

0007-reverse-integer
0009-palindrome-number
0013-roman-to-integer
0043-multiply-strings
0171-excel-sheet-column-number
0204-count-primes
0231-power-of-two
0326-power-of-three
0342-power-of-four
0367-valid-perfect-square
0633-sum-of-square-numbers

Hash Table

0013-roman-to-integer
0141-linked-list-cycle

Stack

0020-valid-parentheses
0094-binary-tree-inorder-traversal
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal

Sorting

1137-height-checker

Counting Sort

1137-height-checker

String Matching

0028-find-the-index-of-the-first-occurrence-in-a-string
0043-multiply-strings
0171-excel-sheet-column-number
0680-valid-palindrome-ii

Simulation

0043-multiply-strings

Recursion

0231-power-of-two
0326-power-of-three
0342-power-of-four

Binary Search

0033-search-in-rotated-sorted-array
0034-find-first-and-last-position-of-element-in-sorted-array
0367-valid-perfect-square
0633-sum-of-square-numbers

Enumeration

0204-count-primes

Number Theory

0204-count-primes

Greedy

0680-valid-palindrome-ii

Tree

0094-binary-tree-inorder-traversal
0100-same-tree
0101-symmetric-tree
0112-path-sum
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal

Depth-First Search

0094-binary-tree-inorder-traversal
0100-same-tree
0101-symmetric-tree
0112-path-sum
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal

Breadth-First Search

0100-same-tree
0101-symmetric-tree
0112-path-sum

Binary Tree

0094-binary-tree-inorder-traversal
0100-same-tree
0101-symmetric-tree
0112-path-sum
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal

Graph

1916-find-center-of-star-graph

LeetCode Topics

Linked List

0002-add-two-numbers
0019-remove-nth-node-from-end-of-list
0148-sort-list
0203-remove-linked-list-elements
0206-reverse-linked-list
0234-palindrome-linked-list

Two Pointers

0019-remove-nth-node-from-end-of-list
0042-trapping-rain-water
0148-sort-list
0151-reverse-words-in-a-string
0234-palindrome-linked-list
0283-move-zeroes
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0455-assign-cookies
0557-reverse-words-in-a-string-iii
1468-check-if-n-and-its-double-exist
1566-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence
1615-range-sum-of-sorted-subarray-sums

Divide and Conquer

0148-sort-list
0169-majority-element
0191-number-of-1-bits

Sorting

0148-sort-list
0169-majority-element
0217-contains-duplicate
0268-missing-number
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0389-find-the-difference
0455-assign-cookies
1468-check-if-n-and-its-double-exist
1482-how-many-numbers-are-smaller-than-the-current-number
1556-make-two-arrays-equal-by-reversing-subarrays
1615-range-sum-of-sorted-subarray-sums
1741-sort-array-by-increasing-frequency
2502-sort-the-people

Merge Sort

0148-sort-list

Array

0042-trapping-rain-water
0048-rotate-image
0066-plus-one
0153-find-minimum-in-rotated-sorted-array
0169-majority-element
0217-contains-duplicate
0268-missing-number
0283-move-zeroes
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0448-find-all-numbers-disappeared-in-an-array
0455-assign-cookies
0485-max-consecutive-ones
0496-next-greater-element-i
0575-distribute-candies
0605-can-place-flowers
0792-binary-search
0890-lemonade-change
0898-transpose-matrix
1293-three-consecutive-odds
1468-check-if-n-and-its-double-exist
1482-how-many-numbers-are-smaller-than-the-current-number
1496-lucky-numbers-in-a-matrix
1556-make-two-arrays-equal-by-reversing-subarrays
1615-range-sum-of-sorted-subarray-sums
1720-crawler-log-folder
1741-sort-array-by-increasing-frequency
1786-count-the-number-of-consistent-strings
2132-convert-1d-array-into-2d-array
2163-kth-distinct-string-in-an-array
2502-sort-the-people
2727-number-of-senior-citizens
3221-find-the-peaks

Binary Search

0153-find-minimum-in-rotated-sorted-array
0268-missing-number
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0792-binary-search
1468-check-if-n-and-its-double-exist
1615-range-sum-of-sorted-subarray-sums

Hash Table

0169-majority-element
0217-contains-duplicate
0268-missing-number
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0383-ransom-note
0389-find-the-difference
0448-find-all-numbers-disappeared-in-an-array
0496-next-greater-element-i
0575-distribute-candies
0782-jewels-and-stones
1468-check-if-n-and-its-double-exist
1482-how-many-numbers-are-smaller-than-the-current-number
1556-make-two-arrays-equal-by-reversing-subarrays
1741-sort-array-by-increasing-frequency
1786-count-the-number-of-consistent-strings
2163-kth-distinct-string-in-an-array
2502-sort-the-people

Math

0002-add-two-numbers
0048-rotate-image
0066-plus-one
0263-ugly-number
0268-missing-number
0371-sum-of-two-integers
0412-fizz-buzz
0415-add-strings
0504-base-7
0507-perfect-number
1013-fibonacci-number
1086-divisor-game
1236-n-th-tribonacci-number
1406-subtract-the-product-and-sum-of-digits-of-an-integer
1642-water-bottles
2491-smallest-even-multiple
2556-convert-the-temperature
2645-pass-the-pillow
3450-find-the-child-who-has-the-ball-after-k-seconds

String

0032-longest-valid-parentheses
0151-reverse-words-in-a-string
0383-ransom-note
0389-find-the-difference
0412-fizz-buzz
0415-add-strings
0551-student-attendance-record-i
0557-reverse-words-in-a-string-iii
0657-robot-return-to-origin
0782-jewels-and-stones
1205-defanging-an-ip-address
1566-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence
1720-crawler-log-folder
1786-count-the-number-of-consistent-strings
2076-sum-of-digits-of-string-after-convert
2163-kth-distinct-string-in-an-array
2502-sort-the-people
2727-number-of-senior-citizens
3426-minimum-number-of-chairs-in-a-waiting-room

Simulation

0412-fizz-buzz
0415-add-strings
0657-robot-return-to-origin
0898-transpose-matrix
1642-water-bottles
2076-sum-of-digits-of-string-after-convert
2132-convert-1d-array-into-2d-array
2645-pass-the-pillow
3426-minimum-number-of-chairs-in-a-waiting-room
3450-find-the-child-who-has-the-ball-after-k-seconds

Bit Manipulation

0191-number-of-1-bits
0268-missing-number
0338-counting-bits
0371-sum-of-two-integers
0389-find-the-difference
0461-hamming-distance
0476-number-complement
1786-count-the-number-of-consistent-strings

Stack

0032-longest-valid-parentheses
0042-trapping-rain-water
0145-binary-tree-postorder-traversal
0234-palindrome-linked-list
0496-next-greater-element-i
0776-n-ary-tree-postorder-traversal
1720-crawler-log-folder

Tree

0104-maximum-depth-of-binary-tree
0111-minimum-depth-of-binary-tree
0145-binary-tree-postorder-traversal
0404-sum-of-left-leaves
0776-n-ary-tree-postorder-traversal

Depth-First Search

0104-maximum-depth-of-binary-tree
0111-minimum-depth-of-binary-tree
0145-binary-tree-postorder-traversal
0404-sum-of-left-leaves
0776-n-ary-tree-postorder-traversal

Breadth-First Search

0104-maximum-depth-of-binary-tree
0111-minimum-depth-of-binary-tree
0404-sum-of-left-leaves

Binary Tree

0104-maximum-depth-of-binary-tree
0111-minimum-depth-of-binary-tree
0145-binary-tree-postorder-traversal
0404-sum-of-left-leaves

Recursion

0002-add-two-numbers
0203-remove-linked-list-elements
0206-reverse-linked-list
0234-palindrome-linked-list
1013-fibonacci-number

Matrix

0048-rotate-image
0898-transpose-matrix
1496-lucky-numbers-in-a-matrix
2132-convert-1d-array-into-2d-array

Dynamic Programming

0032-longest-valid-parentheses
0042-trapping-rain-water
0338-counting-bits
1013-fibonacci-number
1086-divisor-game
1236-n-th-tribonacci-number

Memoization

1013-fibonacci-number
1236-n-th-tribonacci-number

Enumeration

3221-find-the-peaks

Counting

0169-majority-element
0383-ransom-note
1482-how-many-numbers-are-smaller-than-the-current-number
1786-count-the-number-of-consistent-strings
2163-kth-distinct-string-in-an-array

Greedy

0455-assign-cookies
0605-can-place-flowers
0890-lemonade-change

Monotonic Stack

0042-trapping-rain-water
0496-next-greater-element-i

Database

0586-customer-placing-the-largest-number-of-orders
0596-classes-more-than-5-students
0619-biggest-single-number

Backtracking

0077-combinations

Brainteaser

1086-divisor-game

Game Theory

1086-divisor-game

Number Theory

2491-smallest-even-multiple

String Matching

1566-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence