Data Structures & Algorithms
100+ curated problems from top tech interviews
100+ curated problems from top tech interviews
7 problems found
Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each inp...
Given an integer array nums, return true if any value appears at least twice in the array, and return false if every element is distinct....
Given two strings s and t, return true if t is an anagram of s, and false otherwise. An Anagram is a word or phrase formed by rearranging the letters ...
Given an array of strings strs, group the anagrams together. You can return the answer in any order....
Given an integer array nums and an integer k, return the k most frequent elements. You may return the answer in any order....
Given an integer array nums, return an array answer such that answer[i] is equal to the product of all the elements of nums except nums[i]. You must w...
Given an unsorted array of integers nums, return the length of the longest consecutive elements sequence. You must write an algorithm that runs in O(n...