← All problemsSign in

Slice the list

Given a list $L$ of numbers and its $length$, your task is to read these numbers into an array or a list. Assuming the index starts from 0, use the slice operations to do the following operations: - print list in reverse order - for every *third* number starting with index 0, add 3 to it and print them - for every *fifth* number starting with index 0, subtract 7 from it and print - add all the nu

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start