[algogeeks] Help on modular arithmetic

2006-04-23 Thread Farhan
Can you guys tell me what will the answers of following operations: 1. -22 % 3 = ? 2. 22 % -3 = ? (This one I know actually, it will be 2, I know the calculation but do not know the explanation) 3. -22 % -3 = ? Thanks in advance. --~--~-~--~~~---~--~~ You receiv

[algogeeks] Re: Mountain Village

2006-04-22 Thread Farhan
Thank you very much Shalin and Wade. Your ideas are really nice. I will give them a try and give u feedback. wade, the timelimit was 10 seconds, my solution took 10.025 seconds. shalinmangar wrote: > The low input size constraints (max size of the graph is 40*40) suggest > that a brute force DFS

[algogeeks] Mountain Village

2006-04-20 Thread Farhan
g. Please help, I do not need any code, just idea/technique to enhance my skill. Thanks, Farhan Here is the problem: Mountain Village After a long summer's march through the rough terrain of northern America, the indian tribe had found a place where they hopefully would be left alone. The c