## Alternate Splitting of a given Linked List

Objective: Given a singly linked list, split it into two linked lists. These linked lists will contain the alternate nodes from the given linked list. Example:

Skip to content# Category: Software Development Engineer (SDE)

## Alternate Splitting of a given Linked List

## Reverse The Doubly Linked List

## Swap Kth Node from the front with the Kth Node from the End

## Print the Bottom View of the Binary Tree.

## Delete X Nodes After Y Nodes In a Linked List

## Merge Sort in a Linked list

## Merge a Linked list into another Linked List at Alternate Positions.

## Construct a binary tree from given Inorder and Level Order Traversal

## Construct Binary Search Tree from a given Preorder Traversal Using Stack (Without Recursion)

## Construct Binary Search Tree from a given Preorder Traversal using Recursion

## Print The Top View of a Binary Tree

## Construct a Binary Tree from Given Inorder and Depth-First-Search.

## Inorder Predecessor and Successor in Binary Search Tree

## Check if Array Contains All Elements Of Some Given Range

## Check if Array is Consecutive Integers

@tutorialhorizon

Objective: Given a singly linked list, split it into two linked lists. These linked lists will contain the alternate nodes from the given linked list. Example:

Objective: Reverse The Doubly Linked List. Example: Approach: Every Node in a doubly linked list has next and previous pointer. Do the linear traversal of the linked list and keep swapping the next and...

Objective: Given a Linked List and a number k, Swap Kth Node from the front with the Kth Node from the End Example: ->10->20->30->40->50->60->70 Swapping 1 Node from the Front and from the End...

Objective: – Given a binary tree, print it in Bottom View of it. What is Bottom View: Bottom view means when you look the tree from the bottom the nodes you will see will be...

Objective: Given a Linked List and x and y. Delete x number of nodes after y nodes from the start. Example: ->10->20->30->40->50->60->70->80->90->100->110->120 Deleted 4 Nodes after 5 Nodes ->10->20->30->40->50->100->110->120 Approach: We need two pointers....

Objective: Given a Linked List, Sort it using merge sort. Example: ->9->3->4->2->5->1 Sorted List: ->1->2->3->4->5->9 Approach: Reference : Merge Sort in array As it Merge sort, we apply the same logic , Divide and...

Objective: Given two linked lists, merge one list into another at alternate positions, if second link list has extra nodes, print them as well Example: 5 -> 10 -> 15 -> 20 ->25 ->...

Objective: – Given a inorder and level order traversal, construct a binary tree from that. Input: Inorder and level order traversal Approach: int[] inOrder = { 4, 2, 5, 1, 6, 3, 7 };...

Objective: – Given a preorder traversal, construct BST from that, without using recursion. Input: Preorder traversal Similar Problem : This problem is similar to the Construct Binary Search Tree from a given Preorder Traversal...

Objective: – Given a preorder traversal, construct BST from that. Input: Preorder traversal Similar Problem : This problem is similar to the – Construct Binary Search Tree from a given Preorder Traversal Using Stack...

Objective: – Given a binary tree, print it in Top View of it. What is Top View: Top view means when you look the tree from the top the nodes you will see will...

Objective: – Given a inorder and preorder traversal, construct a binary tree from that. Input: Inorder traversal and Depth-First-Search. Approach: int[] inOrder = { 8, 4, 2, 5, 1, 6, 3, 7, 9 }; int[]...

Objective: – Given a Binary Search Tree, Find predecessor and Successor of a given node. What is Predecessor and Successor : When you do the inorder traversal of a binary tree, the neighbors of...

Objective: Given an array of unsorted numbers, check if it contains all elements of some given range. Examples: int[] arrA = { 11, 17, 13, 19, 15, 16, 12, 14 }; Range : 12-15...

Objective: Given a array of unsorted numbers, check if all the numbers in the array are consecutive numbers. Examples: int [] arrA = {21,24,22,26,23,25}; – True (All the integers are consecutive from 21 to...

%d bloggers like this: