×
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.

Software Engineering

Working with images in HTML

Images can be inserted into our HTML page using <img> tag. The <img> tag is an empty tag, which means that it does not have a closing tag. We can insert parameters of the <img> element using various attributes like src, alt, height and width.

Subhajit Mondal Subhajit Mondal
Software Engineering

Creating and resolving Deadlocks in Java

The term Deadlock refers to a situation in multithreading, where two or more threads are blocked forever, waiting for each other. In Java, we use synchronized keyword to make the class or method thread-safe.The keyword ensures that only one thread can access the resource at a given point of time.

Priyanka Yadav Priyanka Yadav
Algorithms

Kosaraju's Algorithm for Strongly Connected Components 【O(V+E)】

Kosaraju algorithm is a DFS based algorithm used to find Strongly Connected Components(SCC) in a graph. It is based on the idea that if one is able to reach a vertex v starting from vertex u, then one should be able to reach vertex u starting from vertex v

Arvind Tatiparti
Data Structures

Fibonacci Heap

A Fibonacci heap is a heap data structure similar to the binomial heap. It uses Fibonacci numbers and also used to implement the priority queue element in Dijkstra’s shortest path algorithm which reduces the time complexity from O(m log n) to O(m + n log n)

Rohit Kumar Rohit Kumar
Algorithms

Count paths from Top Left to Bottom Right of a Matrix using Dynamic Programming【O(M*N)】

Count all the possible paths from top left to bottom right of a m x n matrix with the constraints that from each cell you can either move only to right or down. Brute force approach takes exponential time while dynamic programming takes O(M*N) time complexity

Akash A. Gajjar Akash A. Gajjar
Algorithms

Using Farach Colton and Bender Algorithm to solve LCA【O(V) query】

The basic idea of Farach Colton and Bender Algorithm is to traverse all the nodes using the Depth First Search graph traversal and keep a record of all the visited nodes and there corresponding heights. This allows to answer LCA queries in O(V) time complexity

Siddharth Agarwal Siddharth Agarwal
Software Engineering

Variables and Datatypes in Kotlin

In this article, you will learn How to declare variable in Koltin?, How kotlin infers the type of variables? and How to work with various data types?

Shubham Mantri
Algorithms

Finding the Lexicographical Next Permutation in O(N) time complexity

In Lexicographical Permutation Algorithm we will find the immediate next smallest Integer number or sequence permutation. Finding all permutations take O(N!) time complexity but we present an efficient algorithm which can solve this in O(N) time complexity

Piyush Rajendra Chaudhari Piyush Rajendra Chaudhari
Algorithms

Heap’s algorithm for generating permutations

Heap's Algorithm is used to generate all the possible permutation of n-decimals of a number. It generates each permutation from the previous one by interchanging a single pair of elements; the other n−2 elements are not disturbed. For N numbers, it takes O(N!) time complexity

Piyush Rajendra Chaudhari Piyush Rajendra Chaudhari
Software Engineering

Working with history object of HTML DOM

The browsers history is present in the history object. We can use the window part (window.history) or just simply history. It contains an array of URLs or links visited by the user.

Subhajit Mondal Subhajit Mondal
Machine Learning (ML)

Whitening with PCA with code demonstration

When we are training our model on images, the raw input is quite redundant because the pixels that are adjacent to each other are highly correlated. The goal of Whitening is to reduce redundancy in these images by making features less correlated to each other and same variance

Surya Pratap Singh
Algorithms

Algorithm to find cliques of a given size k【O(n^k) time complexity】

We can find all the 2-cliques by simply enumerating all the edges. To find k+1-cliques, we can use the previous results. Compare all the pairs of k-cliques. If the two subgraphs have k-1 vertices in common and graph contains the missing edge, we can form a k+1-clique.

Sadanand Vishwas Sadanand Vishwas
Algorithms

Minimum Product Subset of an array

For a given array of elements, we have to find the non-empty subset having the minimum product. We will explore two techniques brute force O(2^N) and Greedy algorithm O(N)

Arvind Tatiparti
Algorithms

Maximum Product Subset of an array

For a given array of elements, we have to find the non-empty subset having the maximum product. We will explore two techniques brute force O(2^N) and Greedy algorithm O(N)

Arvind Tatiparti
Software Engineering

Docstrings in Python

Docstrings in Python like comments provide us a convenient way of associating documentation to the source code. Docstrings are not stripped but are retained through out the runtime of the program. They specify what the function does not how it does. Docstrings are used in functions, classes

Tanmayi Patibandla Tanmayi Patibandla
Data Structures

Understanding Bit mask/ Bit map in depth

A bit mask is a data structure, usually an integer or array of bits, that represent a bit pattern which signifies a particular state in a particular computational problem. It takes advantage of bitwise operations.

Ajay Bechara Ajay Bechara
Software Engineering

Understanding TF IDF (term frequency - inverse document frequency)

tf-idf stands for Term Frequency - Inverse Document Frequency. It is a 2 dimensional data matrix where each term denotes the relative frequency of a particular word in a particular document as compared to other documents. This is a widely used metric in Text Mining and Information retrieval

Chaitanyasuma Jain Chaitanyasuma Jain
Software Engineering

Functors in C++

Function objects are another example of the power of generic programming and the concept of pure abstraction. We could say that anything that behaves like a function is a function. So, if we define an object that behaves as a function, it can be used as a function as well.

Harshita Sahai Harshita Sahai
Software Engineering

Decltype keyword in C++

Decltype stands for declared type of an entity or the type of an expression. It lets you extract the type from the variable so decltype is sort of an operator that evaluates the type of passed expression.

Harshita Sahai Harshita Sahai
Software Engineering

Auto keyword in C++

The auto keyword specifies the type of the variable that is being declared will be automatically identified by the compiler. It is used for type inference, save time while creating iterators and create method with return type as auto

Harshita Sahai Harshita Sahai
Software Engineering

Working with audio in HTML5

The HTML <audio> element is used to embed sound or music element in our HTML page. It may contain one or more audio sources, represented using the src attribute or the <source> element: the browser will choose the most suitable one. We will discuss about in in later part of the article

Subhajit Mondal Subhajit Mondal
Software Engineering

Working with video in HTML5

The HTML Video tag <video> embeds a media player which supports video playback into the document. We can use <video> for audio content as well, but the <audio> tag may provide a more appropriate user experience.

Subhajit Mondal Subhajit Mondal
Problems on Binary Tree

Binary Tree

A binary tree is a tree data structure in which each node has upto two children (that is a maximum of two children nodes), which are referred to as the left child and the right child. Implementation and applications of binary tree

Nisarg Shah Nisarg Shah
Software Engineering

Viewing and Changing IndexedDB contents of any website using Chrome DevTools

We will try to check the IndexedDB contents of a website using Chrome DevTools. (Using Firefox Developer Tools is also very similar.) We will add a few records and then try to view and update it using the DevTools.

Yash Kumar Yash Kumar
Software Engineering

Working with IndexedDB in HTML5

IndexedDB is a JavaScript-based object-oriented database which lets you store just about anything in the user's browser. It uses indexes to search data efficiently. DOM storage is good to use to store small amount of data like login session in a website but not for storing large amounts of data

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