In "Array"

Subarray Sum Equals K

Subarray Sum Equals K

Given an array of integers nums and an integer k, return the total number of subarrays whose sum equals...

14 min read
Squares of a Sorted Array

Squares of a Sorted Array

Given an integer array nums sorted in non-decreasing order, return an array of the squares of each number sorted in non-decreasing order....

12 min read
Check If N and Its Double Exist

Check If N and Its Double Exist

Given an array arr of integers, check if there exist two indices i and j such that :

10 min read
Remove Element

Remove Element

Given an integer array nums and an integer val, remove all occurrences of val in nums in-place. The relative order of the...

15 min read
Merge Sorted Array

Merge Sorted Array

You are given two integer arrays nums1 and nums2, sorted in non-decreasing order, and two integers m and n, representing the number...

12 min read
Duplicate Zeros

Duplicate Zeros

Given a fixed-length integer array arr, duplicate each occurrence of zero, shifting the remaining elements to...

14 min read
Remove Duplicates from Sorted Array

Remove Duplicates from Sorted Array

Given an integer array nums sorted in non-decreasing order, remove the duplicates in-place such that each unique element appears only once....

13 min read
Candy Crush

Candy Crush

This question is about implementing a basic elimination algorithm for Candy Crush.

24 min read
Find Numbers with Even Number of Digits

Find Numbers with Even Number of Digits

Given an array nums of integers, return how many of them contain an even number of digits.

12 min read
Max Consecutive Ones

Max Consecutive Ones

Given a binary array nums, return the maximum number of consecutive 1's in the array.

10 min read

In "LinkedList"

Add Two Numbers

Add Two Numbers

You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order,...

21 min read

In "Maths"

Add Two Numbers

Add Two Numbers

You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order,...

21 min read

In "Recursion"

Add Two Numbers

Add Two Numbers

You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order,...

21 min read

In "TwoPointers"

String Compression

String Compression

Given an array of characters chars, compress it using the following algorithm:

17 min read
Squares of a Sorted Array

Squares of a Sorted Array

Given an integer array nums sorted in non-decreasing order, return an array of the squares of each number sorted in non-decreasing order....

12 min read
Check If N and Its Double Exist

Check If N and Its Double Exist

Given an array arr of integers, check if there exist two indices i and j such that :

10 min read
Remove Element

Remove Element

Given an integer array nums and an integer val, remove all occurrences of val in nums in-place. The relative order of the...

15 min read
Merge Sorted Array

Merge Sorted Array

You are given two integer arrays nums1 and nums2, sorted in non-decreasing order, and two integers m and n, representing the number...

12 min read
Duplicate Zeros

Duplicate Zeros

Given a fixed-length integer array arr, duplicate each occurrence of zero, shifting the remaining elements to...

14 min read
Remove Duplicates from Sorted Array

Remove Duplicates from Sorted Array

Given an integer array nums sorted in non-decreasing order, remove the duplicates in-place such that each unique element appears only once....

13 min read
Candy Crush

Candy Crush

This question is about implementing a basic elimination algorithm for Candy Crush.

24 min read

In "Matrix"

Candy Crush

Candy Crush

This question is about implementing a basic elimination algorithm for Candy Crush.

24 min read

In "Simulation"

Candy Crush

Candy Crush

This question is about implementing a basic elimination algorithm for Candy Crush.

24 min read

In "HashTable"

Subarray Sum Equals K

Subarray Sum Equals K

Given an array of integers nums and an integer k, return the total number of subarrays whose sum equals...

14 min read
First Unique Character in a String

First Unique Character in a String

Given a string s,  find the first non-repeating character in it and return its index ....

16 min read

In "String"

String Compression

String Compression

Given an array of characters chars, compress it using the following algorithm:

17 min read
First Unique Character in a String

First Unique Character in a String

Given a string s,  find the first non-repeating character in it and return its index ....

16 min read

In "Queue"

First Unique Character in a String

First Unique Character in a String

Given a string s,  find the first non-repeating character in it and return its index ....

16 min read

In "Counting"

First Unique Character in a String

First Unique Character in a String

Given a string s,  find the first non-repeating character in it and return its index ....

16 min read

In "Sorting"

Squares of a Sorted Array

Squares of a Sorted Array

Given an integer array nums sorted in non-decreasing order, return an array of the squares of each number sorted in non-decreasing order....

12 min read
Check If N and Its Double Exist

Check If N and Its Double Exist

Given an array arr of integers, check if there exist two indices i and j such that :

10 min read
Merge Sorted Array

Merge Sorted Array

You are given two integer arrays nums1 and nums2, sorted in non-decreasing order, and two integers m and n, representing the number...

12 min read

In "Hashing"

Check If N and Its Double Exist

Check If N and Its Double Exist

Given an array arr of integers, check if there exist two indices i and j such that :

10 min read

In "PrefixSum"

Subarray Sum Equals K

Subarray Sum Equals K

Given an array of integers nums and an integer k, return the total number of subarrays whose sum equals...

14 min read

In "Tree"

Validate Binary Search Tree

Validate Binary Search Tree

Given the root of a binary tree, determine if it is a valid binary search tree (BST).

23 min read

In "BinaryTree"

Validate Binary Search Tree

Validate Binary Search Tree

Given the root of a binary tree, determine if it is a valid binary search tree (BST).

23 min read

In "BinarySearchTree"

Validate Binary Search Tree

Validate Binary Search Tree

Given the root of a binary tree, determine if it is a valid binary search tree (BST).

23 min read