×
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

Problems on Binary Tree

Check if a Binary Tree is Balanced by Height

In this article, we have explored the algorithm to check if a Binary Tree is balanced by height or not.

Srishti Guleria Srishti Guleria
Algorithms

Linked List with no NULLs

A Linked list is a dynamic data structure which can grow or shrink on demand. It is usually implemented using NULLs, we will consider an alternative no NULL approach and use placeholder nodes.

Rohit Topi
Algorithms

Comparison b/w Different Advanced Sorting algorithms (Interview preparation)

We have reviewed and compared different Advanced Sorting algorithms that will help you in your Interview preparation. We have covered 5 sorting algorithms namely bucket, radix, counting, heap and shell sort.

Sushma Narayan Hegde
Algorithms

Minimum steps to make binary string empty by removing alternating subsequence in each step

Given a string str consisting of only '0's and '1's, the task is to make the string empty by performing minimum number of operations. An operation is defined as the removal of an alternating subsequence from str without changing the order of the remaining characters.

Aditya Kumar Saroj
Algorithms

Minimum elements to be removed from array to make the sum even

Given an array of integer and you have to find minimum no of integers or elements from array need to be removed so that sum of all elements of array results an even value.

Aayushi Ghadiya
Software Engineering

Algorithm behind Bill splitting app

Ever wondered how Bill Splitting app works? We have explained the graph algorithms used in its design in depth. So let's find out how can we resolve this dependency issue. Which data structure will hit your brain at the first time?

Yusuf Vanwala
Algorithms

Heavy Light Decomposition of tree

Heavy Light Decomposition, a competitive programming algorithm is very useful in solving queries efficiently. We will see its usecase, implementation and finally solve few problems based on it.

Rashmitha
Algorithms

Longest Decreasing Subsequence using Dynamic Programming

In this problem (Longest Decreasing Subsequence), you are given an array of length N. You have to find the longest decreasing subsequence (LDS) from the given array. We have solved this using Dynamic Programming.

Shubham Sood Shubham Sood
Algorithms

Longest Common Decreasing Subsequence

In this problem (Longest Common Decreasing Subsequence), we are given 2 arrays and we need to find out the longest common decreasing subsequence from those two arrays. This can be solved using Dynamic Programming.

Amruta U. Koshe Amruta U. Koshe
Algorithms

Maximum Sum Increasing Subsequence

In this problem (Maximum Sum Increasing Subsequence), we are given an array and we need to find out the maximum sum increasing subsequence from that array. This can be solved using Dynamic Programming.

Amruta U. Koshe Amruta U. Koshe
Algorithms

Different Basic Sorting algorithms. Know when to use which one and Ace your tech interview!

We have covered the basic ideas of the basic sorting algorithms such as Insertion Sort and others along with time and space complexity and Interview questions on sorting algorithms with answers.

Sushma Narayan Hegde
Problems on Binary Tree

Designing a Binary Search Tree with no NULLs

A Binary Search Tree (BST) is usually implemented using NULLs in C or C++. This article explores an alternative approach of using placeholder nodes. Here the Binary Search Tree will be implemented in C++.

Rohit Topi
Data Structures

Optimizations in Union Find Data Structure

Union find data structure is also called disjoined set data structure as it a collection of disjoined subsets. There are different optimizations such as union by rank/ size, path compression and much more.

Anjali Chaturvedi Anjali Chaturvedi
Algorithms

NP Hard problems

We have covered the basics of NP Hard problems along with examples such as Subset Sum problem, Travelling Salesman Problem, optimization problem of finding the least cost cyclic route and much more.

Tushti
Algorithms

Job Shop Problem

Job Shop Problem: We are given a number of jobs and machines. Each job constitutes a sequence of tasks which need to be performed in a particular order. Each task can be processed on a specific machine. We need to schedule all the tasks.

Tushti
Algorithms

Find number of solutions of a linear equation of N variables

We have to find the number of solutions to a linear equation of N variables. We have solved this using Dynamic Programming.

Shrey Tripathi
Algorithms

Diameter of N-ary tree using Dynamic Programming

We are given input as the reference to the root of an N-ary tree. We need to calculate the diameter of the tree that is the longest path between any two nodes using Dynamic Programming.

Amruta U. Koshe Amruta U. Koshe
Algorithms

Finding Diameter of Tree using Height of each Node

We have explored the algorithm on how to find the diameter of the tree using height of each node. This will take linear time O(V+E) time complexity.

Hrithik Shrivastava Hrithik Shrivastava
Algorithms

Longest common substring using rolling hash approach

We can solve the longest common substring problem using the rolling hash technique in O(N * log(N)^2) time and O(N) space which is significantly better than other approaches.

Ashutosh Singh Ashutosh Singh
Algorithms

Applications of Hash Map

HashMap in java.util package implements the Map interface in java collection based on Hashtable. There are three main applications of Hash Map: Priority Queues, Dijkstra's Algorithm and Topological Sort.

Chenxin Fang
Algorithms

Find number of substrings with same first and last characters

You are given a string lets say "S" , you need to find the number of all contiguous substrings (part of "S") starting and ending with the same character.

Shubham Kumar
Algorithms

Algorithms for Calculating Day of Week

Some of the Algorithms for Calculating Day of Week are: Tomohiko Sakamoto Algorithm, Gausses Algorithm and Wang's Algorithm. We have covered the basics of Julian and Georgian calender as well.

Anjali Chaturvedi Anjali Chaturvedi
Algorithms

Set Partition Problem (Same sum)

Set Partition Problem: determine whether a given set can be partitioned into two subsets such that the sum of elements in both subsets is same. The time complexity of solving this using Dynamic Programming takes O(N x SUM) time.

Shruti
Software Engineering

Linked List Implementation in Java

We learn how to implement and design Linked List in Java using Object Oriented Programming (OOP) concepts. We have provided the complete Java implementation of Linked List.

William Fang
Algorithms

Wildcard Pattern Matching (Dynamic Programming)

In the Wildcard Pattern Matching problem, we find if a pattern matches a given input string. We will be using a Dynamic Programming approach with the time complexity of O(m * n), here m and n represent length of string and pattern respectively.

Shalini Jaiswal
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