Choice 2.the algorithm constantly checks to see if the value in the position before is greater than the value in the current position. if there is even one instance, it will return false and stop looping.using an if-statement without } and { means that the if-statement true condition only applies for the next lineconsider
. the condition
checks if previous position is greater than or equal to current position. if it is, it will make method return false. for that example, it won't.consider
, it would return falseconsider
. it would return false