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


[closed] MAXCOUNT WA

For the problem MAXCOUNT, the code below gives Wrong answer. Kindly explain the error.

asked 31 Mar '14, 15:22

sandy999's gravatar image

accept rate: 10%

closed 18 Jan '15, 12:55

The question has been closed for the following reason "The question is answered, right answer was accepted" by sandy999 18 Jan '15, 12:55

The suggestion given by @asimali246 is absolutely correct. Check the link of the accepted solution below :

I have made the three changes to your solution 1st the array size to 10^5+1 , loop upto 10^5 and the last loop upto 10^5 as suggested by @asimali246 .


answered 31 Mar '14, 20:35

vermashubhang's gravatar image

accept rate: 23%

You have created an array(counter) of size 10000, you need to create it of 10000+1=10001 as the inputted number can be 10000 also. Also you need to run your loop till 10000 rather than less than 10000.


answered 31 Mar '14, 16:42

asimali246's gravatar image

accept rate: 40%

edited 31 Mar '14, 17:22

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: 31 Mar '14, 15:22

question was seen: 506 times

last updated: 18 Jan '15, 12:55