[Solved] Hackerrank Code not working [closed]
There are several things wrong with your program. First the insert method doesn’t do what you seem to think it does. list.insert(i, x) Insert an item at a given position. The first argument is the index of the element before which to insert, so a.insert(0, x) inserts at the front of the list, and a.insert(len(a), … Read more