由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - a question on finding longest path between two vertices
相关主题
请教一个算法请问一道google面试题
问一道数据结构题请教问题:gps和google maps背后的算法
问一道NP算法题问一个word ladder的题目
再问一道A家的题目LinkIn面经
狗家的OA题目一道, 求讨论G题求解迷津
问个精华区的面试题这道题就是用Dijkstra 吗?
请教一道面试题,判断迷宫有没有解share一个a公司的2nd phone
[算法] word ladder problem算法作业2
相关话题的讨论汇总
话题: path话题: longest话题: graph话题: finding话题: vertices
进入JobHunting版参与讨论
1 (共1页)
a*******n
发帖数: 64
1
Given the Dijkstra's algorithm (finding the shortest path) and a acylic
graph, how can we modify the graph to find the longest path?
Didn't think of any good answer to this one? Anyone has an idea?
S**I
发帖数: 15689
2
This is a NP-complete problem.

【在 a*******n 的大作中提到】
: Given the Dijkstra's algorithm (finding the shortest path) and a acylic
: graph, how can we modify the graph to find the longest path?
: Didn't think of any good answer to this one? Anyone has an idea?

f*****e
发帖数: 2992
3
不是,和求binary tree任意两点距离差不多。

【在 S**I 的大作中提到】
: This is a NP-complete problem.
S**I
发帖数: 15689
4
Didn't notice "acyclic";both longest path and shortest path on a directed
acyclic graph can be solved in linear time by using topological ordering.
Dijkstra's algorithm is not necessary.

【在 f*****e 的大作中提到】
: 不是,和求binary tree任意两点距离差不多。
a*******n
发帖数: 64
5
能展开说说吗?
这个问题主要不是怎么用topo sorting and DP去找longest path
而是问如果给你找到shortest path的算法,问怎么改graph去找longest

【在 f*****e 的大作中提到】
: 不是,和求binary tree任意两点距离差不多。
a*******n
发帖数: 64
6
Dijkastra's algorithm doesn't work on graph with neg weights

in
Run

【在 S**I 的大作中提到】
: Didn't notice "acyclic";both longest path and shortest path on a directed
: acyclic graph can be solved in linear time by using topological ordering.
: Dijkstra's algorithm is not necessary.

1 (共1页)
进入JobHunting版参与讨论
相关主题
算法作业2狗家的OA题目一道, 求讨论
问个g的面试题问个精华区的面试题
graph如何找最短路径?请教一道面试题,判断迷宫有没有解
Dijkstra 算法为什么优先populate当前最小dist的那个节点?[算法] word ladder problem
请教一个算法请问一道google面试题
问一道数据结构题请教问题:gps和google maps背后的算法
问一道NP算法题问一个word ladder的题目
再问一道A家的题目LinkIn面经
相关话题的讨论汇总
话题: path话题: longest话题: graph话题: finding话题: vertices