[Community Puzzle] Table of Contents

Coding Games and Programming Challenges to Code Better

Send your feedback or ask for help here!

Created by @burdanas,validated by @papyjo,@odaxav and @FredericLocquet.
If you have any issues, feel free to ping them.

All test cases seem to be working fine for me, except validator 02 Numbers. I’m sure I’m most likely making a small mistake, but I can’t see why, since the validator doesn’t show me the input and expected output. Maybe there could be an extra test case that’s similar to 02 Numbers?

Does your code works if the title (or a subtitle) number is 10 ? It happens only in validator 2.

2 Likes

You can try that :

20
15
A 1
B 2
C 3
D 4
E 5
F 6
G 7
H 8
I 9
J 10
K 11
L 12
M 13
N 14
O 15
2 Likes

I think indeed I have a silly issue with the number 10 :slight_smile: at least the test case you provided fails my code, so I can continue debugging :smiley: Thank you!

as Remi suggested, be prepared to handle cases where the chapter “index” and the page number becomes multiple digits
i.e.
1 Title1…4
… some filler …
20 Title2…10 – make sure you handle this case by correspondingly reducing the number of “.” characters