Tag coding interview questions

Uncommon Words from Two Sentences using Python

Finding uncommon words in two sentences is one of the problems in coding interviews. In this problem, you have to find all the words that appear only once in two given sentences. So, if you want to know how toâ€¦

Transpose Matrix using Python

Transpose Matrix is one of the popular problems in coding interviews. This problem requires you to manipulate a matrix by flipping its rows and columns. So, if you want to know how to transpose a matrix, this article is forâ€¦

Buddy Strings using Python

Buddy Strings is a popular problem in coding interviews. In this problem, you need to check if it is possible to get two strings, different from exactly a swap of two letters. So, if you want to learn how toâ€¦

Binary Search using Python

Binary Search is an algorithm used to find an element in a sorted array by repeatedly dividing the search interval in half. In coding interviews, there is always a question on any search algorithm. So, if you want to learnâ€¦

Set Mismatch using Python

Set Mismatch is a popular question in coding interviews. In this problem, you need to find two numbers in an array that are missing or duplicated. So, if you want to know how to solve this problem using Python, thisâ€¦

Reorder Routes using Python

Reorder routes to make all paths lead to the city zero is a popular question in coding interviews. In this problem, you need to reorder the connections between the cities so that all paths lead to the city labelled asâ€¦

Detect Capital using Python

The problem of detecting capital is a popular question in coding interviews. A word is written in capital letters if all of its letters are uppercase or if only the first letter is uppercase and the rest are lowercase. Inâ€¦

Check Perfect Number using Python

The problem of checking perfect numbers is a popular coding interview question. A perfect number is a positive integer equal to the sum of its positive divisors, excluding the number itself. In this problem, you will be given an integer,â€¦

Relative Ranks using Python

The problem of relative ranks is a popular coding interview question. Here you will be given an array of integers representing the scores of athletes, assuming that the athletes with the 1st rank will have the highest score, and youâ€¦

The problem of License key formatting is a popular coding interview question. Here you will be given a license key, and you need to reformat the key such that each group contains the same characters except the first group. So,â€¦

Construct the Rectangle using Python

The problem of constructing a rectangle is a popular coding interview question. Here you will be given the area of a rectangle, and you need to return the height and width of the rectangle to solve this problem. So ifâ€¦

Max Consecutive Ones using Python

The problem of max consecutive ones is a popular coding interview question. Here you will be given a binary array, and you need to return the maximum number of consecutive 1s in the array. So, if you want to knowâ€¦

Hamming Distance using Python

The problem of hamming distance between two integers is a popular coding interview question. Here you will be given two integers, and you need to calculate the number of positions at which the corresponding bits of the integers are different. So, ifâ€¦

Repeated Substring Pattern using Python

The problem of the Repeated Substring Pattern is a popular coding interview question. Here you will be given a string, and you need to check if the given string can be formed by repeating a substring of the string. So,â€¦

The problem of assigning cookies is a popular coding interview question. Here you will be given a list of children with their greed factors and a list of cookies with their sizes. To solve this problem, you need to assignâ€¦

Number of Segments in a String using Python

The problem of counting the number of segments in a string is a popular coding interview question. Here you will be given a string, and you have to count the number of non-space characters in the string. So, if youâ€¦

Third Maximum Number using Python

The problem of finding the third maximum number is a popular coding interview question. Here you will be given an array, and you have to return the third largest number in the array as an output. So, if you wantâ€¦

FizzBuzz Problem using Python

The FizzBuzz problem is a popular coding interview question. Here you need to check if a number is divisible by 3 and 5 and return the output based on some conditions. If you want to know how to solve theâ€¦

First Unique Character using Python

The problem of finding the first unique character in a string is a popular coding interview question. Here you will be given a string, and you have to return the index of the first non-repeating character in the string asâ€¦

Valid Perfect Square using Python

Validating perfect squares is a popular coding interview question. Here you will be given an integer, and you have to check if the integer is a perfect square. So, if you want to learn how to validate perfect squares, thisâ€¦

Counting Bits using Python

Counting Bits is a popular coding interview question. Here you will be given an integer, and you have to return an array of length (length of the integer + 1) by counting the number of 1’s in the binary representationâ€¦

Power of Three using Python

The problem of the power of three is a popular coding interview question. Here we need to check whether the input value is the power of three or not. So, if you want to know how to solve this problemâ€¦

Move Zeroes using Python

Moving zeroes is one of the popular questions in coding interviews. Here we need to move all the 0’s in an array to the end of the array while keeping the order of non-zero elements the same. So, if youâ€¦

Ugly Number using Python

Ugly numbers are the numbers whose prime factors are limited to 2, 3, and 5. Finding the Ugly number is a popular question in coding interviews. Here you need to check if a number is an ugly number or not.â€¦

The problem of adding digits is a popular coding interview question. Here we need to add all the digits of the integer till we get to a single-digit integer. So, if you want to know how to solve this problem usingâ€¦

Power of Two using Python

The problem of Power of Two is a popular coding interview question. Here we need to check whether the input value is the power of two or not. So, if you want to know how to solve this problem using Python, thisâ€¦

Check Duplicate Values using Python

The duplicate values problem is a popular coding interview question. Here we need to check if any value appears at least twice in an array. So, if you want to know how to solve this problem using Python, this articleâ€¦

Majority Element using Python

The majority element problem is one of the popular coding interview questions. Here we need to find the element that appears more than the other element in an array. So, if you want to know how to solve this problem,â€¦

Excel Sheet Column Title using Python

The excel sheet column title is one of the popular coding interview questions. Here we need to return the corresponding column title of an integer as displayed in an excel sheet. So, if you want to know how to solveâ€¦

Single Number using Python

The Single Number problem is one of the popular coding interview questions. Here you will be given an array of integers where each item appears twice except for one that we need to find. So, if you want to know howâ€¦

Validate Palindrome Words using Python

Palindrome words are words that are read the same backward as forward. For example, mom, dad, and madam are palindrome words. Validating palindrome words is one of the popular coding interview questions. So, if you want to learn how toâ€¦

Best Time to Buy and Sell Stock using Python

Finding the best time to buy and sell stocks is one of the popular coding interview questions. Here we need to return the maximum profit we can achieve from buying and selling a stock. So, if you want to learnâ€¦

Pascal’s Triangle using Python

Pascal’s Triangle is one of the popular coding interview questions. It is asked in the coding interviews by FAANG companies many times. In Pascal’s Triangle problem, we need to return the number of rows of a Pascal’s Triangle. So, ifâ€¦

Plus One using Python

The Plus One problem is one of the popular coding interview questions. It is asked in the coding interviews by companies like FAANG many times. Here you need to increment the last digit of an array by one and returnâ€¦

Remove Duplicates from a Sorted Array using Python

Removing duplicate values from a sorted array is one of the popular coding interview questions. It is asked in coding interviews by companies like FAANG many times. Here you need to return an array of unique values by removing all theâ€¦

Merge Two Sorted Lists using Python

Merging two sorted lists is one of the popular problems in Leetcode. It is asked in coding interviews by companies like FAANG many times. Here you need to return a sorted list by merging two sorted lists. So, if youâ€¦

Longest Common Prefix using Python

Longest Common Prefix is one of the popular problems in Leetcode. It is asked in coding interviews by companies like FAANG many times. Here you need to return the longest common prefix among all the strings in an array ofâ€¦