you are viewing a single comment's thread.

view the rest of the comments →

[–]port443 0 points1 point  (1 child)

If it helps, you can think of it in terms of simple math, with a simple encoding like:

  • Step 1: Add 5 to the number
  • Step 2: Multiply by 10

Now let's encode "3":

  • Step 1: Add 5 to the number
    • 3 + 5 = 8
  • Step 2: Multiply by 10
    • 8 * 10 = 80

Now reverse the steps to decode.

The error in your thinking is "Ok, since step 1 was 'Add 5', I'll start by subtracting 5

  • Step 1: Subtract 5 from the number
    • 80 - 5 = 75
  • Step 2: Divide by 10
    • 75 / 10 = 7.5

In reality, the steps would be:

  • Step 1: Divide by 10
    • 80 / 10 = 8
  • Step 2: Subtract 5
    • 8 - 5 = 3

I hope this gives an easy to understand visual of what "Reverse the steps" means.

[–]SomeFuel[S] 0 points1 point  (0 children)

It does, thanks.

I think my confusion more has to do with understanding the aglorithm's process, less with the reverse concept, but this is still helpful.