Showing 3 of 4 questions
Determine if a given string can be segmented into a space-separated sequence of words from a dictionary. You are given a string and a dictionary of words; can you break the string down using words from the dictionary?
#1. Word Break
Design and implement a Least Frequently Used (LFU) cache. The cache should efficiently store key-value pairs, evicting the least frequently used items when it reaches capacity.
#2. LFU Cache
Find the longest palindromic substring within a given string. A palindromic substring reads the same forwards and backward.
#3. Longest Palindromic Substring