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. Sorting
  4. Insertion Sort - Part 1
  5. Discussions

Insertion Sort - Part 1

Problem
Submissions
Leaderboard
Discussions

Sort 761 Discussions, By:

votes

Please Login in order to post a comment

  • ilmash
    7 years ago+ 7 comments

    by far worst problem in terms of requirements. seriously, it's so counterintuitive to do it 'the wrong way' instead of just implementing plain insert sort with printout each time values are swapped

    254|
    Permalink
    View more Comments..
  • k_kajdanski
    6 years ago+ 2 comments

    solving the problem - 5 minutes

    printing to output the way author wanted - 55 minutes

    132|
    Permalink
  • crackerplace
    7 years ago+ 26 comments

    The test case 2 is failing.Not sure what's the issue.Below is the output.Did anyone face the same issue.

    2 3 4 5 6 7 8 9 10 10

    2 3 4 5 6 7 8 9 9 10

    2 3 4 5 6 7 8 8 9 10

    2 3 4 5 6 7 7 8 9 10

    2 3 4 5 6 6 7 8 9 10

    2 3 4 5 5 6 7 8 9 10

    2 3 4 4 5 6 7 8 9 10

    2 3 3 4 5 6 7 8 9 10

    2 2 3 4 5 6 7 8 9 10

    1 2 3 4 5 6 7 8 9 10

    47|
    Permalink
    View more Comments..
  • alexermashev
    6 years ago+ 0 comments

    Stupid problem

    45|
    Permalink
  • shubham_sharma14
    7 years ago+ 4 comments

    perhaps this problem is tough for those who know insertion sort !!!!

    ;p

    37|
    Permalink
    View more Comments..
Load more conversations

Need Help?


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