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

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 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 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 embeds a media player which supports video playback into the document. We can use for audio content as well, but the 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
Algorithms

Greedy approach to find a single maximal clique in O(V^2) time complexity

There can be more than one single maximal clique in a non-complete graph (since complete graph is a maximal clique itself). To find a single maximal clique in a graph we use a straightforward greedy algorithm in O(V^2) time complexity

Sadanand Vishwas Sadanand Vishwas
Algorithms

Johnson Algorithm to find the shortest paths between all pair of vertices

Johnson Algorithm is used to find shortest paths between every pair of vertices in a given weighted directed graph and here weights may be negative. Johnson Algorithm uses both Dijkstra and Bellman-Ford algorithms as subroutines.

Nisarg Shah Nisarg Shah
Algorithms

Divide numbers from 1 to n into two groups with minimum sum difference from O(2^N) to O(N)

For numbers from 1 to given n, we have to find the division of the elements into two groups having minimum absolute sum difference. We will explore two techniques Brute force which will take O(2^N) time complexity and Greedy algorithm which will take O(N) time complexity

Arvind Tatiparti
Algorithms

Using Bron Kerbosch algorithm to find maximal cliques in O(3^(N/3))

Bron–Kerbosch algorithm is an enumeration algorithm for finding maximal cliques in an undirected graph. Any n-vertex graph has at most 3^n⁄3 maximal cliques, and the worst-case running time of the Bron–Kerbosch algorithm (with a pivot strategy) is O(3^n⁄3).

Sadanand Vishwas Sadanand Vishwas
Algorithms

Centroid Decomposition of Tree

Centroid Decomposition is a divide and conquer technique which is used on trees. Given a tree with N nodes, a centroid is a node whose removal splits the given tree into a forest of trees, where each of the resulting tree contains no more than N/2 nodes.

Sadanand Vishwas Sadanand Vishwas
Algorithms

Clique in Graphs

A clique is a subset of vertices of an undirected graph G such that every two distinct vertices in the clique are adjacent; that is, its induced subgraph is complete. Cliques are one of the basic concepts of graph theory and are used in many other mathematical problems and constructions on graphs.

Sadanand Vishwas Sadanand Vishwas
Algorithms

Solving Vertex Cover Problem from O(2^n) to O(n^2)

Vertex Cover Problem is a known NP Complete problem. We will see Naive approach and Dynamic programming approach to solve the vertex cover problem for a binary tree graph and reduce the complexity from O(2^n) to O(n^2).

Sadanand Vishwas Sadanand Vishwas
Machine Learning (ML)

Understand Learning Rate by a Child's interaction with Dogs

Learning rate (Ī») is one such hyperparameter that defines the adjustment in the weights of our network with respect to the loss gradient descent. It determines how fast or slow we will move towards the optimal weights

Aditya Rakhecha Aditya Rakhecha
Data Structures

Max Heap and Min Heap

A min heap is a heap where every single parent node, including the root, is less than or equal to the value of its children nodes. The most important property of a min heap is that the node with the smallest, or minimum value, will always be the root node. Max heap is similar

Rupali Kavale Rupali Kavale
Software Engineering

How to handle Exceptions in Python?

We should handle the exception and prevent the program from crashing and this is supported in Python. We will learn about try except block, the optional else block and Finally block which makes sure a code section runs irrespective of exceptions.

Sonal Agrawal Sonal Agrawal
Software Engineering

For Loop in Python

We are going to discuss about the for loop in Python and answer the following questions: Can a For loop print the elements of a List and Tuple? Can a For Loop be used for a String? Can for loops be nested? How to use Range function in For loop? How are Continue and Break Statements used in For Loop?

Tanmayi Patibandla Tanmayi Patibandla
Software Engineering

Yield in Python

The yield statement suspends function’s execution and sends a value back to caller, but retains enough state to enable function to resume where it is left off. What are generators? What is yield? Difference between return and yield Where is yield used?

Gautam Aggrawal Gautam Aggrawal
Software Engineering

Switch Case in Java

A switch statement in Java allows an expression to be tested for equality against a list of values. Java SE 7 and later, the support for a String object is also available with switch case. We explore the basics of it like break, default statements and syntax rules

Yash Kumar Yash Kumar
Software Engineering

Explaining Classes in Python by designing a Dog

Classes are the building blocks of object oriented programming and since python is an object oriented language it supports classes implicitly. Classes give us a way to model real world objects. They combine data and functions into one entity.

Sonal Agrawal Sonal Agrawal
Machine Learning (ML)

Using ID3 Algorithm to build a Decision Tree to predict the weather

ID3 algorithm, stands for Iterative Dichotomiser 3, is a classification algorithm that follows a greedy approach of building a decision tree by selecting a best attribute that yields maximum Information Gain (IG) or minimum Entropy (H). We will use it to predict the weather and take a decision

Nidhi Mantri Nidhi Mantri
Software Engineering

Working with Strings in Java

In Java, strings are treated as objects of class String. Strings are immutable objects which means they are constant and cannot be changed once it has been created. How to create a string in Java? Does String class has a Constructor? How to compare Strings in Java? How to search a string in Java?

Rupali Kavale Rupali Kavale
OpenGenus IQ © 2026 All rights reserved ā„¢ [email: team@opengenus.org]
Top Posts LinkedIn Twitter