Why output contains only 4 elements, while given input was 5 elements?
Output of the given example
hello @ankitkaushal
bhaiya started the for loop from 1, while taking input so only 4 elements are considered instead of 5. 3 is the last element so it is ignored
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.