We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
  • HackerRank Home

    HackerRank

  • |
  • Prepare
  • Certify
  • Compete
  • Hiring developers?
  1. Prepare
  2. Algorithms
  3. Dynamic Programming
  4. Prime XOR
  5. Discussions

Prime XOR

Problem
Submissions
Leaderboard
Discussions
Editorial

Sort 45 Discussions, By:

recency

Please Login in order to post a comment

  • mineman1012221
    2 months ago+ 0 comments

    Here is the solution of Prime XOR Click Here

    0|
    Permalink
  • thecodingsoluti2
    5 months ago+ 0 comments

    Here is problem solution - https://programs.programmingoneonone.com/2021/07/hackerrank-prime-XOR-problem-solution.html

    0|
    Permalink
  • dinuka_ashan817
    5 months ago+ 1 comment

    what does mem[i][j] mean?

    0|
    Permalink
  • sergey4spam
    5 months ago+ 0 comments

    The decision in the editorial isn't quite right, is it?

    mem[flag^1][j^v[i-1]]*((a[v[i-1]]+1)/2))

    so it can be simplified as a*(b/2)

    In integer arithmetic, this gives us an incorrect result. 10*(3/2)=10 but it should be 10*3/2=15

    0|
    Permalink
  • dan_oak
    9 months ago+ 1 comment

    many Python solutions which are not fast enough but in PyPy they are

    because of this i wasted a whole day assuming my algorithm is not the right one

    1|
    Permalink
Load more conversations

Need Help?


View editorial
View top submissions
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy