Interview Round DistributionClick any round below to filter
Topics:
Showing 20 of 100 results for ChewyPage 1 of 5
Coding
48
Encode and Decode Strings
Encode a list of strings into a single string and decode it back.
Input: strs = ["","hello",""]
Output: ["","hello",""]
Explanation: Prepends chunk lengths and a delimiter (e.g., "0#5#hello0#") to safely encode and perfectly restore empty strings.
Calculate how much rainwater can be trapped between elevation bars.
Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it can trap after raining.
Input: height = [4,2,0,3,2,5]
Output: 9
Explanation: Water is trapped between the boundaries of 4 and 5. The trapped volumes…
Search for a Word in a 2D Board
Search for a word in a 2D board of characters.
Input: board = [["C","A","A"],["A","A","A"],["B","C","D"]], word = "AAB"
Output: TRUE
Explanation: DFS traverses adjacent matching letters perfectly, finding "AAB" without improperly revisiting any cells.
Implement String Compression
Implement string compression.
Input: chars = ["a","b","b","b","b","b","b","b","b","b","b","b","b"]
Output: ["a","b","1","2"]
Explanation: The letter 'a' appears once (so no number is appended), and 'b' appears 12 times, modifying the array in place to length 4.