Training Basic Array Operations

숲사람·2022년 6월 26일
0

멘타트 훈련

목록 보기
70/237

2 pointer traversals

public static void reverseArray(int arr[], int n) {
	int  i = 0, j = n-1;
	while(i < j) {
		int temp = arr[i];
		arr[i] = arr[j];
		arr[j] = temp;
		i++;
		j--;
	}
}

https://www.tryexponent.com/courses/software-engineering/data-structures/arrays?ref=pramp&utm_source=pramp&utm_campaign=pramp_question_recommendation&utm_medium=referral

Common array operations

Here are some common array operations that you should know how to perform during an interview in your language of choice:

Insert an item
Remove an item
Update an item
Find an item
Loop over an array
Copy an array
Copy part of an array
Sort an array
Reverse an array
Swap two items
Filter an array

profile
기록 & 정리 아카이브용

0개의 댓글