# A Common-Sense Guide to Data Structures and Algorithms, Second Edition: Verbose condition in greatest product (page 469)

**URL:** <https://forum.devtalk.com/t/a-common-sense-guide-to-data-structures-and-algorithms-second-edition-verbose-condition-in-greatest-product-page-469/9138>\
**Category:** PragProg Customers\
**Tags:** book-a-common-sense-guide-to-data-structures-and-algorithms-second-edition, question\
**Created:** [27 April 2021 23:03 UTC](https://forum.devtalk.com/t/a-common-sense-guide-to-data-structures-and-algorithms-second-edition-verbose-condition-in-greatest-product-page-469/9138 "2021-04-27T23:03:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![frasette](https://forum.devtalk.com/letter_avatar_proxy/v4/letter/f/958977/32.png) [@frasette](https://forum.devtalk.com/u/frasette)\
**Post date:** [27 April 2021 23:03 UTC](https://forum.devtalk.com/t/a-common-sense-guide-to-data-structures-and-algorithms-second-edition-verbose-condition-in-greatest-product-page-469/9138/1 "2021-04-27T23:03:30Z")

</div>

A Common-Sense Guide to Data Structures and Algorithms, Second Edition by Jay Wengrow @jaywengrow

Hi,

in the book version, in the page 469 there is the following if condition:

```auto
if number <= lowest_number

elsif number > lowest_number && 
      number < second_to_lowest_number

end

```

I think that in the else condition, the one on the left of the AND operator is verbose, because if the number is \< of second\_to\_last\_number, is becuse is not \<= of lowest\_number. So there is not ovelapping cases. Therefore:

```auto
if number <= lowest_number 

elsif number < second_to_lowest_number 

end

```

Please, con you tell me, what do you think? Manu thanks!

---

<div class="post-metadata">

**Author:** ![jaywengrow](https://forum.devtalk.com/user_avatar/forum.devtalk.com/jaywengrow/32/527_2.png) [@jaywengrow](https://forum.devtalk.com/u/jaywengrow)\
**Post date:** [27 July 2021 20:59 UTC](https://forum.devtalk.com/t/a-common-sense-guide-to-data-structures-and-algorithms-second-edition-verbose-condition-in-greatest-product-page-469/9138/2 "2021-07-27T20:59:59Z")

</div>

You have a good point! I think you are correct and that extra clause isn’t necessary in the end.

Thanks!  
Jay
