how to do it without passing count as reference because in java we can’t do it
How to implement it without passing count as reference
@unforgettable_pawan
There is no straight forward way for this
You need hacks
Some are given here https://www.educative.io/edpresso/how-to-pass-by-reference-in-java
An easy one will be use some global variable
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.