Arrays

Arrays

Easy

30 minutes

Monotonic Arrays

A monotonic array is an array whose elements, from left to right, are entirely non-increasing, or entirely non-decreasing. Return true if the given ar...

Easy

30 minutes

Sorted Squared Array

Given an array of integers A sorted in non-decreasing order, return an array of the squares of each number, also in sorted non-decreasing order.

Easy

30 minutes

Three Number Sum

Given an array of integers, find three integers in the array that sum to a specific target number.

Medium

30 minutes

Spiral Traversal

Given a 2D matrix of numbers, return a spiral traversal of the matrix in the clockwise direction.

Easy

30 minutes

Product Sum

Given an array (that can have nested arrays) - return the sum of all the numbers in the array. If nested array is encountered, recursively add the num...

Easy

30 minutes

Non Repeating First Character

Given a string of characters, return the index of the first non-repeating character.

Easy

30 minutes

Move Element

Given an array of integers and a target value, move all instances of that target value to the end end of the array. The order of the resulting array d...

Easy

30 minutes

Binary Search

Given an array of sorted integers in ascending order, and a target integer, write a function to search target in nums array. If target exists, return ...

Medium

30 minutes

Maximum Subset Sum With No Adjacent

Given an array of POSITIVE INTEGERS, find the greatest sum that can be generated without adding 2 numbers positioned next to each other.

Easy

30 minutes

Nth Fibonacci

Given an integer n, return the nth Fibonacci number. In mathematics, the Fibonacci numbers form a sequence called the Fibonacci sequence - In which ea...

Easy

30 minutes

Smallest Difference

Given two arrays of integers, find the pair of values (one value in each array) with the smallest (non-negative) difference.

Medium

30 minutes

Minimum Number Of Coins To Make Change

Given an array of coins or denominations and a target sum, calculate the minimum number of coins required to match the total. Note that the coins arra...