Hello everybody ,
Yesterday night i participated in hacker rank contest and i solved one problem , VROOK
My approach was something like this .
- Find a diff[n] ;
- where diff[i] = abs(p1[i]-p2[i]);
- Count the Odd number in diff array .
- if(count%2) {
- player 2 will win.
- }
- else {
- player 1 will win.
- }
I got Wrong answer , Please anybody who took participate in Last night Hackerrank contest please suggest me your approach .
You can view my solution here
Happy Coding!!!