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

×

Problem in solving hackerearth's balance brackets problem

I was solving balance brackets problems on hackerearth. I solved the problem but my solution is not passing one test case. This is link to my solution for the same problem.

Please tell me what is wrong with my code and tell me the correct approach for it.

asked 17 May, 09:19

arpit728's gravatar image

2★arpit728
651530
accept rate: 12%

edited 18 May, 11:37


@arpit728 the last test case judged my solution wrong as well, and I could not find a mistake so I opened an accepted solution from the submission list - link, which quite clearly fails on the test case I gave. So it is nothing but a faulty test case. I didn't go through your code but it gives the same answer as mine on the last test case, so we both may be wrong but that's unlikely :)

link

answered 20 May, 03:03

meooow's gravatar image

6★meooow
4.5k49
accept rate: 46%

@meooow

Thanks meoow, I was also suspecting the test case to be wrong but still I wasted lot of time on it.

(20 May, 19:26) arpit7282★

@meooow

Please tell me how did you become 6* programmer. My growth has frozen I am not getting how should I go ahead now. What problems should I solve?

(20 May, 20:04) arpit7282★

#Shakti_Billi to the rescue!

IDK how you are able to derive such stuff, i just looked at that test case input adn went like " :/ ......."

(20 May, 20:21) vijju1235★

I guess there must be an option in hackerearth in which you can check your output and correct output. Just see the test case for which your answer is wrong. All the Best :)

link

answered 17 May, 14:04

abhist's gravatar image

4★abhist
1915
accept rate: 0%

@abhist

I have already done that but still I couldn't figure out why I am not getting what's wrong with my code.

(17 May, 14:16) arpit7282★

@abhist help me out.

(19 May, 07:13) arpit7282★
toggle preview
Preview

Follow this question

By Email:

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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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:

×1,421
×387
×194
×6

question asked: 17 May, 09:19

question was seen: 428 times

last updated: 18 Aug, 13:23