## Find the Size of the Binary Tree

Objective: Given a Binary tree, Find the size of the tree. Note : Size of the tree is number of nodes in the tree Input: A Binary Tree. Output: Size of the tree. Example...

Skip to content
# Tagged: Beginner

##
Find the Size of the Binary Tree

##
Find the Maximum Depth OR Height of a Binary Tree

##
Binary Search Tree (BST) Complete Implementation.

##
Reverse a Linked List – Part 2

##
Delete a Node in the Middle of a linked list, Given only access to that Node

##
Find the n’th Node from the end of a given Linked List

##
Remove Duplicates from an Unsorted Linked list

##
Check if one string is Rotation of another string

##
String Compression using count of repeated characters – Run Length Encoding

##
Find Whether Two Strings are Permutation of each other

##
Reverse a Linked List

##
Singly Linked List Implementation

##
Find a pair of numbers from an array whose sum equals k

##
Check If String has All Unique Characters

##
Find Whether Given String is palindrome or Not.

@tutorialhorizon

Objective: Given a Binary tree, Find the size of the tree. Note : Size of the tree is number of nodes in the tree Input: A Binary Tree. Output: Size of the tree. Example...

Objective: Given a binary tree, find the height of it Input: A Binary Tree Output: Height of a binary tree Example: Approach:

Binary Tree : A data structure in which we have nodes containing data and two references to other nodes, one on the left and one on the right. Binary Tree consist of Nodes Nodes...

This post is the extension of our earlier post Reverse a linked list. Here We have provided the better recursive solution in which we start reversing the list from the end. Objective: Reverse the...

Objective: Write a program to Delete a Node in the Middle of a linked list, Given only access to that Node Example: Original List : ->1->2->8->3->7->0->4 After Deleting the mid node (say 7) :...

Objective: Given a linked list and integer ‘n’, write an algorithm to find the nth node from the end in the Linked List. Example: Original List : ->1->2->8->3->7->0->4 Output : 3rd Element from the...

Objective: Write a program to remove the duplicates from an unsorted linked list Example: Input Linked List : 1->2->2->4->3->3->2 Output : 1->2->4->3 Input: An unsorted linked list Output: Linked list with no duplicates. Approach:...

Objective: Write an algorithm to check if one string is Rotation of another string. This question has been asked in the Amazon interview. Example: Input Strings : ‘sumitjain’ and ‘tjainsumi’ Output : true Input...

Objective: Write an algorithm to compress the given string by using the count of repeated characters and if new compressed string length is not smaller than the original string then return the original string....

Objective: Given Two Strings, check whether one string is permutation of other Input: Two Strings Output: True or false based on whether strings are permutation of other or not. Example: “sumit” and “tiums” are...

Objective: Reverse the given linked list. Input: A Linked List Output: Reversed Linked List Example: Input : ->30->25->20->15->10->5 Reversed : ->5->10->15->20->25->30 NOTE : Click Reverse a Linked List – Part 2 to see the...

Linked List- As the name suggests it’s a list which is linked. Linked List consist of Nodes Nodes are nothing but objects of a class and each node has data and a link to...

Objective: Write an algorithm to find out whether in a given array there exists or not two numbers whose sum is exactly equals to a given number. This problem has been asked in Amazon...

Objective: Write an algorithm to find out whether in a given string contains all the unique characters. This question has been asked in the Amazon and Microsoft interviews. Input: A String Output: True or...

Objective : Write an algorithm to find Whether Given String is palindrome or Not. Input: A String, Output: true or false on whether string is palindrome or not Approach: Use recursive approach Compare first...

%d bloggers like this: