Search found 3 matches

by amitc
Sat Oct 26, 2002 7:10 pm
Forum: Other words
Topic: help with optimal cut/paste algo
Replies: 0
Views: 1435

help with optimal cut/paste algo

The problem states that given a set of numbers, find the minimum number of cut/paste operations required to get the numbers into a sorted sequence. The cut operation can involve one or more consecutive numbers.

For eg.
given the sequence
1)
...2 4 1 5 3 6
we cut 4 and paste it before 5 to get ...
by amitc
Thu Sep 19, 2002 7:23 am
Forum: Volume 103 (10300-10399)
Topic: 10354 - Avoiding Your Boss
Replies: 47
Views: 28616

thanks to all

i had completely forgotten about multiple shortest paths. After I realized the same, I modified my code into a djikstra's single source shortest path program with every node having a predecessor list. This got accepted by the judge.

On a side note, is there any way to recover all shortest paths ...
by amitc
Wed Sep 18, 2002 3:51 pm
Forum: Volume 103 (10300-10399)
Topic: 10354 - Avoiding Your Boss
Replies: 47
Views: 28616

10354 - Avoiding Your Boss

This problem looked easy and I attempted the following to solve it,

1) Found the shortest path of the boss home to office using all pair shortest path and then removed the shortest route (made the distance to these vertices as infinity) from the graph.
2) In the new map, tried to find the shortest ...

Go to advanced search