Coding tests Flashcards
1
Q
how to see if you’re on last item of an array in python?
A
for k, v in enumerate(inputArray):
if k != len(inputArray) - 1:
2
Q
how to loop through keys and values in an array (python)?
A
use enumerate, for k, v in enumerate(inputArray):
3
Q
how to reverse a python string?
A
“abcdefghijk”[::-1]
4
Q
what are the high level steps?
A
read, ask Q’s, deeply understand, write steps, confirm, setup code IO, code, debug