Best Time to Buy and Sell Stock
Given an array of stock prices for consecutive days, find the maximum profit that can be achieved by buying on one day and selling on a…
Given an array of stock prices for consecutive days, find the maximum profit that can be achieved by buying on one day and selling on a…
Given a connected undirected graph represented by a reference to one of its nodes, create a deep copy of the entire graph.
Given an array of integers, determine if any number appears more than once.
Given a sorted list of non-overlapping intervals and a new interval, insert the new interval into the list while maintaining the sorted…
Given a list of 2D points and an integer k, find the k points that are closest to the origin (0,0).
Given a string of digits from 2-9, generate all possible letter combinations that the digits can represent, based on a standard phone…
Given an array of strings, find the longest common prefix among them.
Given a string composed of lowercase and uppercase English letters, determine the length of the longest possible palindrome that can be…
Given a string, find the length of the longest substring that does not contain any repeating characters.
Given an array of integers, find the element that appears more than half the time.
Given an array of integers, find the contiguous subarray with the largest sum and return its sum.
Given two strings, `ransomNote` and `magazine`, determine if the `ransomNote` can be constructed using the letters from `magazine`.
Determine if one string is an anagram of another.