14Word search: does a word exist as a path of adjacent cells in a letter grid?▼mediumMetaPalantirxAI1 replies○ sign inThe third member of the grid trilogy, and the one that tests backtracking discipline: marking, unmarking, and the early-exit pruning that turns a timeout into a pass.Open full answer →
87Valid parentheses, then generate all valid combinations▼mediumMetaAmazonMicrosoft2 replies◆ premiumA two-part screen that looks like a warm-up and isn't. Part one is the classic stack validator with three bracket types; part two flips to generating every valid string of n pairs, and the Catalan count is the detail that catches people off guard.Open full answer →