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

×

DISHOWN July challenge (Disjoint-set) doubt

Hii I wrote two solutions one in c++ and one in JAVA Of DISHOWN All variable names are same ,function names are same ,everything is same

Got AC in C++ :) but in JAVA getting NZEC error :( :(. PLz can anyone tell me Why is it so even though both programs are exactly same

C++ solution : http://www.codechef.com/viewsolution/4335936

JAVA solution : http://www.codechef.com/viewsolution/4335995

asked 16 Jul '14, 17:08

n1n1_4's gravatar image

5★n1n1_4
844622
accept rate: 50%

edited 01 Aug '14, 14:20

admin's gravatar image

0★admin ♦♦
19.8k350498541


@n1n1_4 : Are you using recursion in your logic . In Java stack space will exhaust soon and throw "StackOverFlow exception" .

link

answered 16 Jul '14, 17:09

vineetpaliwal's gravatar image

6★vineetpaliwal
12.4k47107171
accept rate: 12%

@vineetpaliwal thanks i didn't know this. I was using recursion in java. I appreciate you help. :):):)

(16 Jul '14, 18:23) n1n1_45★
link

answered 16 Jul '14, 20:12

vineetpaliwal's gravatar image

6★vineetpaliwal
12.4k47107171
accept rate: 12%

This answer 3 @n1n1_4 : Are you using recursion in your logic . In Java stack space will exhaust soon and throw "StackOverFlow exception" .

should be in the community wiki. Thanks Vineetpaliwal, you saved my day

link

answered 14 Mar '15, 21:40

njr07121977's gravatar image

2★njr07121977
211
accept rate: 0%

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,911
×1,302
×66
×20

question asked: 16 Jul '14, 17:08

question was seen: 1,852 times

last updated: 14 Mar '15, 21:40