Algorithms Find GCD of all elements in an array In this article, we have presented an algorithm to find the Greatest Common Divisor (GCD) of all elements of an array efficiently.
Software Engineering Essential components of Ruby: OOP, Data Types, Methods, Variables In this article, we have covered the essential components of Ruby such as OOP concepts like class and object, Data Types, Methods, Variables and much more.
System Design In memory Database [Explained] In memory Database is a type of Database that is stored in main memory (instead of hard disk) which makes to significantly fast (100X improvement) with some limitations.
Algorithms 132 Pattern Problem [Solved] In this article, we have explained what is 132 pattern problem and have discussed 3 different approaches to solve it in linear time O(N) where brute force approach takes O(N^3) time.
Data Structures Merkle Tree [Explained] Merkle tree is named after Ralph Merkle, it is a tree data structure where non-leaf nodes are a hash of its child nodes and leaf nodes are a hash of a block of data. This is an USPTO patented Algorithm.
Data Structures Cuckoo filter [Explained] A cuckoo filter is a probabilistic data structure that is used to test whether an element is a member of a set or not. It is similar to the Bloom filter.
Time Complexity Time & Space Complexity of Selection Sort In this article, you will learn about Time Complexity and Space Complexity of Selection Sort algorithm along with the complete mathematical analysis of the different cases.
Algorithms Check if a string is a subsequence of another string In this problem, we will see how we can check whether a string is a subsequence of another string. We have solved this in O(N) time using an efficient approach.
List of Mathematical Algorithms Equilibrium Index: Find index such that sum of left sub-array = right sub-array For a given array, we need to find an index such that sum of left sub-array = right sub-array also called the Equilibrium Index. We solve this using brute force approach O(N^2) and using prefix array in linear O(N) time.
Algorithms Finding LCM of an array of numbers Find the LCM of the given array of positive numbers. We have explored 2 approaches: one using GCD and other without using GCD.
Software Engineering Fixed width integer types (int8) in C++ C99 has defined a set of fixed-width integers that are guaranteed to have the same size on any architecture. These can be found in stdint.h header. This enables to use INT8 in C++.
Algorithms Finding 2 elements with difference k in a sorted array This article discusses how to check the existence of and find 2 elements with difference k in sorted array. We have explored 3 approaches and solved it in linear time O(N).
Algorithms Minimum number of nodes to be removed such that no subtree has more than K nodes The article contains editorial + implementation for Finding minimum number of nodes to be removed such that no sub tree has more than K nodes.
Algorithms Number of substrings with exactly k distinct characters In this problem, we are given a string and our job is to count the total number of substrings of the given string that contains exactly k distinct characters. We have explored 3 approaches to solve this.
Algorithms Different ways to sort a Queue We will be discussing 4 different ways to sort a queue. This involves sorting a Queue using auxiliary array, O(1) space, using recursion and using a stack.
Software Engineering endl vs \n (New Line) in C++ In C++, endl and /n are used to break lines or move the cursor to a new line. Both endl and \n may seem to be similar but has distinct differences which we have explored in this article in depth.
Software Engineering Regular Expression (Regex) in Python We have explained Regex in Python in depth. Everyone has used the feature of CTRL+F to find some text in documents, Regex also known as Regular Expression is advance form of that it allows the user to search for a pattern defined by him/her in the given set of input.
Algorithms Implementing two stacks in one array We will demonstrate how to implement 2 stacks in one array. Both stacks are independent but use the same array. We need to make sure one stack does not interfere with the other stack and support push and pop operation accordingly.
Algorithms Reverse first K elements of Queue using Stack To reverse the first K elements of a queue, we can use an auxiliary stack. We push the first k elements in the stack and pop() them out so and add them at the end of the queue.
Algorithms Time Complexity of Insertion Sort The average code and worst case time complexity of Insertion Sort is O(N^2) and the best case time complexity is O(N). The space complexity is O(N) for N elements.
Software Engineering Set vs Map containers in C++ This article is to discuss the difference between a set and a map which are both containers in the Standard Template Library in C++.
Software Engineering How to phish? or Phishing Campaigns We have explored the basic idea behind Phishing and different types like Email Phishing, Spear, Clone, Page and Web Page Phishing.
Algorithms Intersection point of two linked lists Given two linked lists, where the tail of the second list points to a node in the first list, find the node where both the lists intersect. We need to find the intersection point.
Software Engineering Different ways to insert elements in Deque in C++ We have explored different ways to insert elements in Deque in C++ such as deque::push_back(), insert(), assign(), emplace(), swap() and much more.
Software Engineering Flask API using Flask RestFul We will be developing a flask API using flask restful in which we will be performing all the basic CRUD operations.