Question:-https://leetcode.com/problems/minimum-absolute-difference/
Code link:-https://ide.codingblocks.com/s/373047
I am getting an error. I don’t understand how to push elements in vector of vectors.
Question:-https://leetcode.com/problems/minimum-absolute-difference/
Code link:-https://ide.codingblocks.com/s/373047
I am getting an error. I don’t understand how to push elements in vector of vectors.
hello @div_yanshu07
u can push a vector inside vector like this.
v.push_back( another_vector_name);
here u want to insert only two numbers as vector inside another vector.
so u can use this as well.
v.push_back({num1,num2} ) ;
I have already tried that but it doesn’t work. It gives error. You can try at your end too.
check now(removed syntax error)->
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.