Hello sir,
Can you please help me with the code of combination of r elements in an array.
Combination of r elements in an array
Arr=[1,2,3,4,5]
R=3
Output=[1,2,3],[1,2,4],[1,2,5],[1,3,4],[1,3,5],[1,4,5],[2,3,4]…
Hey @anmol_garg123
Refer to this pic for what we are doing along with this code : https://ide.codingblocks.com/s/348477
If u don’t understand something ,feel free to ask.
Can you explain the approach?
I was clueless how to solve this problem. It would be great if you can explain the ideation part of it.
Thankyou sir!
I am unable to write code🙈
So sorry.
I already sent you the code refer to that
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.