Learn Java and Programming through articles, code examples, and tutorials for developers of all levels.
How to Search an Element in Java Array with Example? ArrayUtils Tutorial
[Solved] How to solve a coin change problem in Java? Example
The coin change problem is one of the popular coding interview question and knowing how to solve this problem can help you during coding interview. It's also useful to learn a couple of tricks and data structure. This problem somewhat has to do with arrays, so we shall be discussing what an array is, But before we dive into this. we need to understand the problem. We are about to solve a coin problem by determining how many possible ways an amount can be paid. Suppose, Mary is a Businesswoman who deals with coin change.
[Solved] How to find all pairs which add up to a given value in an Integer Array in Java? Example
[Solved] How to Find 2 Largest Number from Integer Array in Java with Example
How to calculate sum of all numbers in a given array in Java [Example]
How to find median of two sorted arrays in Java? Example Tutorial
Hello friends, we meet again on our journey of Java and the ocean of knowledge. I am sure you guys must be very excited about today's lesson as today we will deep dive into something that makes everyone's head scratch, yes, we will talk about a popular coding problem. So friends, get ready to scratch your head, learn something, code a few things, and use some of your grey cells (Agatha christie fans rejoicing in the back :p). So friends, today's topic is coding and we will take on one of the most famous and difficult problems. Today we will learn how to find the median of two sorted arrays. seems easy right? Wait a bit, I will make sure you learn something new and make it a bit of a challenge :D
Top 22 Array Concepts Interview Questions Answers in Java
How to get the first and last item in an array in Java? Example Tutorial
Difference between array and Hashtable or HashMap in Java
A couple of days back someone asked me about the difference between an array and a hashtable, though this is a generic data structure and programming question, I'll answer it from both a general programming perspective as well on Java perspective where Hashtable is not just a data structure but also a class from Java Collection API. Even though both array and hashtable data structure are intended for fast search i.e. constant time search operation also known as O(1) search, the fundamental difference between them is that array require an index while hash table requires a key which could be another object.