Number of Islands Solution InterviewBit LeetCode

Coding Interview Questions

Number of Islands is a classic interview question asked in most of the interview questions. It’s a very frequent interview question that can test your knowledge of Depth First Search and Breadth-First Search. Question: Number Of Islands Given an m x n 2D binary grid grid which represents a map of ‘1’s (land) and ‘0’s (water), return the number of islands. An island is … Read more

Validate Binary Search Tree Solution

Coding Interview Questions

Validate Binary Search Tree is asked a lot in interview questions now a day. So, Today we will be discussing the algorithm and solution in Python, C++, and JAVA for this question. Question: Validate Binary Search Tree Given the root of a binary tree, determine if it is a valid binary search tree (BST). A valid BST is defined as … Read more

Two Sum Coding Interview Question – Solved

Coding Interview Questions

Two sum is one of the popular coding interview questions asked in many software engineering interviews. You can find this question on popular coding websites such as Hackerrank, LeetCode, and Interviewbit. Today we will be discussing the possible solution and algorithm related to this question. So, let see or understand the questions first. Question – … Read more

Minimum Coin Change Problem Dynamic Programming

Coding Interview Questions

Minimum Coin Change Problem in Dynamic Programming is the most asked frequently questions asked in Software Coding Interview. Today we will be looking at the solution to this problem. Coin Change – LeetCode You are given an integer array of coins representing coins of different denominations and an integer amount representing a total amount of money. Return the fewest number of … Read more

Serialize and Deserialize BST Solution

Coding Interview Questions

Serialize and Deserialize BST is the top interview coding question asked in Amazon, Facebook, Google, and Netflix. Today we will be discussing the algorithm required to solve this question. So, First, let see the question first. Question: Serialization is converting a data structure or object into a sequence of bits so that it can be … Read more

Rotate Array Coding Interview Solution

Coding Interview Questions

Rotate Array is a very famous coding interview question asked in the interview. We will discuss the solution in Python, C++, and JavaScript which you can solve in LeetCode if you want. Rotate Array LeetCode and InterviewBit Question. Given an array, rotate the array to the right by n steps, where n is nonnegative. Example … Read more

How to Solve Fizz Buzz Interview Question in Right Way

Coding Interview Questions

Fizz Buzz is a very popular interview question that is asked a lot in software engineering interviews. So we will be looking into the solutions of Fizz Buzz using Python, C++. Fizz Buzz Problem Statement: Write a program that outputs the string representation of numbers from 1 to n. But for multiples of three, it … Read more

Max Points on a Line From Given Points

Coding Interview Questions

This is a very common interview question asked on Facebook, Google, Microsoft, etc. Let’s get into the question first and then we can see the solutions of the problem Max Points on a Line. Question: Given n number of points on a 2D plane, find the maximum number of points in that which will lie … Read more

Valid Number LeetCode and Interviewbit solution guide

Coding Interview Questions

Question: Valid Number Validate if a given string is numeric. Some examples: “0” => true” 0.1 ” => true”abc” => false”1 a” => false”2e10″ => true Note: It is intended for the problem statement to be ambiguous. You should gather all requirements upfront before implementing one. Update (2015-02-10):The signature of the C++ function had been updated. If you still see your function signature accepts an const char * argument, please … Read more

Longest Substring Without Repeating Characters

Coding Interview Questions

Given a string, find the length of the longest substring without repeating characters. Examples: Given “abcabcbb”, the answer is “abc”, which the length is 3. Given “bbbbb”, the answer is “b”, with the length of 1. Given “pwwkew”, the answer is “wke”, with the length of 3. Note that the answer must be a substring, “pwke” is a subsequence and not a substring. Solution: Please see the below … Read more