# How many followed the rules?

**Computer Science**Level 2

However, some mischievous kids did not follow their teacher's order and lined up in a random order.

Given a list of integers, which are the heights of the kids in the order that they lined up, find the length of the longest queue that follows the teacher's order.

**Example:**

The queue = \(\{134, 154, 127, 142, 145, 152, 133\}\)

The answer is \(4\), as the longest queue that satisfies the instruction is \({127, 142, 145, 152}\)

**Problem:**

There are \(36\) students.

The queue

**Details and Assumptions:**

When two kids with the same height stand next to each other, they are considered as following the rule.

**Your answer seems reasonable.**Find out if you're right!

**That seems reasonable.**Find out if you're right!

Already have an account? Log in here.