Taking a list of integers and inserting each value into a three-heap (a min heap that can have up to three children) takes O(N logN) runtime because percolate Up function depends on the height of the tree.
Write pseudocode or actual Java code for insert operation that takes a list of random integers. Your priority queue starts from an empty priority queue with size 0, and you should add given elements ot the priority queue. The insert operation for your three-heap should run in at most O(N) time asymptotically.