# A Common-Sense Guide to Data Structures and Algorithms, Second Edition: Dijkstra code syntax question (page 379)

**URL:** <https://forum.devtalk.com/t/a-common-sense-guide-to-data-structures-and-algorithms-second-edition-dijkstra-code-syntax-question-page-379/38570>\
**Category:** PragProg Customers\
**Tags:** book-a-common-sense-guide-to-data-structures-and-algorithms-second-edition, question\
**Created:** [31 January 2022 04:15 UTC](https://forum.devtalk.com/t/a-common-sense-guide-to-data-structures-and-algorithms-second-edition-dijkstra-code-syntax-question-page-379/38570 "2022-01-31T04:15:38Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![adamwoolhether](https://forum.devtalk.com/user_avatar/forum.devtalk.com/adamwoolhether/32/3877_2.png) [@adamwoolhether](https://forum.devtalk.com/u/adamwoolhether)\
**Post date:** [20 July 2022 07:33 UTC](https://forum.devtalk.com/t/a-common-sense-guide-to-data-structures-and-algorithms-second-edition-dijkstra-code-syntax-question-page-379/38570/2 "2022-07-20T07:33:50Z")

</div>

### @jaywengrow

This is confusing to me as well. As mentioned by OP, this array doesn’t store price information, so how can we use ruby’s `min` method here?

---

_[View the full topic](https://forum.devtalk.com/t/a-common-sense-guide-to-data-structures-and-algorithms-second-edition-dijkstra-code-syntax-question-page-379/38570)._
