Skip to main content

13 docs tagged with "Hashing"

View all tags

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…

Clone Graph

Given a connected undirected graph represented by a reference to one of its nodes, create a deep copy of the entire graph.

Contains Duplicate

Given an array of integers, determine if any number appears more than once.

Insert Interval

Given a sorted list of non-overlapping intervals and a new interval, insert the new interval into the list while maintaining the sorted…

Longest Palindrome

Given a string composed of lowercase and uppercase English letters, determine the length of the longest possible palindrome that can be…

Majority Element

Given an array of integers, find the element that appears more than half the time.

Maximum Subarray

Given an array of integers, find the contiguous subarray with the largest sum and return its sum.

Ransom Note

Given two strings, `ransomNote` and `magazine`, determine if the `ransomNote` can be constructed using the letters from `magazine`.