Ashik53's blog

By Ashik53, history, 7 years ago, In English

for below input,but my dijkstra code shows wrong output for this input.

5 6

1 2 1

2 3 1

3 4 7

1 5 1

5 4 3

1 4 1

Enter source and destination

1 3

output = 101, should be 2

I found that my code isn't adding the new neighbor nodes in if block of dijkstra function sometimes.So, that's why some nodes are not updated. Why does this happen? I tried multiples times to find out the reason but failed.

My code — https://ideone.com/J7JNxy

Full text and comments »

  • Vote: I like it
  • -21
  • Vote: I do not like it

By Ashik53, history, 8 years ago, In English

Hello .. I wanna be good at data structure and graph.. Before switching on this topic , I need some advice from the experienced programmers... Please give me some guidelines about this topic.. How to be good at these topic step by step?

Full text and comments »

  • Vote: I like it
  • +6
  • Vote: I do not like it

By Ashik53, history, 9 years ago, In English

I tried with more than 100 inputs and my program gave right output...Yet I can not find any bug :) PLease give me some critical cases :( ... My code will look horrible ..sorry for that :(

my code — http://pastebin.com/cXfF9nXA

problem link — http://www.lightoj.com/volume_showproblem.php?problem=1396

Full text and comments »

  • Vote: I like it
  • +5
  • Vote: I do not like it