×
Home Discussions Write at Opengenus IQ
×
  • DSA Cheatsheet
  • HOME
  • Track your progress
  • Deep Learning (FREE)
  • Join our Internship 🎓
  • RANDOM
  • One Liner

Algorithms

Algorithms have proven to be the most important domain over the last century which has reformed the way we do tasks. It is actively used to design industry systems and forms the building blocks of companies like Google. We cover all types of algorithms in depth

Algorithms

Convert one string to another by changing all occurrence of a character to another

We will be solving Check if one string can be converted to another by changing all occurrence of a character to another character problem using the Union and Find algorithm.

Raghavendra Achar C
Algorithms

Maximum XOR of two numbers in an array using Trie

Given a list of numbers we need to identify a pair of numbers in the list such that the XOR of those numbers is the maximum possible over all the pairs.

Rohit Topi
Algorithms

Find k-th smallest element using QuickSelect algorithm

Quickselect is an approach where we use divide and conquer and find the k th smallest element in an average O(N) time.

Rohit Topi
Algorithms

Longest Alternating Subsequence

Given an array, find the length of the longest alternating subsequence. We solve this using two approaches: Dynamic Programming and Efficient Approach.

Aditya Kumar Saroj
Algorithms

Find length of the longest Fibonacci subsequence

We have a strictly increasing array of positive integers. Our task is to find the length of the longest Fibonacci subsequence possible. We will solve this using Brute force and Dynamic Programming.

Raghavendra Achar C
Algorithms

Next Larger / Smaller element in Array (using Monotonic Queue)

In this problem, we are given an array and our task is to find the next larger/ smaller element for each element in the array. We have covered brute force approach and Monotonic Queue.

Raghavendra Achar C
String Algorithms

Minimum number of operations to convert binary string to self-destructing

We will explore algorithms to find the Minimum number of operations to convert a binary string to a self-destructing string.

Aditya Kumar Saroj
Algorithms

Basics of stable matching

We have covered the basics of Stable Matching and algorithms associated with it like Gale Shapley Algorithm, Irving's Algorithm, Hospital Residents Problems and more.

Tushti
Algorithms

Implementing Priority Queue using Linked List

We demonstrated the approach to Implement a Priority Queue using Linked List and support all operations like push and pop efficiently.

Vikranth R Gaddam Vikranth R Gaddam
Problems on Binary Tree

Level order traversal of a Binary Tree

In this article, we have explored Level order traversal of a Binary Tree in depth using two approaches: recursive approach and queue.

Akshay Atam
Algorithms

Coin Change Problem

Coin change problem is very similar to unbounded knapsack problem which can be solved easily and efficiently by using Dynamic Programming. General task is to find maximum number of ways to add the coins from the array for given amount.

Renuka Ashok Jadhav
Algorithms

Maximal Rectangle problem (using Monotonic queue)

We have solved the maximal rectangle problem using Monotonic queue. In this problem we are given a matrix consisting of only 0's and 1's, we need to find the largest rectangle consisting of only 1's and return its area.

Raghavendra Achar C
Algorithms

Monotonic Queue (with Daily Temperatures & Largest Rectangle in Histogram)

Monotonic queue is a data structure where the data is entirely in non-decreasing order or entirely in non-increasing order. It is generally used for optimizing dynamic programming techniques.

Raghavendra Achar C
Algorithms

Reverse a Stack

The objective of this article is to explore various approaches that can be used to reverse the given stack (stack is a linear data structure where insertion and deletion are made at the same end).

Raghavendra Achar C
Algorithms

Zig Zag Traversal of Binary Tree

In this article, we present 4 different approaches for Zig Zag Traversal of Binary Tree using stack, deque, recursion and an iterative approach.

Srishti Guleria Srishti Guleria
Algorithms

Check if 2 Binary Trees are isomorphic

Two Binary Trees are known as isomorphic if one of them can be obtained from the other one by series of flipping of nodes, swapping the children both left and right of number of nodes.

Srishti Guleria Srishti Guleria
Algorithms

Convert Binary Tree to Circular Doubly Linked list

To convert binary tree to circular doubly linked list, we will take left node as previous pointer and right node as next pointer. The order of nodes in Doubly Linked List must be same as in inorder of the given binary tree.

Srishti Guleria Srishti Guleria
Algorithms

Succinct (0-1) Encoding of Binary Tree

Succinct (0-1) Encoding of Binary Tree is an approach to encode a Binary Tree to the lowest possible space and maintain the structural information.

Srishti Guleria Srishti Guleria
Algorithms

LCA in Binary Tree using Euler tour and Range Minimum Query

In this problem, we will find the Lowest Common Ancestor of a Binary Tree using Euler tour and Range Minimum Query. We can solve the LCA problem by reducing it to a RMQ problem.

Srishti Guleria Srishti Guleria
Algorithms

Lowest Common Ancestor in a Binary Tree

In binary trees, for given two nodes a and b, the lowest common ancestor is the node of which both a and b are descendants. We explored the algorithm to find Lowest Common Ancestor in a Binary Tree.

Srishti Guleria Srishti Guleria
Problems on Binary Tree

Operations in Threaded Binary Tree

There are three main operations which can be done on a threaded binary tree Insert, Search and Delete operation which we have explained in depth.

Hrithik Shrivastava Hrithik Shrivastava
Problems on Binary Tree

Threaded Binary Tree

Threaded binary tree is a simple binary tree but they have a speciality that null pointers of leaf node of the binary tree is set to inorder predecessor or inorder successor.

Hrithik Shrivastava Hrithik Shrivastava
Algorithms

Boolean Parenthesization Problem

We will solve Boolean Parenthesization Problem using Dynamic Programming and understand the algorithm with a step by step explanation. The time complexity to solve this problem is O(N^3) with a space complexity of O(N^2).

Ayush Mahant Ayush Mahant
Algorithms

Delete Middle Node from Linked List

In this problem, we will delete the Middle Node from a given Linked List. We have covered the algorithm (along with implementation) to delete the middle node from a Singly Linked List and Doubly Linked List.

Sakshi Bhalla
Problems on Binary Tree

Checking if a Binary Tree is foldable

A binary tree is foldable if the left subtree and right subtree are mirror images of each other. An empty tree is also foldable. We have presented two algorithms to check if Binary Tree is foldable.

Srishti Guleria Srishti Guleria
OpenGenus IQ © 2025 All rights reserved â„¢
Contact - Email: team@opengenus.org
Primary Address: JR Shinjuku Miraina Tower, Tokyo, Shinjuku 160-0022, JP
Office #2: Commercial Complex D4, Delhi, Delhi 110017, IN
Top Posts LinkedIn Twitter
Android App
Apply for Internship