Related Coding / DSA
Prefix Lookup Service for a Word Dictionary
Given a dictionary of words, build a structure that can efficiently count how many dictionary words start with a given prefix.
Given a number of courses and a list of prerequisite pairs, determine a valid order to complete all courses, or report that no valid order exists.
You are given a number of courses labeled 0 to n-1 and a list of prerequisite pairs [course, prereq] meaning prereq must be completed before course. Return a valid order to complete all courses, or an empty list if it is impossible.
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 dictionary of words, build a structure that can efficiently count how many dictionary words start with a given prefix.
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.