You are not logged in. Please login at to post your questions!


Not getting AC in video game problem, help me.

I have been trying to solve this question but my solution is failing one test case and I am not able to figure out what is wrong with my solution.

Here is link to my solution, please help me in figuring out what is wrong with my solution.

asked 26 Jan '18, 19:58

arpit728's gravatar image

accept rate: 10%

Check your case 2 " if (cranePosition < commands.length - 1) " rather than "command.length-1" shouldnt it be a.length-1 .


answered 27 Jan '18, 02:30

phantomhive's gravatar image

accept rate: 0%

edited 27 Jan '18, 02:31

Thanks @phantomhive

Such a silly mistake I did.

(27 Jan '18, 10:05) arpit7281★
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:


question asked: 26 Jan '18, 19:58

question was seen: 233 times

last updated: 27 Jan '18, 10:05