• Skip to primary navigation
  • Skip to content
  • Skip to primary sidebar
  • Skip to secondary sidebar

GoHired

Interview Questions asked in Google, Microsoft, Amazon

Join WeekEnd Online Batch from 4-April-2020 on How to Crack Coding Interview in Just 10 Weeks : Fees just 20,000 INR

  • Home
  • Best Java Books
  • Algorithm
  • Internship
  • Certificates
  • About Us
  • Contact Us
  • Privacy Policy
  • Array
  • Stack
  • Queue
  • LinkedList
  • DP
  • Strings
  • Tree
  • Mathametical
  • Puzzles
  • Graph

Linked List V/S Binary Search Tree

March 19, 2014 by Dhaval Dave

Linked List :

Node(1) -> Node(2) -> Node(3) -> Node(4) -> Node(5) -> Node(6) -> Node(7)
  • In linked list, the items are linked together through a single next pointer.
  • Next Node’s Key Can be larger or samller then previous Node.
  • Not Sorted
  • Time Complexity of Search :O(n) Insert : O(1) Delete : O(1) {if you have use optimized method }


Binary Search Tree:

           [4]
          /   \
       [2]     [6]
      /  \    /   \
    [1]  [3] [5]   [7]
  • In a binary tree, each node can have 0, 1 or 2 sub nodes.
  • The key of the left node is lesser than the key of the node and the key of the right node is more than the node
  • Sorted
  • Time Complexity of Search : O(log(n)) Insert : O(log(n)) Delete : O(log(n))
References:
http://bigocheatsheet.com/

Similar Articles

Filed Under: problem Tagged With: Binary Search Tree, BST, Linked List

Reader Interactions

Primary Sidebar

Join WeekEnd Online/Offline Batch from 4-April-2020 on How to Crack Coding Interview in Just 10 Weeks : Fees just 20,000 INR

Join WeekEnd Online/Offline Batch from 4-April-2020

WhatsApp us

Secondary Sidebar

Custom Search

  • How I cracked AMAZON
  • LeetCode
  • Adobe
  • Amazon
  • Facebook
  • Microsoft
  • Hacker Earth
  • CSE Interview

Top Rated Questions

Count number of ways to reach a given score in a game

Binary Tree in Java

Find min element in Sorted Rotated Array (Without Duplicates)

Print Power Set of a Set

Get Minimum element in O(1) from input numbers or Stack

There are N nuts and N bolts, u have to find all the pairs of nuts and bolts in minimum no. of iteration

How Radix sort works

Connect n ropes with minimum cost

Spanning Tree

Find an index i such that Arr [i] = i in array of n distinct integers sorted in ascending order.

Client Server C program

Python Dictionaries

Maximum size of square sub matrix with all 1’s in a binary matrix

Search element in a matrix with all rows and columns in sorted order

BFS (Breath First Search)

LeetCode: Container With Most Water

Puzzle : 100 doors in a row Visit and Toggle the door. What state the door will be after nth pass ?

Stock Buy Sell to Maximize Profit

Minimum insertions to form a palindrome

Right view of Binary tree

Singly linked list

robot standing at first cell of an M*N matrix. It can move only in two directions, right and down. In how many ways, it can reach to the last cell i.e. (M, N) Code it

N Petrol bunks or City arranged in circle. You have Fuel and distance between petrol bunks. Is it possible to find starting point so that we can travel all Petrol Bunks

Print all nodes that are at distance k from a leaf node

Find the smallest window in a string containing all characters of another string

Reversal of LinkedList

Convert Decimal to Roman numbers / Romanizer HackerEarth Code

Find the element that appears once others appears thrice

Level order traversal in Spiral form

Check Binary Tree is Binary Search Tree or not

Copyright © 2026 · Genesis Framework · WordPress · Log in