Click here to Skip to main content
15,916,379 members
Home / Discussions / Algorithms
   

Algorithms

 
QuestionRe: Dijkstra Pin
Eddy Vluggen2-Jan-23 11:59
professionalEddy Vluggen2-Jan-23 11:59 
AnswerRe: Dijkstra Pin
Graeme_Grant2-Jan-23 12:16
mvaGraeme_Grant2-Jan-23 12:16 
NewsRe: Dijkstra Pin
Eddy Vluggen2-Jan-23 12:27
professionalEddy Vluggen2-Jan-23 12:27 
GeneralRe: Dijkstra Pin
Calin Negru3-Jan-23 0:19
Calin Negru3-Jan-23 0:19 
GeneralRe: Dijkstra Pin
Eddy Vluggen3-Jan-23 0:25
professionalEddy Vluggen3-Jan-23 0:25 
GeneralRe: Dijkstra Pin
Calin Negru3-Jan-23 3:37
Calin Negru3-Jan-23 3:37 
GeneralRe: Dijkstra Pin
Calin Negru14-Jan-23 8:47
Calin Negru14-Jan-23 8:47 
GeneralRe: Dijkstra Pin
Eddy Vluggen16-Jan-23 23:55
professionalEddy Vluggen16-Jan-23 23:55 
Calin Negru wrote:
Ok, that was unfriendly on my behalf.
Did you consider the option that you were right?

If something is important to you, it's a passion, right? So, we speak with passion, and wars break out over the placement of a newline in code. I'm not apologizing, and you have nothing to apologize for either.

Calin Negru wrote:
However you have to admit your approach isn’t exactly teachers style.
I'd panic if someone told me I had to stand in front of a classroom again Laugh | :laugh:

..but seriously, write it yourself and start simpeler than Dijkstra. The easiest path-finding algo is to simply "try all nodes and measure them". That will cost a lot of memory and computing power, but it would work and the result is the optimal path. Go for it; every stop is a node, and we weigh distance.

Next step is to try to optimize that. I'm pretty sure you can eliminate all those paths that go the wrong way for a certain distance. Then write Dijkstra's algo.

Once you understand the optimization, you understand it's implications and limitations. So, asking that question means either you or the teacher is trying a shortcut. Maybe the teacher is right.

..but this approach works every time. Anything else is parroting a textbook IMO.
Bastard Programmer from Hell Suspicious | :suss:
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.

General[edit]Re: Dijkstra Pin
Calin Negru20-Jan-23 6:41
Calin Negru20-Jan-23 6:41 
GeneralRe: Dijkstra Pin
Eddy Vluggen20-Jan-23 7:09
professionalEddy Vluggen20-Jan-23 7:09 
GeneralRe: Dijkstra Pin
Calin Negru20-Jan-23 8:16
Calin Negru20-Jan-23 8:16 
GeneralRe: [edit]Re: Dijkstra Pin
jschell22-Jan-23 8:01
jschell22-Jan-23 8:01 
GeneralRe: [edit]Re: Dijkstra Pin
Richard MacCutchan22-Jan-23 22:51
mveRichard MacCutchan22-Jan-23 22:51 
GeneralRe: [edit]Re: Dijkstra Pin
Eddy Vluggen23-Jan-23 0:32
professionalEddy Vluggen23-Jan-23 0:32 
GeneralRe: [edit]Re: Dijkstra Pin
Calin Negru23-Jan-23 1:22
Calin Negru23-Jan-23 1:22 
GeneralRe: Dijkstra Pin
jschell22-Jan-23 8:03
jschell22-Jan-23 8:03 
GeneralRe: Dijkstra Pin
Calin Negru23-Jan-23 2:52
Calin Negru23-Jan-23 2:52 
GeneralRe: Dijkstra Pin
jschell24-Jan-23 10:20
jschell24-Jan-23 10:20 
GeneralRe: Dijkstra Pin
Calin Negru25-Jan-23 10:29
Calin Negru25-Jan-23 10:29 
QuestionAide pour un programme langage c Pin
Anaky47-Oct-22 11:51
Anaky47-Oct-22 11:51 
AnswerRe: Aide pour un programme langage c Pin
OriginalGriff7-Oct-22 11:52
mveOriginalGriff7-Oct-22 11:52 
AnswerRe: Aide pour un programme langage c Pin
Dave Kreskowiak7-Oct-22 12:53
mveDave Kreskowiak7-Oct-22 12:53 
AnswerRe: Aide pour un programme langage c Pin
Gerry Schmitz11-Nov-22 6:49
mveGerry Schmitz11-Nov-22 6:49 
AnswerRe: Aide pour un programme langage c Pin
Eddy Vluggen11-Nov-22 13:34
professionalEddy Vluggen11-Nov-22 13:34 
GeneralRe: Aide pour un programme langage c Pin
trønderen12-Nov-22 7:44
trønderen12-Nov-22 7:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.