Results 21 to 25 of 25
Thread: challenging problems
- 10-28-2008, 06:34 PM #21
- 10-28-2008, 07:07 PM #22
You need to optimize the logic for the for(j) loop. Using -Xprof with your code shows that 97% of the execution is spent in that loop.
The brute force method doesn't work on a normal computer.
- 10-29-2008, 06:22 AM #23
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Basically try to use an optimize algorithm to do the task.
Just a hint. Normally in such cases, if I cannot/difficult to optimize an algorithm, what I have done is check the result in different stages and work on the quickest result I got. That's actually not a good way, not a much safer way, but in lots of cases I found that is reliable.
- 10-29-2008, 05:07 PM #24
ok thanks for this
- 10-30-2008, 05:41 AM #25
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
So do you have any solution found for this?
Similar Threads
-
Is it possible to make this in Java? Challenging question.
By matt_well in forum New To JavaReplies: 24Last Post: 07-29-2008, 04:04 PM -
Problems in JSP : Need help
By raj4u in forum JavaServer Pages (JSP) and JSTLReplies: 1Last Post: 02-07-2008, 10:06 AM -
GUI problems.
By saytri in forum New To JavaReplies: 1Last Post: 12-16-2007, 10:27 PM -
many to many problems
By cecily in forum JDBCReplies: 1Last Post: 08-02-2007, 05:51 PM -
problems with JPA
By Ed in forum New To JavaReplies: 2Last Post: 07-04-2007, 05:34 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks