← 返回 microsoft 的题目列表Insert into a Circular Linked List
类型:online_judge
Given a sorted circular linked list, insert a new node at a specified position such that the order of nodes remains consistent with the existing nodes. Design an algorithm with O(n) time complexity to achieve this operation. If the list is empty, create a standalone node and return it.
Example
Input
[] 5