Given an array arr[ ] of n integers, are there elements x, y, z in arr such that x + y + z = 0? Find all unique triplets in the array which gives the sum of zero. The problem is asked in many interviews and required do be solved in O(n^2) with constant space.
Data structures are widely used in every aspect of computer science. Data structures are the way of organizing and storing data in a computer so that it can be used efficiently. In this blog, we will look into data structures, its types, operations and applications.
Heap is a very useful data structure that every programmer should know well. The heap data structure is used in Heap Sort, Priority Queues. The understanding of heaps helps us to know about memory management. In this blog, we will discuss the structure, properties, and array implementation of heaps.
Priority Queues are similar to queues where we insert an element from the back and remove an element from the front, but with one difference that the logical order of elements in the priority queue depends on the priority of the elements. In this blog, we will discuss the priority queues, its properties, its various implementations, and its applications. We will also analyze and compare the various implementations of the Priority Queue.
Heap is a very useful data structure that every programmer should know well. The heap data structure is used in Heap Sort, Priority Queues. The understanding of heaps helps us to know about memory management. In this blog, we will discuss various operations that are done on heaps.
This is an interview problem asked by companies like Myntra, Visa, Oracle, Adobe, etc. The problem is to remove the duplicate nodes from the given Linked List so that only unique nodes(with unique data values) are present.
Given an integer, your task is to find the square root of the integer. For an integer x to be the square root of the given integer N, x*x must be equal to N. This is an interview problem asked in companies like Amazon, Microsoft and Facebook.
In this blog, we will learn about the time and space complexity of an Algorithm. We will learn about worst case, average case, and best case of an algorithm. We will also see various asymptotic notations that are used to analyse an algorithm. So, let's learn the algorithm of an algorithm.
This is an interview problem asked in companies like Microsoft, Amazon, Adobe, Flipkart, etc. Here, we need to implement Queue data structure using another data structure Stack. This problem is meant for testing the data structure knowledge.
Tree Data Structure supports various operations such as insertion, deletion and searching of elements along with few others. This blogs discussed those operations along with explaining its applications.
Given a Linked List, your task is to find whether the given singly linked list is a palindrome or not. This is an interview problem asked in many companies like Amazon, Microsoft, Adobe, Flipkart and other big companies.
Array and Linked List are the two most used data structures. It's really important to understand and compare the advantages and disadvantages of both array and linked list. In this blog, we will compare these two linear data structures. So let's get started.
The idea of this blog is to discuss the famous data structure called Array. An Array is one of the important data structures that are asked in the interviews. So, we will learn about arrays and we will also discuss about the idea of the dynamic array and its amortized analysis. So let's get started.
Iteration and Recursion are programming methodologies with similar objective and thus one might seem trivial compared to another, but that's not the case. We will be discussing the important differences between iteration and recursion and how both are useful.
Given an array where elements are sorted in ascending order, convert it to a height balanced BST. For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node never differs by more than one.
Given a binary tree, invert the binary tree and return it. An inverted form of a Binary Tree is another Binary Tree with left and right children of all non-leaf nodes interchanged. You may also call it the mirror of the input tree.
Given two strings S1 and S2 of size m and n respectively, you need to check whether the two strings are an anagram of each other or not. S1 is an anagram of S2 if the characters of S1 can be rearranged to form S2.
Given two integer array A and B of size m and n(n <= m) respectively. We have to check whether B is a subset of A or not. An array B is a subset of another array A if each element of B is present in A. (There are no repeated elements in both the arrays)
Given two integer arrays A and B of size m and n, respectively. We need to find the intersection of these two arrays. The intersection of two arrays is a list of distinct numbers which are present in both the arrays. The numbers in the intersection can be in any order.
All over the world, millions of students are looking forward to pursuing a career in the field of computer science. Though a lot of learning resources are available online, still, most of the students are struggling to become good at it and crack the interview.