link to code is https://ide.codingblocks.com/s/122261
why in line 8 i have to write return along with bubble function
why cant i simply write bubble function ??? pls help
link to code is https://ide.codingblocks.com/s/122261
why in line 8 i have to write return along with bubble function
why cant i simply write bubble function ??? pls help
It is important to write return because if you don’t write it then when function return back in backtracking it also go down in the code and execute other case also.
Or you can write else condition in other part it Will also work