Write a method that compute the sum of all the elements of an array of integers.
input: [1, 2, 2, 3, 3, 4, 5, 6, 5, 7, 7, 7, 8, 8, 1]
output: 69
Write a method to reverse a string.
| import mitmproxy.http | |
| import requests | |
| import json | |
| import re | |
| import base64 |
| set pagination off | |
| set disassembly-flavor intel | |
| set disassemble-next-line on | |
| set print pretty on | |
| set confirm off | |
| set history save on | |
| set history filename ~/.gdb_history | |
| tui enable | |
| tui new-layout default src 1 {-horizontal asm 2 regs 1} 2 status 1 cmd 1 | |
| tui new-layout no-src {-horizontal asm 2 regs 1} 2 status 1 cmd 1 |