Tag: STL

Maximum Length Snake Sequence

Given a square matrix, print maximum length snake sequence in it. A Snake sequence is defined as a sequence of numbers where each new number, which can only be located to the right or down of the current number, is either plus or minus one.

Quickselect Algorithm

Quickselect is a selection algorithm to find the kth smallest element in an unordered list. It is closely related to the quicksort sorting algorithm.