This question evaluates combinatorial reasoning and algorithmic analysis by asking for the count of constrained buy/sell sequences, testing competence in counting under constraints and reasoning about sequence invariants.
You must perform exactly 2n unit trades starting with 0 shares and ending with 0 shares. Each trade is either a buy (+1 share) or a sell (−1 share), and your running position may never be negative at any point. Given n, how many distinct buy/sell sequences satisfy these constraints? Return the count for the given n and describe an efficient approach.