Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. [1 6 9 4 6 9 7 6 4 4 9 8 7]
  2.  
  3. [1 → 6 → 9 ← 4 6 → 9 ← 7 ← 6 ← 4 4 → 9 ← 8 ← 7]
  4.  
  5. [20 32 28]
  6.  
  7. Input => [10 15 20 10 20 10 10]
  8. [10 → 15 → 20 10 20 ← 10 10]
  9. Output => [45 10 30 10]
  10.  
  11. Input => [9 9 9 9 8 1 8]
  12. [9 9 9 9 ← 8 1 8]
  13. Output => [9 9 9 17 1 8]
  14.  
  15. Input => [1 6 9 4 6 9 7 6 4 4 9 8 7]
  16. [1 → 6 → 9 ← 4 6 → 9 ← 7 ← 6 ← 4 4 → 9 ← 8 ← 7]
  17. Output => [20 32 28]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement