I see that this is a straight forward LCS problem. Also I get the fact that as the numbers are unique we can use LIS after mapping the first sequence to the sequence 1,2.....n.
Competitive programming book (1st edition) claims that this is a straight forward LIS implementation. Is that so? So most ...
Search found 5 matches
- Thu Nov 21, 2013 3:58 am
- Forum: Volume 1 (100-199)
- Topic: 111 - History Grading
- Replies: 135
- Views: 37074
- Wed Nov 20, 2013 6:15 pm
- Forum: Volume 9 (900-999)
- Topic: 908 - Re-connecting Computer Sites
- Replies: 21
- Views: 13011
Re: 908-Re-connecting Computer Sites
No. I mean something like Kruskal's algorithm except that we start with the given old MST and the new edges alone as the edge set to be sorted and then.....
Oh. Every time an edge threatens a cycle creation, we would again have to check the entire cycle to find out the bottleneck. But as we are ...
Oh. Every time an edge threatens a cycle creation, we would again have to check the entire cycle to find out the bottleneck. But as we are ...
- Wed Nov 20, 2013 6:05 pm
- Forum: Volume 5 (500-599)
- Topic: 532 - Dungeon Master
- Replies: 39
- Views: 14552
Re: 532
Thanks. Ya, I get it.I saw paths and was naively led to Dijkstra's.
And this works only because of constant edge length right? As we cover all vertices of each depth before going farther from the source, we end up with the optimal path.
And this works only because of constant edge length right? As we cover all vertices of each depth before going farther from the source, we end up with the optimal path.
- Fri Nov 15, 2013 3:06 pm
- Forum: Volume 5 (500-599)
- Topic: 532 - Dungeon Master
- Replies: 39
- Views: 14552
Re: 532
Why not use Dijkistra?Though all edges are basically 1 or INF , still it should do the trick right?
- Fri Nov 15, 2013 2:11 pm
- Forum: Volume 9 (900-999)
- Topic: 908 - Re-connecting Computer Sites
- Replies: 21
- Views: 13011
Re: 908-Re-connecting Computer Sites
Can't we add the new edges to the old MST by removing cycles as they appear?Will this greedy approach work?