## Priority Queue in Data Structure

Earlier in we have seen Min-Heap and Max-Heap Implementation. Priority Queue is its built-in implementation in Java. In this article we will see how to perform Min-Heap and Max-Heap using Priority Queue. Brief: A...

Skip to content
# Category: Beginner

##
Priority Queue in Data Structure

##
Find the Second Largest Element in an Array

##
Breadth-First Search/Traversal in a Binary Tree

##
Sort Names by their Last Names.

##
Introduction To Backtracking Programming

##
Dynamic Programming – Stairs Climbing Puzzle

##
Introduction To Dynamic Programming – Fibonacci Series

##
Find a Number occurring odd number of times in a Given array

##
Find a Missing Number From a Sequence of Consecutive Numbers | XOR Method

##
Find the Max element in a Given Binary Tree

##
Check If One Binary is Mirror Tree of another Binary Tree.

##
Print All The Full Nodes in a Binary Tree

##
Magic Index – Find Index In Sorted Array Such That A[i] = i.

##
Find numbers which are palindrome in both their decimal and octal Representations

##
Construct a Special Triangle from a Given Array

@tutorialhorizon

Earlier in we have seen Min-Heap and Max-Heap Implementation. Priority Queue is its built-in implementation in Java. In this article we will see how to perform Min-Heap and Max-Heap using Priority Queue. Brief: A...

Objective: Given an array of integers. find the second largest element in the array. Example: int[] A = { 1, 2, 10, 20, 40, 32, 44, 51, 6 }; Second largest Element : 44...

Breadth-First Search ( or Traversal) also know as Level Order Traversal. What is Breadth First Search: Breadth-first search (BFS) is an algorithm for traversing or searching tree or graph data structures. It starts at...

Objective: Given a list of names ( first name and last name), sort the list by their last names. Example: List [] = {“Daenerys Targaryen”, “Jon Snow”, ” Tyrion Lannister”, ” Joffrey Baratheon”} Output:...

What is Backtracking Programming?? Recursion is the key in backtracking programming. As the name suggests we backtrack to find the solution. We start with one possible move out of many available moves and try...

Objective: A child is climbing up a staircase with n steps, and can hop either 1 step, 2 steps, or 3 steps at a time. Implement a method to count how many possible ways...

What is Dynamic Programming: Dynamic programming is a technique to solve the recursive problems in more efficient manner. Many times in recursion we solve the sub-problems repeatedly. In dynamic programming we store the solution...

Objective: Given a array of integers, in which every elements occurs even number of times except one number which occurs add number of times. Find out that number. Example: int[] A = {...

Input: Array, arrA[] with a missÂing numÂber and Range OutÂput : missÂing number Example: int A[] = { 1, 2, 7, 6, 3, 4 }; int range = 7; Output: MIssing No is :5 In...

Objective: – Given a binary tree , Find the max element in it. Example: Approach: Use Recursion. Max will the Max(root, max element in left subtree, max element in rightsubtree) Recursively solve for max...

Objective: – Given two binary trees check if they are mirror image of each other. Example: Approach:

Objective: Given a binary tree, print all nodes will are full nodes. Full Nodes: Nodes Which has both the children, left and right are called Full Nodes Approach: quite simple Solution. Do the any...

Objective: Given a sorted array of distinct integers, Find the Magic index or Fixed point in the array. Magic Index or Fixed Point: Magic index or a Fixed point in an array is an...

Objective: Given a range of integers, find all the numbers which are palindrome when they are represented in Decimal Value( base 10) and in Octal value(base 8). Example : Number : 373 (Decimal) and...

Objective: Given an array of integers such that first level will print all the elements in the array and from then at each level number of elements will be one less than the previous...

%d bloggers like this: