Daily Coding Problems
AboutHEAD
  • 2-Sum problem

  • Product except self

  • Serialize and Deserialize Binary Trees

  • First missing positive

  • car, cdr, cons

  • XOR Linked list

  • Number of ways to decode a message

  • Universal Value Tree Count

  • Largest sum of non-adjacent numbers in array

  • Job Scheduler

  • Autocomplete system

  • Number of ways to climb a staircase

  • Longest substring with at most K distinct characters

  • Pi estimation using Monte Carlo method

  • Random element from large input stream

  • Order Log

  • Longest absolute path in file structure

  • Max of each Subarray

  • Intersecting Linked Lists

  • Classroom Scheduling problem

  • Word Break

  • Binary Tree Locking

  • Remove ksupthsup last element in linked list

  • Balanced parantheses

  • Justify text

  • Run length encoding

  • Elevation map

  • Running Median

  • Swap RGB array in-place

  • Second largest node in binary tree

  • Power Set

  • Non-threatening Queens

  • Non-duplicated item in array

  • Flight itinerary

  • K sum subset

  • Stack Implementation

  • Count inversions

  • Random number generator

  • Longest palindromic substring

  • Maximum stock profit

  • Reconstruct binary tree given preorder and postorder traversals

  • Max Sum Subarray or Kadane's algorithm

  • Binary Tree Arithmetic

  • Deck shuffling with swaps only

  • LRU Cache Implementation

  • Queue Implementation

  • Sudoku solver

  • URL shortener

  • Graph Coloring

  • String Break

  • Rotated sorted array search

  • Equal Sum Partition

  • Integer exponentiation

  • Top-Left to Bottom-Right

  • Word Matrix

  • Knight's Tour

  • Spiral Matrix

  • Unbiased Toss

  • LFU Cache Implementation

  • Attacking Bishops

  • Max triplet product

  • Perfect Numbers

  • Another Random Number Generator

  • Largest Value Path in a Directed Graph

  • Reverse Linked List in-place

  • Count occurrences in multiplication table

  • Largest increasing subsequence

  • Lexicographic matrix sort

  • Merge overlapping intervals

  • Mergesort linked lists

  • Modifiabale non-decreasing array

  • Deepest Node in Binary Tree

  • Letter Combinations from Dictionary

  • Implementation of readN(n) using read7

  • Reverse Binary Tree

  • Island Count

  • X or Y

  • Min parantheses removal

  • Validate Map

  • Integer division

  • Valid BST

  • Random number generator with exception rule

  • Function correction

  • Valid Course Ordering

  • Largest BST Size

  • Tree Maximum Path Sum between 2 Leaves

  • Next greater permutation

  • All permutations

  • Time-based Map

  • Find Word in Grid

  • Longest Continuous Sequence

  • Minimum Step Move

  • Goldbach conjecture

  • Continuous subarray sum equals K

  • Shortest substring containing given characters

  • Palindrome Linked List

  • Function Debounce

  • Hop array to other end

  • Print binary tree level-wise

  • String shift and check equality

  • Swap even and odd bits

  • All paths in a binary tree

  • Anagram start-indices in a string

  • LCA of Binary Tree

  • Reverse words in a string

  • Reverse words in string with delimiters relative order

  • Check whether one binary tree is subtree of another

  • Generate arbitrarily sized binary tree

  • Max Level sum in a binary tree

  • Sort squares of elements in sorted array

  • Singleton pattern with twist

  • Make palindrome with minimum deletions

  • Collect maximum coins in 2-D matrix

  • Does string represent a number

  • Flip coins till only one remains

  • 2-Sum problem in binary tree

  • Rotate array in-place

  • Add numbers represented as linked list

  • Tower of Hanoi

  • Square root of a real number

  • Maximum profit from k buy-sells

  • Deep clone linked list having a random pointer at each node

  • Hit Counter class implementation

  • In-Order successor of a node in a binary tree

  • Large sparse array data structure

  • Min root to leaf sum path in binary tree

  • Largest rectangle in a matrix

  • Bit array implementation

  • Minimum coins for n cents

  • Peekable iterator

  • Which two elements occur once in array

  • 3 stacks implementation

  • Balanced parantheses - II

  • List partitioning

  • Nearest larger number in an array

  • Pairwise swap linked list nodes

  • Binary tree pruning

  • Pancake Sort

  • Subarray sum

  • Gray code

  • K nearest neighbors

  • Color image

  • Random number generator

  • Minimum word distance

  • Stack implementation using heap API

  • Majority Element

  • smallest number of squared integers which sum to n

  • Palindrome string permutation possible

  • Walled fort

  • First recurring character in string

  • Longest path in tree

  • Reverse bits

  • Shortest unique prefix

  • Reverse Polish notation

  • Find the only duplicate in array

  • Number of smaller elements to the right in an array

  • 2-D iterator class

  • Palindrome concatenation pairs

  • Rotate 2-D array in-place

  • Sort a linked list

  • Shortest transformation from start word to end word

  • Busiest time interval from a register

  • Starting indices of word concatenations in a string

  • Flatten a nested dictionary

  • Polymorphism examples

  • Markov chain simulation

  • One-to-one character mapping between two strings

  • Rotate a linked list

  • Dice Simulation

  • Recover BST from its postorder traversal

  • Interleave two halves of a stack using a queue

  • Minimum number of palindromes in a string

  • Minimally connected graph

  • Calculate GCD of numbers

  • Calculate intersection area

  • Divide array into 2 subsets with min difference of subset sums

  • Overlapping rectangles

  • Array of functions

  • Longest contiguous distinct subarray

  • Max sum subarray of circular array

  • Min intervals to remove to make them non-overlapping

  • Try to reach end of array with array value-sized hops

  • Max profit in a stock price array with a fixed transaction fee

  • Number of intersections between line segments joining two sets of n points of parallel lines

  • Count elements between two numbers in a 2-D array

  • Most frequent subtree sum

  • Rotate array to the right by K in-place

  • Largest set of non-coprime numbers in a set

  • Balanced parantheses - III

  • Find a stabbing point between n intervals

  • Maximum sum path in a triangular array

  • Integer palindrome

  • Minimum element in rotated sorted array in faster than linear time

  • Count the number of nodes in a complete binary tree in faster than linear time

  • Given a number find the next permutation of it

  • Apply a permutation on an array

  • Check if a graph is bipartite

  • Partition a linked list by a node such that all elements = a node come after those smaller

  • Collatz conjecture verificity and longest sequence

  • All starting positions of a pattern in a string

  • Excel column encoding of a positive integer

  • Valid IP address combinations from a string

  • Max continuous ones in binary representation of a number

  • Minimum boats to rescue

  • Min Running Track Path

  • Pascal's Triangle

  • Convert sorted array to Balanced BST

  • Minimum drinks to satisfy preferences

  • Max Run with at most two discrete elements

  • Min pipe length required for a city graph

  • Peak element in array in O(log N) time