Opening the reading…
Opening the reading…
DSA FUNDAMENTALS › STRING BASICS
This is a scratch drill — your code runs, nothing is graded or recorded. No test cases, no expected output, no verdict.
TASK
Scan the string "banana" once using ASCII-indexed first and last arrays. Set each first position only once, update each last position on every occurrence, then print the present characters in ASCII order as "a 1 5", "b 0 0", and "n 2 4".
OUTPUT
Samplea 1 5 b 0 0 n 2 4
What a finished answer prints, from the lesson. Nothing has run yet — press Run and this is replaced by your program’s own output.