Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 1643. Kth Smallest Instructions
Given counts of right moves (H) and down moves (V), return the k-th lexicographically smallest length-(row+column) string with those counts that reaches (row,column). The core challenge is to construct the string without enumerating all permutations by using combinatorics (n choose r) to count how many sequences start with H vs V and decide each next character accordingly.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.