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


NZEC error for FIRESC problem. Help needed!

This is the link to my code ==>>

I have used vector array to make adjacency list and run DFS on it without Stack implementation, with the help of a parent array. Still I cant why is it throwing NZEC error. Out of Memory flow is not there because I have tested it on the boundary condition.

asked 05 Dec '15, 03:24

abhiroj786's gravatar image

accept rate: 22%

edited 05 Dec '15, 03:55

That recursion seems really deep. Are you sure DFS() won't overflow some java limit?

You should prefer iteration where possible anyway...

Try your own (very long and evil) input. If you get really desperate, you could try masking exceptions on parts of your program until the system gives WA instead of NZEC.

PS: 1340 MB used RAM sure looks alarming


answered 07 Dec '15, 02:53

kr0oze's gravatar image

accept rate: 41%

edited 07 Dec '15, 03:04

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: 05 Dec '15, 03:24

question was seen: 612 times

last updated: 07 Dec '15, 03:04