Count distinct absolute values in a sorted array
Given an array of sorted integers that may contain several duplicate elements, count the total number of distinct absolute values in it.
Ace your Coding Interview
Get hired by top tech companies with our comprehensive interview preparation.
Get StartedGiven an array of sorted integers that may contain several duplicate elements, count the total number of distinct absolute values in it.
Given a string and a pattern, determine if the pattern matches with the string or not. The solution should not use any regex.
This post covers memory-efficient implementation of Trie data structure in C++ using the map data structure. Trie is a tree-based data structure, which is used for efficient retrieval of a key in a large dataset of strings.
Given an M × N boggle board, find a list of all possible words that can be formed by a sequence of adjacent characters on the board.
Find duplicate rows present in a given binary matrix by traversing the matrix only once.
Trie is a tree-based data structure used for efficient retrieval of a key in a huge word set. In this post, we will implement the Trie data structure in Java.
Trie is a tree-based data structure used for efficient retrieval of a key in a huge set of strings. In this post, we will discuss Python implementation of Trie data structure which supports insertion and search operations.
Given an integer array, check if it contains a subarray having zero-sum.
Given an integer array with all its elements between 1 and n except two elements, which occur twice. Find two duplicate elements without using any extra memory in linear time.
Given an integer array, find a subarray having a given sum in it.
Given an integer array, find the largest subarray formed by consecutive integers. The subarray should contain all distinct values.
Given a limited range array of size n and containing elements between 1 and n-1 with one element repeating, find the duplicate number in it without using any extra space.