Showing 3 of 5 questions
You're given daily stock prices. Find the maximum profit you can make by buying and selling the stock once. You must buy before you sell.
#1. Best Time to Buy and Sell Stock
Determine if every character in a given string appears the same number of times. Return true if they do, false otherwise.
#2. Check if All Characters Have Equal Number of Occurrences
Find all starting indices of substrings in a string `s` that are anagrams of a given string `p`. An anagram has the same letters, rearranged.
#3. Find All Anagrams in a String