×
Home Discussions Write at Opengenus IQ
×

Search anything:

  • DSA Cheatsheet
  • HOME
  • Track your progress
  • Deep Learning (FREE)
  • Join our Internship 🎓
  • RANDOM
  • One Liner

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

Hamiltonian Cycle

A Circuit in a graph G that passes through every vertex exactly once is called a "Hamilton Cycle". The Worst Case complexity when used with DFS and back tracking is O(N!).

Avijit Chakraborty
C++

Storage classes in C++

Storage class is used to define the lifetime and visibility of a variable and/or function within a C++ program.These specifiers precede the type that they modify. They are Automatic, External, Static, Register and Mutable

Shreya Rastogi
C Programming

Union in C

A union is a special data type available in C that allows to store different data types in the same memory location. You can define a union with many members, but only one member can contain a value at any given time. Unions provide an efficient way of using the same memory location for multiple use

Harshita Sahai Harshita Sahai
C++

Hierarchical inheritance in C++

When more than one classes are derived from a single base class, such inheritance is known as Hierarchical Inheritance, where features that are common in lower level are included in parent class. We explore hierarchical inheritance in C++

Harshita Sahai Harshita Sahai
C++

Containers in C++ STL

In C++ STL, Containers or container classes store objects and data. There are in total seven standard “first-class” container classes and three container adaptor classes and only seven header files that provide access to these containers or container adaptors.

Harshita Sahai Harshita Sahai
C++

Enumeration in C++

Enumeration (or enum) is a user defined data type in C and C++. It is mainly used to assign names to integral constants, the names make a program easy to read and maintain.

Harshita Sahai Harshita Sahai
C++

while loop in C++

while loop is a most basic loop in C++. while loop has one control condition, and executes as long the condition is true. The condition of the loop is tested before the body of the loop is executed, hence it is called an entry-controlled loop.

Harshita Sahai Harshita Sahai
C++

User defined functions in C++

A function is a group of statements that together perform a task. Every C++ program has at least one function, which is main(), and all the most trivial programs can define additional functions. Users can create custom functions for code reusability and optimization

Kavita Bisht
Software Engineering

Exceptions in Java

Java has a great and powerful mechanism to handle the exceptions so that normal flow of the application can be maintained. We explore the various types of exceptions, how it is handled by JVM and how it can be handled by users in a custom procedure.

Kavita Bisht
C++

Multimap in C++ STL

Multi-map in C++ is an associative container like map. It internally store elements in key value pair. But unlike map which store only unique keys, multimap can have duplicate keys.

Kavita Bisht
C++

Set in C++ STL

In C++ STL, a set is an Associative container which contains a sorted set of unique objects of type Key. The commonly used functions are begin(), cbegin(), end(), size(), max_size(), empty(), insert(), erase(), emplace() and emplace_hint()

Kavita Bisht
C++

Unordered map in C++ STL

In C++ STL, Unordered map is a dictionary like data structure. The most commonly used methods of unordered_map are at(), begin(), end(), bucket(), bucket_count() / bucket_size(), count(), equal_range(), hash_function(), insert(), reserve() and load_factor()

Kavita Bisht
C++

switch case in C++

A switch statement in C++ allows a variable to be tested for equality against a list of values. Each value is called a case, and the variable being switched on is checked for each case.

Harshita Sahai Harshita Sahai
Algorithms

Hamiltonian Path

Hamiltonian Path is a path in a directed or undirected graph that visits each vertex exactly once. The problem to check whether a graph (directed or undirected) contains a Hamiltonian Path is NP-complete, so is the problem of finding all the Hamiltonian Paths in a graph.

Harshita Sahai Harshita Sahai
C++

do while loop in C++

Do while loop in C++ is an exit controlled loop and hence, it executes at least once even when the test-expression is false initially. We illustrate the concept and usage in C with different examples

Harshita Sahai Harshita Sahai
C++

Builder Pattern in C++

Builder pattern in C++ aims to “Separate the construction of a complex object from its representation so that the same construction process can create different representations.” It is used to construct a complex object step by step and the final step will return the object.

Harshita Sahai Harshita Sahai
C++

Default arguments in C++

A default argument in C++ is a value provided in a function declaration that is automatically assigned by the compiler if the caller of the function doesn’t provide a value for the argument with a default value.

Harshita Sahai Harshita Sahai
Java

Using Threads in Java

Java is a multi-threaded programming language which means we can develop multi-threaded program using Java. A multi-threaded program contains two or more parts that can run concurrently and each part can handle a different task at the same time

Kavita Bisht
Python

Lambda functions in Python

In Python, anonymous function is a function that is defined without a name. While normal functions are defined using the def keyword, in Python anonymous functions are defined using the lambda keyword. Hence, anonymous functions are also called lambda functions.

Kavita Bisht
Java

Overview of Java Servlets

Java Servlets are programs that run on a Web or Application server and act as a middle layer between a requests coming from a Web browser or other HTTP client and databases. We explored Servlet Architecture, Servlet API Hierarchy, Servlet interfaces, Servlet Life Cycle and the life cycle methods

Lakshmi Angadi Lakshmi Angadi
C++

Iterators in C++ STL

Iterators in C++ Standard Template Library are used to point at the memory addresses of STL containers. They are primarily used in sequence of numbers, characters etc. They reduce the complexity and execution time of program.

Harshita Sahai Harshita Sahai
C++

if else statement in C++

If else statement in C++ are program control statements that are widely used. We explore it and its variants like if else if, nested if else and if statements.

Harshita Sahai Harshita Sahai
C++

Map in C++ STL

Map in C++ STL is a dictionary like data structure. It is a sequence of (key, value) pair, where only single value is associated with each unique key. It is often referred as associative array.

Kavita Bisht
C++

Reader Writer Problem in C++ using semaphore and monitor

We will focus on solving the Reader Writer problem in C++ by using Semaphores as our first approach and Monitors as our second approach. It is a problem designed to illustrate synchronization within processes.

Kavita Bisht
C Programming

do while loop in C

Do while loop in C is an exit controlled loop and hence, it executes at least once even when the test-expression is false initially. We illustrate the concept and usage in C with different examples

Shreya Rastogi
OpenGenus IQ © 2026 All rights reserved ™ [email: team@opengenus.org]
Top Posts LinkedIn Twitter