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.
difference is your code produces many number of rows for same age.I don't know why? we have to produce only those rows which have minimum_need for each age
your code output:-
1303 496 6678 10
1038 496 4789 10
1130 494 9439 10
1315 492 4126 10
892 492 4345 10
9 491 7345 10
1221 483 7985 10
858 483 4352 10
1164 481 9831 10
1288 464 4952 10
861 462 8302 10
412 455 5625 10
996 451 8884 10
327 451 9792 10
1608 446 8351 10
1376 443 1735 10
1330 430 5182 10
1633 425 2206 10
920 425 6008 10
1197 419 3468 10
441 416 2508 10
968 416 6344 10
1134 413 7960 10
981 413 2566 10
424 413 997 10
1298 397 3810 10
635 395 4376 10
1125 395 2299 10
333 393 926 10
1911 393 5467 10
363 388 4477 10
...
correct output:-
1038 496 4789 10
1130 494 9439 10
1315 492 4126 10
9 491 7345 10
858 483 4352 10
1164 481 9831 10
1288 464 4952 10
861 462 8302 10
412 455 5625 10
996 451 8884 10
1608 446 8351 10
1376 443 1735 10
1330 430 5182 10
1633 425 2206 10
1197 419 3468 10
441 416 2508 10
424 413 997 10
1298 397 3810 10
1125 395 2299 10
333 393 926 10
363 388 4477 10
....
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Ollivander's Inventory
You are viewing a single comment's thread. Return to all comments →