top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is the difference between a skew tree and a linked list?

+1 vote
466 views
What is the difference between a skew tree and a linked list?
posted Apr 12, 2018 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

When node are inserted in a BST in a shorted order, tree becomes skew in nature and known as skewed tree. There are two types of skewed trees i.e. left skewed and right skewed. The purpose of making BST is to reduce the element search time but in case of skewed trees, it becomes linear search and time complexity for skewed tree becomes O(n). I don't see any different between skewed tree and linked list in the context of element search but tree nodes will be having two pointer (left and right) while for linked list implementation only single pointer reference is sufficient to refer the next node.

answer Apr 12, 2018 by Harshita
Similar Questions
+2 votes

I am looking for sample code which can impress an interviewer.

+1 vote

What is the best logic or way to detected linked list has loop ?
And also what is the best way to find out that given linked list is circular ?

...