Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 39796

Hackerrank Hack 101 Aug 2013 Contest .

$
0
0

Hello everybody , Yesterday night i participated in hacker rank contest and i solved one problem , VROOK My approach was something like this .

  1. Find a diff[n] ;
  2. where diff[i] = abs(p1[i]-p2[i]);
  3. Count the Odd number in diff array .
  4. if(count%2) {
  5. player 2 will win.
  6. }
  7. else {
  8. player 1 will win.
  9. }

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!!!


Viewing all articles
Browse latest Browse all 39796

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>