Showing 3 of 108 questions
Convert a given string into a zigzag pattern with a specified number of rows. Then read the characters row by row to return the converted string.
#1. Zigzag Conversion
Design a data structure that acts as a Least Recently Used (LRU) cache. Implement methods to get and put key-value pairs, evicting the least recently used entry when the cache is full.
#2. LRU Cache
Determine if a given word can be constructed from letters in a 2D board, where letters can be used horizontally or vertically. Each letter can only be used once in the word.
#3. Word Search