×
Home Discussions Write at Opengenus IQ
×

Search anything:

  • DSA Cheatsheet
  • HOME
  • Jobs
  • About
  • One Liner
  • RANDOM
  • Track your progress
  • Deep Learning (FREE)
  • Join our Internship 🎓
  • AI Engineering
  • Scholarship
  • Campus Ambassador

OpenGenus IQ, an open-source Computer Science Publication House, is driven by 2500+ BSc/MSc/PhD holders globally, exploring Algorithms, Deep Learning, System Design, and more since 2017.

Algorithms

Conversion of Infix to Postfix Expression using Stack

To convert Infix expression to Postfix expression, we will use the stack data structure. By scanning the infix expression from left to right,if we get any operand, simply add it to the postfix form, and for the operator and parenthesis, add them in the stack maintaining the precedence of them.

Piyush Rajendra Chaudhari Piyush Rajendra Chaudhari
C++

for loop in C++

For loop has three components: initialization Statement, test Expression and update Statement. We have explored for loop in C++ and presented examples and compared it with while loop.

Harshita Sahai Harshita Sahai
C Programming

Static memory allocation in C

In C, the default way of memory allocation is static. Static memory allocation is an allocation technique which allocates a fixed amount of memory during compile time and the operating system internally uses a data structure known as Stack to manage it We define static variables and how to delete it

Shreya Gupta Shreya Gupta
Software Engineering

goto statement in C

The goto statement is a jump statement which is sometimes also referred to as unconditional jump statement. The goto statement can be used to jump from anywhere to anywhere within a function. The use of goto statement is highly discouraged and can be avoided using break and continue statements.

Harshita Sahai Harshita Sahai
Software Engineering

Break Statement in C

Break Statement is a loop control statement which is used to terminate the loop. As soon as the break statement is encountered from within a loop, the loop iterations stops there and control returns from the loop immediately to the first statement after the loop. break can be used in all loop

Harshita Sahai Harshita Sahai
Software Engineering

Error Handling in C

In C when some error occurs then -1 or NULL value is returned and a global variable errno is set with the error code.Hence we use returned values to check errors. We use EXIT_SUCCESS ,EXIT_FAILURE to deal with errors. There are three types of errors syntax, logical and semantic.

Vartika Yadav
Data Structures

Hash Map / Hash table

Hash map (hash table, unordered map, dictionary, hash set) is a widely used efficient data structure that used to store data which can be searched in constant time O(1). This data structure is implemented over an array that maps keys to values that is it is a set of key value pairs.

Yao Yao Yao Yao
Machine Learning (ML)

Linear Regression in Python with TensorFlow

In this guide, we will implement Linear Regression in Python with TensorFlow. Linear Regression is a simple yet effective prediction that models any data to predict an output based on the assumption that it is modeled by a linear relationship.

Leandro Baruch Leandro Baruch
Algorithms

Binary Lifting with k-th ancestor and lowest common ancestor (LCA)

Binary Lifting is a technique used to find the k-th ancestor of any node in a tree in O(log N). This also leads to a faster algorithm in finding the lowest common ancestor (LCA) between two nodes in a tree. The technique requires preprocessing the tree in O(N log N) using dynamic programming.

Arshad G
Python

Create arrays in Numpy

Numpy functions that we have covered are arange(), zeros(), ones(), empty(), full(), eye(), linspace() and random(). Creating and managing arrays is one of the fundamental and commonly used task in scientific computing. Numpy is a Python library which adds support for several mathematical operations

OpenGenus Tech Review Team OpenGenus Tech Review Team
Algorithms

Bipartite checking using Graph Colouring and Breadth First Search (BFS) [O(V+E) time]

The algorithm to determine whether a graph is bipartite or not uses the concept of graph colouring and BFS and finds it in O(V+E) time complexity on using an adjacency list and O(V^2) on using adjacency matrix. It is used to decode codewords and model situations in cloud computing and big data

Isha Gautam
Data Structures

XOR Linked List

XOR Linked List is the memory efficient version of Doubly Linked List because it makes use of only one space for address field with every node. It provides facilitates list traversal in both forward and backward directions. Insertion and deletion operations take constant time

Lakshmi Angadi Lakshmi Angadi
Machine Learning (ML)

Logistic Regression

Logistic Regression is an efficient regression algorithm that aims to predict categorical values, often binary. It is widely used in the medical field to classify sick and healthy individuals and areas that need to determine a client's risk such as financial companies.

Jash Sheth
Software Engineering

Functions in C

A function in C is a set of statements that take inputs, do some specific computation and produces output. The idea is to put some commonly or repeatedly done task together and make a function, so that instead of writing the same code again and again for different inputs, we can call the function.

Harshita Sahai Harshita Sahai
Software Engineering

An in-depth look into Recursion in C

Recursion is a coding technique/ design in which a function calls itself directly or indirectly and the corresponding function is called as recursive function. Using this many problems can be solved easily with less time. C, C++, Java, Python, Go and others support Recursion except Fortan 77

Harshita Sahai Harshita Sahai
Software Engineering

malloc vs calloc vs realloc

We take a deep look into the 3 dynamic memory allocation techniques in C/ C++ namely malloc, calloc and realloc and explore the difference. malloc stand for memory allocations, calloc for contiguous allocation and realloc for re-allocation.

Harshita Sahai Harshita Sahai
Machine Learning (ML)

Principal Component Regression (PCR)

Principal Component Regression (PCR) is an algorithm for reducing the multi-collinearity of a dataset. PCR is basically using PCA, and then performing Linear Regression on these new PCs. The key idea of how PCR aims to do this, is to use PCA on the dataset before regression.

Jash Sheth
Algorithms

Topological Sorting using Depth First Search (DFS)

We will implement Topological sorting using Depth First Search in linear time O(V+E). Topological Sorting for Directed Acyclic Graph (DAG) is a linear ordering of vertices such that for every directed edge uv, vertex u comes before v in the ordering. It is useful in instruction scheduling and other

Saranya Jena Saranya Jena
Machine Learning (ML)

Ridge Regression

Ridge regression is an efficient regression technique that is used when we have multicollinearity or when the number of predictor variables in a set exceed the number of observations. It uses L2 regularization and solves the problem of overfitting. Concepts of overfitting and regularization is basis

Jash Sheth
Machine Learning (ML)

Model Evaluation: a crucial step in solving a machine learning problem

Models like Googlenet is used across various problems and MobileNet are designed for computational limited resources. It is a challenge to find the best technique or model for a given problem. We evaluate a model based on Test Harness, Performance Measure, Cross validation and Testing Algorithms.

Surya Pratap Singh
Machine Learning (ML)

Summary of Regression Techniques

Regression is a technique based on statistics to model the relationship between a set of variables to make predictions on unseen data. We explored are Linear, Logistic, Polynomial, Ridge, Lasso, Elastic Net, Stepwise regression.

Leandro Baruch Leandro Baruch
Machine Learning (ML)

Data augmentation Techniques

Data augmentation is the technique of increasing the size of data used for training a model. Some of position augmentation includes scaling, cropping, flipping, padding, rotation, translation, affine transformation. Color augmentation includes brightness, contrast, saturation and hue.

Harshit Kumar Harshit Kumar
Software Engineering

List in Java

There is a List interface in Java which is a child interface of Collection. The List interface supports access, insertion, deletion of the elements. Each element in List has its own index, starting at 0, then 1 and so on. To create List objects we have ArrayList() LinkedList() Vector() and Stack()

Wei-Cheng Li
Algorithms

String hashing

Hashing is an important technique which converts any object into an integer of a given range. Hashing is the key idea behind Hash Maps which provides searching in any dataset in O(1) time complexity. An efficient algorithm to hash a string is used to compare strings in O(1) time complexity

OpenGenus Tech Review Team OpenGenus Tech Review Team
Algorithms

Fermat's little theorem, a Probabilistic test for Primality

One of the most popular probabilistic algorithm for determining if a number is prime or not is based on Fermat's little theorem. The complexity of the algorithm is O(K log N) and fails only for Carmichael numbers which are composite numbers satisfying fermat little theorem starting with 561

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