zunayed_mahmood's blog

By zunayed_mahmood, history, 3 years ago, In English

N.B: This is my first question, so please excuse me if I've made any errors in the way I'm asking.

I was working on this problem. I have submitted 5  codes. submission 04 and submission 05 are my two most recent submissions. I also looked up some other codes, example. My question is, where is the flaw in my code? If you have any suggestions for me, please let me know...

Thanks in advance :)

  • Vote: I like it
  • -8
  • Vote: I do not like it

| Write comment?
»
3 years ago, # |
  Vote: I like it +3 Vote: I do not like it

You have to update the variable L in each iteration. your code updated.

»
3 years ago, # |
Rev. 2   Vote: I like it +3 Vote: I do not like it

your submission 4 will print wrong answer on 3 8 4 6 3 7 7 and your submission 5 will print wrong answer on 3 8 4 9 6 7 7 you have to update the value of l each time in your submission 4