Category: data structure
Given a n-ary 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 …
Given a non-empty array of integers, return the third maximum number in this array. If it does not exist, return the maximum number. The time complexity must be in …
Find the sum of all left leaves in a given binary tree. There are two left leaves in the binary tree, with values 9 and 15 respectively. Return 24. …
Task: Merge two given sorted integer array A and B into a new sorted integer array. Example A=, B=, return This is the final step of the merge sort …
I was recently being asked by this question: How do you Design a Circular FIFO (First-In First-out) Buffer (Queue) in C? You need to implement two methods: fifoRead and …