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.
  • Practice
  • Certification
  • Compete
  • Career Fair
  • Hiring developers?
  1. Practice
  2. Algorithms
  3. Bit Manipulation
  4. What's Next?
  5. Discussions

What's Next?

Problem
Submissions
Leaderboard
Discussions
Editorial

Sort 35 Discussions, By:

votes

Please Login in order to post a comment

  • radekr_ 5 years ago+ 0 comments

    Oh man, I've spend few hours on this problem even though I had idea how to solve it after 10-15 minutes...

    Those corner cases killed me... :)

    16|
    Permalink
  • avardar 3 years ago+ 0 comments

    [OPINION] Some of the problems on Hackerrank are not for cracking the coding interview or teaching you a cool new way of thinking but rather for testing your patience and corner case engineering abilities. This is one of those problems. The return of investment in that kind of problems is very low. At least the author could make the special cases in inputs more obvious by making them concise to save us some debugging time.

    7|
    Permalink
  • zhoujie 4 years ago+ 0 comments

    Is all the cases right? If the num is 110, then the next number should be 1001.

    3|
    Permalink
  • phildonnia 5 years ago+ 0 comments

    In TC#8, the case is
    2
    2 1

    Which represents 110. The next number with the same set-count is 1001, which is represented as
    1 2 1.

    But the expected output is 1 3 1.

    Am I understanding this correctly?

    3|
    Permalink
  • semisonic 11 months ago+ 0 comments

    Excuse me, but how am I gonna handle input values up to 10^18 if I'm given a vector of ints as a function input? I'll have to modify the code outside the target function to replace all the ints with **int64_t**s. A ridiculous way to define a problem.

    2|
    Permalink
Load more conversations

Need Help?


View editorial
View top submissions
  • Contest Calendar
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy
  • Request a Feature