Compare a list of strings

FCC link

Given a list of arbitrarily many strings, implement a function for each of the following conditions:

  • test if they are all lexically equal
  • test if every string is lexically less than the one after it (i.e. whether the list is in strict ascending order)

Test

{{test}}

Console output