Trapping Rain Water Problem Python JAVA C++ Solution

Coding Interview Questions

One of the most frequently asked software interview questions is the Trapping Rain Water Problem. In this post, I’ll go over the solution to the Trapping Rain Water problem, as well as the algorithm you can use to solve it. Question: Calculate how much water can be trapped after raining using n non-negative integers representing … Read more

How to Find Diameter Of Binary Tree?

Coding Interview Questions

Find Diameter of Binary Tree is the most frequently asked software interview question nowadays. It tests your skill and understanding of the Binary Tree and its height calculation. What is Diameter of the Binary Tree? The number of nodes on the longest path between two end nodes is the diameter (also known as width) of … Read more

Product of Array Except Self Python C++

Coding Interview Questions

Are you looking to solve and get the solution of Product of Array Except self? This is a very common interview question in the Software Engineering field by big companies. Question: Given an integer array numberArray, return an array result such that result[i] is equal to the product of all the elements of nums except  numberArray [i]. The product of any prefix … Read more

Find First And Last Position of Element in Sorted Array

Find First And Last Position of Element in Sorted Array

Find First And Last Position of Element in Sorted Array is a classic coding interview question asked by many big companies such as Google, Facebook, etc. This question is based on Binary Search. Given an array of integers sorted in ascending order, find the starting and ending position of a given target value. If target is not found in the … Read more

N-ary Tree Level Order Traversal Solution Python C++

Coding Interview Questions

N-Ary Tree level Order Traversal is a frequently asked question during a Coding Interview. It assesses your knowledge of Bread First Search by requiring you to solve the question using the iteration method. Otherwise, if the interviewer asked you to solve it using DFS, you must use recursion. In this post, I’ll go over the … Read more

Combination Sum: Python JAVA and C++ Solution

Combination Sum

Are you looking for the solution to the popular LeetCode and Interviewbit question Combination Sum? Learn the algorithm and solution for this question. I will be discussing the solution in all three languages such as Python, JAVA, and C++. If you need the solution in other languages then provide your suggestion in the comment box. … Read more

Binary Tree Preorder Traversal Iterative, Recursive

Coding Interview Questions

Being a Software Engineer you would have always been asked in most of the interviews to tell about Binary Tree Preorder traversal algorithm in Iterative and Recursive form. You can also find these questions on Leetcode.com and Interviewbit website. Since the Recursive method of Binary Tree Preorder is very easy. It becomes a little tedious … Read more

Longest Palindromic Subsequence LeetCode and InterviewBit Solution

Coding Interview Questions

Longest Palindromic Subsequence is the most asked dynamic programming question in a coding interview for FAANG. So, today we will be discussing the algorithm and how you can solve this question using DP in C++, JAVA, and Python. Question: Longest Palindromic Subsequence Given a string s, find the longest palindromic subsequence‘s length in s. A subsequence is a sequence that can … Read more

3Sum Solution Explained for LeetCode InterviewBit GeeksforGeeks

Coding Interview Questions

3Sum is one of the most frequently asked questions in software coding interviews. It tests your skills on the two-pointer algorithm. And if you are aware of two pointer algorithm then it must be easy to solve. In this post I will be discussing the two-pointer method and when you can use it to achieve … Read more

2 Ways to Reverse a Linked List in C++ JAVA and Python

Coding Interview Questions

Are you preparing for software coding interviews? Then how to Reverse a Linked List is the most common question asked by top software companies. And today I will be showing you three ways how you can reverse a Linked List in C++, JAVA, and Python. It’s fairly easy once you know the algorithm behind it. … Read more