Check whether an undirected graph is Eulerian
Given an undirected graph, check whether it has an Eulerian path or not. In other words, check if it is possible to construct a path that visits each edge exactly once.
Ace your Coding Interview
Get hired by top tech companies with our comprehensive interview preparation.
Get StartedGiven an undirected graph, check whether it has an Eulerian path or not. In other words, check if it is possible to construct a path that visits each edge exactly once.
Given a sorted integer array, find the k closest elements to x in the array where k and x are given positive integers.
Given an integer array, trim it such that its maximum element becomes less than twice the minimum, return the minimum number of removals required for the conversion.
Write an efficient algorithm to reverse the specified portion of a given linked list.
Given an integer array, find the length of the longest subsequence formed by the consecutive integers. The subsequence should contain all distinct values, and the character set should be consecutive, irrespective of its order.
Given a string, find the minimum number of deletions required to convert it into a palindrome.
Given a linked list with each node having an additional random pointer that points to any random node of the linked list or null, update the random pointer in each linked list node to point to a node with maximum value to their right.
Given an array, count the total number of strictly increasing subarrays in it. A strictly increasing subarray has a size of at least 2.
Given an N × N matrix where each cell of the matrix (i, j) indicates the direct flight cost from the city i to city j. Find the minimum cost to reach the destination city N-1 from the source city 0.
This post will explore a threaded binary tree and convert a normal binary tree into a threaded binary tree.
Given a binary tree, check if it is a min-heap or not. In order words, the binary tree must be a complete binary tree where each node has a higher value than its parent’s value.
Given a linked list of characters, recursively check if it is palindrome or not.