In this post, we will see where is java installed on mac. If you have the following questions, then this post will help you. What version of Java do I have How to check Java …

In this post, we will see how to program FizzBuzz in java. Fizzbuzz is a fun game played generally by school children.It is simple game in which when your turn comes, you need to say …

In this post, we will implement isPrime method. isPrime method will take an integer as input and determine whether the number is prime or number. A prime number is a number which has only two divisors …

We have already seen random number generator in java.In this post, we will address specific query on how to generate random number between 1 to 10. We can simply use Random class’s nextInt() method to achieve …

In this post, we will see how to sort an array of 0s, 1s and 2s.We have already seen a post on sort 0s and 1s in an array. Problem Given an array containing zeroes, …

In this post, we will discuss Could not find or load main class. Did you get this error before? If you have good amount of experience in Java programming or as a novice java developer, …

In this post, we will see how to print the following pyramid pattern. Problem Input : n = 4 Output : 1 3*2 4*5*6 10*9*8*7Input : n = 5 Output : 1 3*2 4*5*6 10*9*8*7 …

Problem Given an array with positive integers as elements indicating the maximum length of a jump which can be made from any position in the array. Check if it is possible to have …

In this post, we will see how to find Inorder Successor in a Binary Search Tree. Table of ContentsProblemSolutionAPPROACH – I :Approach – II: Problem Given a Binary Search Tree and a target node value. …

In this post, we will see about how to find Lowest Common Ancestor of a K-ary Tree in O(Sqrt(height)).We have already seen how to find LCA of n-ary tree in O(n) complexity. Problem Given a …