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
  • Prepare
    NEW
  • Certify
  • Compete
  • Career Fair
  • Hiring developers?
  1. Prepare
  2. Algorithms
  3. Implementation
  4. Organizing Containers of Balls
  5. Discussions

Organizing Containers of Balls

Problem
Submissions
Leaderboard
Discussions
Editorial

    You are viewing a single comment's thread. Return to all comments →

  • parthg1412
    3 years ago+ 1 comment

    i think the website has made a mistake in giving answers to the test cases.

    my logic is:

    1. count the total no. of balls of type i.

    2. count the total no. of balls in container i.

    3. if these two values are equal for each i then it is possible otherwise impossible.

    shown below is an input of test case 1:

    4

    997612619 934920795 998879231 999926463

    960369681 997828120 999792735 979622676

    999013654 998634077 997988323 958769423

    997409523 999301350 940952923 993020546

    they have given the answer as possible which is clearly not the case

    8|
    Permalink
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy
  • Request a Feature