Try each problem on paper first. Stuck? Reveal one hint at a time, read the approach, then compare your code with the JS and PHP solutions.
Given an array of integers nums and an integer target, return the indices of the two numbers that add up to target. Assume exactly one solution exists, and…
Given a sorted (ascending) array of distinct integers nums and a target, return the index of target, or -1 if it is not present. Your solution must run in O(log…
Write a function that returns the reverse of a string. Try it without using a built-in reverse helper first. Example
A phrase is a palindrome if, after converting all letters to lowercase and removing every non-alphanumeric character, it reads the same forwards and…
Return a list of strings for the numbers 1 to n where: multiples of 3 become "Fizz", multiples of 5 become "Buzz", multiples of both 3 and 5 become…
Given two lowercase strings a and b, return true if b is an anagram of a (it uses exactly the same letters the same number of times), otherwise false. Example 1…
Given an array of integers, return a new array with duplicates removed, keeping the first occurrence of each value in its original order. Try it without a…
Given a string s containing only the characters (, ), {, }, [ and ], return true if: every opening bracket is closed by the same type of bracket, and brackets…