How to Remove all adjacent duplicates characters from String in java? Example Tutorial

Hello guys, if you are wondering how to remove adjacent repeated characters or duplicates from a given String in Java then you have come to the right place. In the last article, we have seen how to find duplicate characters as well as how to remove duplicate characters from String in Java, and in this article, we will take that topic to another level and remove adjacent duplicates from given String. This topic gives another perspective to removing duplicates in a word or phrase. Probably before now, you are familiar with removing duplicates from a word or phrase, or number. But this topic gives a detailed understanding of how to remove adjacent duplicates. 

How to Perform Binary Tree InOrder traversal in Java using Recursion? Example Tutorial

The InOrder traversal is one of the three popular ways to traverse a binary tree data structure, the other two being the preOrder and postOrder. During the in-order traversal algorithm, the left subtree is explored first, followed by root, and finally nodes on the right subtree. You start traversal from root then go to the left node, then again go to the left node until you reach a leaf node. At that point in time, you print the value of the node or mark it visited and move to the right subtree. Continuing the same algorithm until all nodes of the binary tree are visited. The InOrder traversal is also known as the left-node-right or left-root-right traversal or LNR traversal algorithm.

Java Program to find Armstrong numbers with Example

Armstrong number Example in Java
How to check if a number is an Armstrong number or not? or write a Java program to find Armstrong's number? This is a common Java interview question asked on-campus interviews and fresher-level interviews. This is also a popular Java programming exercise on various schools, colleges, and computer courses to build programming logic among Students. An Armstrong number is a 3 digit number for which the sum of cube of its digits is equal to the number itself. 

How to Find Square Root of a Number in Java [Solved] - Example Tutorial

Java program for a square root or a number in Java
How to write a Java program to find the square root of a number is a common Java programming exercise that many institutes use in their Java course along with Java program to print Fibonacci series and How to find Armstrong numbers in Java, which we have seen earlier.  Java program for the square root is also a popular question during college semester exams and various programming tests. 

How to implement Binary Tree PreOrder Traversal in Java without Recursion? [Solved] Example Tutorial

This is my second article on how to implement binary tree pre-order traversal in Java. In the first part, I have shown how to traverse a binary tree with a pre-order traversal algorithm using Recursion, and in this article, you will learn how to implement pre-order traversal without using Recursion. You might be thinking that why do you need to learn the iterative solution if a recursive solution is possible and easy to write? Well, this type of question is mostly asked in Programming Job interviews and Interviewers like to see how comfortable a candidate is with both Recursion as well as using other data structures and iteration.

[Solved] 3 Examples to reverse an Array in Java - Example Tutorial

Hello guys, today we are going to see another common coding question from interviews - how do you reverse an array in Java? This is a popular array-based coding problem and often asked programmers during the first few rounds of interviews to check if they can code or not. Well, there are multiple ways to solve this problem and we will see three common ways to ever an array in Java. This method applies to all kinds of arrays like string array or integer array or even with arrays of objects because it's not focused on data types. The first way to reverse an array is by reversing it in a brute force way, without using any additional data structure or library method. 

How to Find Even and Odd Number in Java - Program Tutorial Example

Even and Odd number check Java Example
There are many ways to find if a number is even or odd in Java but before moving into technical details on finding even and odd numbers in Java let's what is even and odd numbers in terms of Mathematics. Any number which is completely divisible by 2 is called an even number while a number that is not completely divisible by 2 is called an odd number. If you think in terms of remainder then in the case of even number, the remainder is zero while in the case of odd number remainder will be 1. zero is considered as an even number in maths. 

How to Find Missing Number in a Sorted Array in Java [Solved]

Today's coding problem is not very new, it's an age-old classic Programming interview Question. You have a sorted array containing n - 1 unique number starting from 0 to n - 1. There is only one number missing in this range and you need to find that out. I mean you need to write a Java method to find the missing number and print its value in the console. Some of you might have seen this question before, but if you have not been asked this question before, what is the first approach comes into your mind to solve this question? Since only one number is missing, many programmers come up with the approach of iterating over the array, and comparing each element with the expected one like the first element should be 0, the second element should be 1, and so on.

How to Count number of 1s (Set Bits) in a binary number in Java [Solved]

Good morning folks, In today's article, we are going to discuss one of the frequently asked bit manipulation-based interview questions, how do you count the number of set bits in a given bit sequence?  Bit Manipulation is an important topic in programming interviews and a good programmer should have sufficient knowledge and skill to work with binary numbers. This kind of question tests the skill of the programmer. Sometimes, it is also asked as to how to count the number of 1s (ones) in a given number? Both are the same question because 1 is also known as set bit.  For example, if the given input is 1000110010 then your program should return 4, as three are only four set bits in this bit sequence.

How to Print Pyramid Pattern in Java? Program Example

Pattern based exercises are a good way to learn nested loops in Java. There are many pattern based exercises and one of them is printing Pyramid structure as shown below:


* * 
* * * 
* * * * 
* * * * * 

You need to write a Java program to print the above pyramid pattern. How many levels the pyramid triangle would have will be decided by the user input. You can print this kind of pattern by using print() and println() method from System.out object. System.out.print() just prints the String or character you passed to it, without adding a new line, useful to print stars in the same line. 

Top 5 Courses to learn UML for Software Design and Development in 2025 - Best of Lot

Hello friends, we are here again today for another exciting topic to discuss. But, today we are not gonna discuss something which is related to Java or any other language or spring boot. Today we are gonna discuss something which is immensely practical and very important skill if you want to grow as programmer and become a tech lead or Software architecture. Yes, you guessed it right, today we are going to talk about UML (Unified Modeling Language). Modeling is a process to communicate your design which is in your mind to other people in your team like developers, architect via diagram. This is one of the most important skill if you want to become Software architect in 2025

My Favorite Courses to learn React.js in Depth in 2025 - Best of Lot

Hello guys, if you want to learn React.js in 2025 and looking for the best resources like books, online courses, tutorials, and guides, then you have come to the right place. In the past, I have shared the best free React.js courses, best React books, websites, projects, and even a complete React.js Developer RoadMap and in this article, I am going to share the best online courses to learn React.js in 2025.  You've come to the correct spot if you're a web developer or someone who is passionate about web development and want to learn React or React JS, a popular JavaScript framework for developing a component-based user interface.

Top 10 Free Git Courses for Programmers and DevOps in 2025 - Best of Lot

Hello guys, there is no doubt that Git is one of the most essential tool and skill for every programmer and Software developer. Gone are the days where different companies uses different version control like SVN, CVS, or TFS, now almost every company uses Git which has become the standard source repository and version control tool. That's why its important for every programmer to learn Git and it's not that easy. Git is a distributed version control system and there are things like remote repository, local repository, commit, pull, push, fetch, rebase, merge etc which can be confusing to many programmers and that's why I am going to share best free Git courses you can join to learn Git in 2025.

Top 5 Free Coursera Courses for SQL and Database in 2025 - Best of Lot [UPDATED]

Hello guys, if you want to learn SQL and Database and looking for best free resources like books, online courses and websites then you have come tot he right place. Earlier, I have shared best SQL courses, SQL books, and best websites to learn SQL and in this article, I am going to share best free SQL courses from Coursera, one of the best place to learn technical skill from world's top university and companies online. While many people are familiar with Coursera courses and certifications then don't know that most of the Coursera courses can be taken for free-to-audit where you can watch them for free without enrolling on specialization or professional certification. Only thing is you don't have access to quizzes and exercise sand you don't get certificate but you can still learn from worlds' top trainers and instructors. 

Top 6 Online Courses to Learn CSS, Flexbox, Grid, and Sass in 2025 - Best of Lot

Hello guys, Along with HTML and JavaScript, CSS is one of the core technologies of the World Wide Web (WWW) and critical skills for anyone who wants to start their career in web design and web development. No website in the modern world is complete without CSS, and it is safe to say, no one can become a complete web developer without CSS. If you want to learn advanced CSS concepts like Flexbox, Grid, and SaaS and looking for the best online courses, then you have come to the right place. In the past, I have shared some free courses to learn CSS basics and Bootstrap, one of the most popular CSS frameworks for styling web pages, and today I will share advanced CSS courses to learn Flexbox and Grid.

10 Best Coursera Web Development Courses and Projects for Beginners in 2025

Hello guys, if you are looking for the best web development courses and projects on Coursera to join in 2025, you have come to the right place. Earlier, I have shared the best Coursera courses to learn about Cloud Computing,  Software Development, and Data Science. Today, I will share the best Coursera courses and projects one can join to learn Full-stack Development and essential web development skills to become a professional web developer in 2025. The best thing about these Coursera courses and projects is that you can join them with Coursera Plus, which means you don't need to buy them individually. If you have a Coursera Plus subscription, you can enter all these courses without extra cost. 

Top 20 Machine Learning Libraries for AI Engineers in 2025 - Best of Lot

 Artificial Intelligence (AI) has emerged as a transformative technology, revolutionizing various industries and driving innovation. With the increasing accessibility of AI, numerous free tools have become available, enabling individuals and businesses to explore and leverage AI capabilities. In this article, we present the top 20 free Machine Learning libraries to try in 2025. These tools cover a wide range of AI applications, including machine learning, natural language processing, computer vision, and more. Let's dive into the exciting world of AI tools and discover how they can empower innovation and automation.

Top10 Platforms for Freelance Writing and Earning Money in 2025 - Best of Lot

Are you a writer looking to make some extra cash on the side? Or are you a full-time freelance writer looking for new platforms to expand your portfolio and find more clients? Look no further! Here are 10 platforms that can help you earn money as a freelance writer. Freelance writing is a great way to earn money on the side or even as a full-time career. With the rise of the internet and the increasing demand for content, there are now many platforms that connect businesses with freelance writers.

In this article, we will introduce you to 10 platforms that can help you earn money as a freelance writer. Whether you are a beginner looking for your first writing gig or an experienced writer looking for new opportunities, these platforms have something to offer.

How to call REST API an send HTTP GET and POST Request using cURL command in Linux? Example Tutorial

The curl or cURL command of Linux is a compelling and versatile command which allows you to send sophisticated HTTP requests right from your Linux command line window. You can use the cURL command to test your RESTful Web Services by sending GET and POST requests, doing authentication, saving a cookie in the file, etc. The curl command is, in fact, the go-to tool for many Java and Spring developers working in web applications and consuming data from the secured RESTful Web Services. Still, you can also use it to test your simple REST Web APIs without security. I have used it many times to check if our Web service is up or not, or is there any error while accessing those services.