Mark As Completed Discussion

Try this exercise. Could you figure out the right sequence for this list?

What's the order of successfully finding out if a string is a palindrome?

Press the below buttons in the order in which they should occur. Click on them again to un-select.

Options:

  • Open a while loop to perform while low is less than high
  • Continue until end of loop and return true
  • Define two variables: high and low, as 0 and (length of string - 1)
  • If `string[low]` does not equal `string[high]`, return false. Increment low, decrement high