Checkpoint: Three Contracts
Challenge on lesson: Checkpoint โ Methods Under Contract
CHALLENGE
Difficulty: intermediate+25 XP
Implement the three functions described in the checkpoint:
``csharp
static bool TrySplitRatio(string input, out int a, out int b);
static int SwapWithCount(ref int x, ref int y); /* returns swap count so far */
static long FlattenDepth(object[][] groups, int depth);
``
Press Submit to check your solution.
Back to lesson: Checkpoint โ Methods Under Contract