I would expect something worse than bubble sort. No idea whether it will even work:
void reverse(auto A, int start, int end) {
for (int i = 0; i < (end - start) / 2; i = i + 1) {
auto tmp = A[start + i];
A[start + i] = A[end - i];
A[end - i] = tmp;
}
}
for (int j = 0; j < N; j = j + 1) {
for (int i = 0; i < N; i = i + 1) {
if (A[i] < A[i + 1]) {
reverse(A, i, N);
}
}
}
It’s trivial to make the battery thicker to match the camera bump. Thin phones have thin camera bumps that still stick out, it’s totally a design choice.