Related Coding / DSA
Maximum Sum Contiguous Subarray
Given a non-empty list of integers, find the maximum sum of any contiguous non-empty subarray.
Given a dictionary of words, build a structure that can efficiently count how many dictionary words start with a given prefix.
You are given a dictionary of words. Build a structure supporting countWithPrefix(prefix), which returns how many dictionary words start with the given prefix. Multiple prefix queries will be made against the same dictionary.
Work in the provided coding workspace while explaining your decisions to the live interviewer. Validation may use inline tests, examples, comments, or a verbal walkthrough.
Practice this problem in the live coding workspace while the interviewer probes your clarification, implementation, trade-offs, and validation.
Continue to DashboardHidden because they name the technique, which a real interviewer would not tell you.
Continue preparing
Related Coding / DSA
Given a non-empty list of integers, find the maximum sum of any contiguous non-empty subarray.
Related Coding / DSA
Given a set of positive integers, determine whether it can be partitioned into two groups with equal sums.
Related Coding / DSA
Given a list of lowercase words, group together the words that share the exact same multiset of letters.
Related Coding / DSA
Given a 2D grid of land and water cells, count the number of distinct connected land regions, where cells are connected horizontally or vertically.