Skip to content

Latest commit

 

History

History
20 lines (14 loc) · 670 Bytes

File metadata and controls

20 lines (14 loc) · 670 Bytes

1. Search Index or Insert Position


Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order. You may assume no duplicates in the array.

2. Move Zeroes


Given an array arr, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements.

	Example:

	Input: [0,1,0,3,12]
	Output: [1,3,12,0,0]

3. Maximum Depth of N-ary Tree


Given a n-arry tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.