Find number of customers who could not get any computer
Given an integer representing the capacity of a cyber cafe and a sequence representing entry/exit logs of customers, find the total number of customers who could not get any computer.
Ace your Coding Interview
Get hired by top tech companies with our comprehensive interview preparation.
Get StartedGiven an integer representing the capacity of a cyber cafe and a sequence representing entry/exit logs of customers, find the total number of customers who could not get any computer.
Given an array of words where no word is the prefix of another, find the shortest unique prefix to identify each word in the array uniquely.
Given a string and a positive integer k, find all distinct substrings of any length containing exactly k distinct characters.
Given a valid roman numeral, convert it to the corresponding integer value.
Given a string representing the column name in an Excel sheet, return the number corresponding to the Excel column name.
Given a string, find the minimum number of deletions required to convert it into a palindrome.
Given a string sorted in descending order, find all lexicographically previous permutations of it. In the lexicographic order, the words are arranged similarly as they are presumed to appear in a dictionary.
Given a string, check if it has a substring that can be used to construct the string by concatenating multiple copies of it.
Given two strings, where the second string is constructed using all characters of the first string except one, find the character that was skipped in the second string.
Given an infix expression, convert it to the postfix expression. Assume that the infix expression is a string of tokens without any spaces.
Given a dictionary of ancient origin where the words are arranged alphabetically, find the correct order of alphabets in the ancient language.
Given a linked list of strings, check whether the concatenation of all values in the list together forms a palindrome. It is not permissible to construct a string out of the linked list nodes and check that string for palindrome.