JavaByPatel: Data structures and algorithms interview questions in Java

Technical blog and complete tutorial on popular company interview questions with detailed solution and Java program on Data structure, Algorithms, Time and space complexity, Core Java, Advanced Java, Design pattern, Database, Recursion, Backtracking, Binary Tree, Linked list, Stack, Queue, String, Arrays etc asked in companies like Google, Amazon, Microsoft, Facebook, Apple etc. for beginners and professionals.

Sunday, 31 March 2019

Check if a Binary Tree is a Mirror Image or Symmetric in Java.

›
Check if a Binary Tree is a Mirror Image or Symmetric.. Check if a given binary tree is a symmetric or you can also say check whether tr...
Saturday, 30 March 2019

Find Container with Most Water in Java

›
Find Container with Most Water. Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n ve...
Friday, 29 March 2019

Find Power of a Number using Recursion in Java

›
Find Power of a Number using Recursion in Java. Given two integers base and number, write a function to compute base^number.  Assume th...

Find length of longest substring without repeating characters in Java

›
Length of the longest substring without repeating characters in Java. Given a string, find the length of the longest unique substring. ...

Maximum consecutive one’s in a binary array

›
Find the maximum consecutive 1's in an array of 0's and 1's. And Find length of the longest consecutive One's in binary re...
Thursday, 28 March 2019

Find sum of digits of a number until sum becomes single digit

›
Find sum of digits of a number until sum becomes single digit. Given a non-negative integer, repeatedly add all its digits until the res...

Hamming distance between two Integers in Java.

›
Hamming distance between two Integers in Java. Given two integers, find the hamming distance between them.  Hamming Distance:   hamming...

Check if a binary tree is subtree of another binary tree

›
Check if a binary tree is subtree of another binary tree. Given two binary trees, check if the first tree is subtree of the second one. ...

Find element in a sorted array whose frequency is greater than or equal to n/2.

›
Find Majority Element in a Sorted Array in Java? OR  Find element in a sorted array whose frequency is greater than or equal to n/2. Giv...

Check Majority Element in a Sorted Array in Java.

›
Majority Element in a Sorted Array in Java? Given a sorted array, we need to find if a given x is a majority element. What is Majority...
‹
›
Home
View web version
Powered by Blogger.