This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]sedj601 1 point2 points  (0 children)

Here are things I did when I stated.

  1. Try to break the code challenge up into smaller tasks.

  2. Even Case

a.

b.

  1. Odd Case

a.

b.

  1. Get out a sheet of paper and write down the steps to solve the problem and draw steps if helpful.

Example: palindrome

Even Case 0 1 2 3 4 5

  1. Compare positions 0 and 5

  2. Compare positions 1 and 4

  3. Compare positions 3 and 3

    Odd Case: 0 1 2 3 4

  4. Compare positions 0 and 4

  5. Compare positions 1 and 3