×
Home Discussions Write at Opengenus IQ
×
  • About
  • Track your progress
  • Deep Learning Projects
  • Python Projects
  • Join our Internship 🎓
  • RANDOM
  • 100+ Graph Algorithms
  • 100+ DP Problems
  • 50+ Linked List Problems
  • 50+ Array Problems
  • One Liner
  • 50+ Binary Tree problems
  • Home
  • Rust Projects

Tushti

Delhi •
21 posts •
Algorithms

Majority Element in an array

We have discussed algorithmic techniques to find the majority element in an array. The brute force algorithm takes O(N^2) time while the most efficient algorithm can do it in O(N) time.

Tushti
Algorithms

Two Pointer Technique in Array

We have explained the Two Pointer Technique in array which is used to solve a vast range of problems efficiently. Problems include Reversing an array and Find if a pair with given sum exists in a sorted array.

Tushti
Algorithms

Block Swap Algorithm [for Array Rotation]

This article discusses Block Swap Algorithm. It is used to rotate an array by any number of positions with a Time Complexity of O(N) and Space Complexity of O(1).

Tushti
Algorithms

Reversal Algorithm to rotate an array

We have discussed Reversal algorithm. It is widely used for rotating arrays. This algorithm is specifically useful for rotating array by any number of places because it efficiently does the operation in O(N) time and O(1) auxiliary space.

Tushti
Algorithms

Shuffle an array [2 approaches]

We have explored two approaches to shuffle an array. The first approach uses an auxiliary array while the second approach is in-place and is known as Fisher Yates Algorithm.

Tushti
Algorithms

Arithmetic Expression Evaluation using Stack

We have explained how an Arithmetic Expression (like 2 * 3 + 4) is evaluated using Stack. We have presented the algorithms and time/ space complexity.

Tushti
Algorithms

Different ways to sort a Queue

We will be discussing 4 different ways to sort a queue. This involves sorting a Queue using auxiliary array, O(1) space, using recursion and using a stack.

Tushti
Algorithms

Reverse first K elements of Queue using Stack

To reverse the first K elements of a queue, we can use an auxiliary stack. We push the first k elements in the stack and pop() them out so and add them at the end of the queue.

Tushti
Algorithms

Variants of Stable Marriage Problem

We have explored the variants of stable marriage problem like Egalitarian Stable Matching, Minimum Regret Stable Matching, Stable marriage with ties, Stable marriage with incomplete lists and others.

Tushti
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
Data Structures

Soft heap

Soft heap is a variant of heap data structure (priority queue). It is a powerful data structure owing to amortized constant time complexity of some basic functions.

Tushti
Data Structures

Skew Heap

We have explained Skew heap. Skew heap is a special variant of Leftist heap. Leftist heap is in turn, a variant of binary heap. We have given an overview of binary heaps, then discussed leftist heaps and finally talked about skew heaps.

Tushti
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

NP Complete Complexity

In this article, we have explored the idea of NP Complete Complexity intuitively along with problems like Clique problem, Travelling Salesman Problem and more.

Tushti
Algorithms

Hospital Residents Problem

We have explored Hospital Residents Problem which is an matching problem similar to Stable Room Mates problem and Gale Shapley algorithm. In this, we match applicants to programs/ jobs.

Tushti
Algorithms

Stable Roommates Problem (Irving's Algorithm)

In Stable Roommates Problem, we are given an even-sized set in which each member has a preference list which consists of all other members of the set. We need to match the members of the set such that every member has most preferred choice as their roommate. This is solved using Irving's Algorithm.

Tushti
Algorithms

Gale Shapley Algorithm for Stable Matching problem

Gale Shapley Algorithm is an efficient algorithm that is used to solve the Stable Matching problem. It takes O(N^2) time complexity where N is the number of people involved.

Tushti
Algorithms

Minimum Increment and Decrement operations to make array elements equal

We are given an array, we need to find the minimum number of increment and decrement operations (by 1) required to make all the array elements equal. We have explored two approaches where brute force approach take O(N^2) time while the efficient approach O(N logN) time.

Tushti
Algorithms

Minimum number of increment (by 1) operations to make elements of an array unique

We are given a sorted array which might have duplicate elements, our task is to find the minimum number of increment (by 1) operations needed to make the elements of an array unique. We have solved this using two approaches one using two pointers and other using hashmap.

Tushti
Software Engineering

Different ways to initialize a queue in C++ STL

In this article, we have explored different ways to initialize a queue in C++ Standard Template Library (STL). There are three ways to initialize Member functions for inserting elements, Container objects and another Queue.

Tushti
OpenGenus IQ © 2023 All rights reserved â„¢ [email: team@opengenus.org]
Top Posts LinkedIn Twitter