LeetCode Question · Feb 2022

Amazon

-12 upvotes 1,357 views 1 reply

Question Details

Time com-O(n) Space com-O(1) Algo- 1)find middle 2)mid+1 to end reverse the linked list 3)then check wheather it head && mid+1 is same class Solution{ public: Node getmid(Node head){ Node slow=head; Node fast=head->next; while(fast...

Full Details

🔒

Unlock full leaked content

Full insider details, leaked discussions, and candidate experiences.

Get Premium →

Topics

Linked List Strings