Algorithms Longest substring without repeating characters In this article, we have explained three approaches to the problem of finding Longest substring without repeating characters. This involves the use of Hash Map with the clever use of start and end index.
Algorithms Integer to Roman Numeral Conversion In this article, we have presented the algorithm to Convert Integer to Roman Numerals along with C++ implementation and step by step implementation.
Algorithms Closest 3 Sum problem (Find all triplets close to the given sum) In this article, we have explored an insightful approach/ algorithm to find the 3 elements in an array whose sum is equal to or close to the required answer. This is an extension of the 3 Sum problem where the resulting sum needed not be exact.
Software Engineering Get CO2 emission data using Carbon Intensity API In this article, we have explored how to get CO2 emission data for a specified time period and for specific location. For this, we have used Carbon Intensity API and have implemented the code in Python.
Algorithms Number of Ordered Solution Pairs (X, Y) satisfying 1/X + 1/Y = 1/N We have explored two insightful approaches/ algorithms to find the Number of Ordered Solution Pairs (X, Y) satisfying 1/X + 1/Y = 1/N. This problem is used extensively in Astrophysics.
Algorithms Different ways to calculate Pi (3.14159...) We have covered different algorithms and approaches to calculate the mathematical constant pi (3.14159...). These include Nilakantha Series, Leibniz’s Formula, Ramanujan's Pi Formula and other Programming Language specific techniques.
Algorithms Median of two sorted arrays In this article, we have presented 3 Algorithms to find the Median of two sorted arrays efficiently in logarithmic time. This involves a clever use of Binary Search algorithm.
Algorithms Two Sum Problem: Check if pair with given sum exists [Solved] In this article, we have explained different approaches to solve the Two Sum Problem using techniques like Binary Search, Hash Map and others.
Algorithms Hill Climbing Algorithm We will learn how the hill climbing algorithm works for local searching. This algorithm is a heuristic search algorithm, a concept prominently explored in areas of Artificial Intelligence (AI).
Algorithms Bin Packing problem Bin Packing problem involves assigning n items of different weights and bins each of capacity c to a bin such that number of total used bins is minimized. It may be assumed that all items have weights smaller than bin capacity.
Data Structures Data Structure with insert and product of last K elements operations We have presented 2 designs for Data Structure with insert and product of last K elements operations. Both operations can be done in constant time O(1).
Algorithms Intersection of two arrays We have explored several approaches to find Intersection of two arrays efficiently. This involve techniques like sorting, binary search, hash map and much more.
List of Mathematical Algorithms Number of integers between 1 and N that are coprime to N We have explored efficient approaches to find Number of integers between 1 and N that are coprime to N. We have presented the idea of Euler φ (phi) function and is an important topic to get hold on Mathematical Algorithms.
Algorithms Fast and slow pointer technique in Linked List We have explained Fast and slow pointer technique in Linked List which is also known as tortoise and hare algorithm. It is used to efficiently solve several problems by using two pointers.
Algorithms Finding the twin primes up to N (Twin Prime Conjecture) We will learn about prime numbers and the twin prime conjecture. We will also look at an efficient algorithm for finding the first twin prime pairs up to a number N.
Algorithms Implement Bubble sort in a list in Python We have explained the basic of Bubble Sort along with a detailed explanation of Python implementation of Bubble Sort in a list.
Algorithms Count total set bits in all numbers from 1 to N We have presented an efficient approach to find the total number of set bits in all numbers from 1 to N in O(logN) time by deriving a pattern and a formula.
Algorithms Integer Factorization Algorithms We have explored in great detail some of the different factorization algorithms for Integers such as Trial Division, Pollard's rho algorithm, Dixon's algorithm and Quadratic Sieve.
Algorithms Longest Increasing Consecutive Subsequence We have to find the Longest Increasing Consecutive Subsequence in N elements. We can solve this problem efficiently using Dynamic Programming in O(N) time.
Algorithms Find Peak Element in an Array We have explained the problem of finding Peak Element in an Array along with different approaches to solve it efficiently.
Data Structures Design data structure that support insert, delete and get random operations We will understand in depth the designing of a data structure that supports "insert value", "delete value" and "get random" operations where these tasks are performed in constant time O(1).
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.
Software Engineering __builtin_popcount and POPCNT We have explored about __builtin_popcount - a built-in function of GCC, which helps us to count the number of 1's(set bits) in an integer in C and C++. POPCNT is the assembly instruction used in __builtin_popcount.
Algorithms Applications of XOR operation We will begin with a brief introduction of what the XOR operation is, followed by its syntax in C++ and its applications such as memory-optimized doubly linked lists, swapping, XOR ciphers, Comparing two values, Gray codes and Partiy check.
Algorithms Adding 2 integers as linked lists We will represent an Integer as Singly Linked List and define an addition algorithm to add two integers as Linked Lists. This is used to add very large integers which is not stored in existing data types.