find max value의 공간 복잡도
이전 연습 문제에서 구현한 코드에서, findMaxValue 메서드의 공간 복잡도는 무엇이었나요?
public int findMaxValue(int[] data) {
// Initialize the maximum value to the first element
int max = data[0];
for (int value : data) {
// Update max if current element is greater
if (value > max) {
max = value;
}
}
return max;
}
이 연습은 강의의 일부입니다
