def moveElementToEnd(array, toMove):
tmp = 0
for i in range(len(array)):
if array[i] != toMove:
array[i], array[tmp] = array[tmp], array[i]
tmp += 1
return array
'Algorithms and Data Structures > Coding Practices' 카테고리의 다른 글
AlgoExpert Array of Products (0) | 2022.07.22 |
---|---|
AlgoExpert Monotonic Array (0) | 2022.07.21 |
Kattis Above Average (0) | 2022.07.20 |
Kattis a different problem (0) | 2022.07.20 |
Kattis Climbing Worm (0) | 2022.07.20 |