# Category: Beginner

## Find the last repeating character in a given string.

Objective: Given a string, write an algorithm to find the last repeating character in it. Example: String input = “horizon tutorials” Output: ‘i’ String input = “algorithms” Output: No repeating character found. Approach: Naive...

## Find the first non repeating character in a given string

Objective: Given a string, write an algorithm to find the first non repeating character in it. Example: String input = ” tutorial horizon” Output: ‘u’ String input = “aabbccadd” Output: No non-repeating character found....

## Find the first repeating character in a given string

Objective: Given a string, write an algorithm to find the first repeating character in it. Example: String input = “horizon tutorials” Output: ‘o’ String input = “algorithms” Output: No repeating character found. Approach: Naive...

## Reverse the given Array without using built in function

Objective: Given a array, write an algorithm to reverse the array. Example: int a[] = {1, 2, 3, 4, 5} Output: {5, 4, 3, 2, 1} Approach: It’s obvious that you cannot use any...

## Implement Stack Using Linked List

Objective: Write an algorithm to implement Stack using Linked List. If you do not know about then for starters its abstract data type in which follows the principle of LIFO (Last-In-First-Out) which means the...

## Doubly Linked List Complete Implementation

In this article we will see what is doubly linked list, how it is different from other linked list and how to implement it. Earlier we have seen what is Singly Linked List and...

## Circular Linked List Complete Implementation

Earlier we have seen what is Singly Linked List and How to implement it. In a way you say that it’s an extension of singly linked list. I would suggest that if you do...

## Get the Sum of all left leaves in a Binary tree

Objective: Given a binary tree, find the sum of all the nodes which are left as well as leaves nodes. Example:     Approach: Approach is quite simple. Do the inorder traversal check if...

## Binary Tree-Postorder Traversal – Non Recursive Approach

Objective: Given a binary tree, write a non recursive or iterative algorithm for postorder traversal. Example: Earlier we have seen “What is postorder traversal and recursive algorithm for it“, In this article we will...

## Binary Tree – Preorder Traversal – Non Recursive Approach

Objective: Given a binary tree, write a non recursive or iterative algorithm for preorder traversal. Example: Earlier we have seen “What is preorder traversal and recursive algorithm for it“, In this article we will...

## Binary Tree-Inorder Traversal – Non Recursive Approach

Objective: Given a binary tree, write a non recursive or iterative algorithm for Inorder traversal. Example: Earlier we have seen “What is Inorder traversal and recursive algorithm for it“, In this article we will...

## Delete the Binary Tree

Objective: Given a binary tree, write an algorithm to delete it. This is one of the basic problem in trees. if you are new to trees then this problem will help you build your...

## Search the Element in a binary tree – With and Without Recursion

Objective: Given a binary tree and a given number x, Write an recursive algorithm to search the element in the tree. This is one of the very basic problems of tree. If you are...

## Tree Traversals

There are multiple ways to in which you can traverse a tree. In this article we will see these traversals in detail. If you are new to trees then I would recommend that you...

## Find the Size of a Binary Tree without Recursion

Objective: Given a binary tree, Write an non-recursive algorithm to find the size of the tree. Note : Size of the tree is num­ber of nodes in the tree Approach: In our earlier post (link)...