Courses
Tutorials
Interview Prep
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
Similar Topics
Web Technologies
32.1K+ articles
Python
19.6K+ articles
Java
9.4K+ articles
Misc
7.7K+ articles
C++
3.8K+ articles
Python Programs
3.7K+ articles
Difference Between
3.1K+ articles
Solidity
112+ articles
Blockchain
92+ articles
java-swing
63+ articles
Programming Language
/
Java
Java
9.4K+ posts
Recent Articles
Popular Articles
StringBuffer and StringBuilder Methods
Last Updated: 31 January 2026
In Java, strings are immutable, meaning their values cannot be changed once they are created. To support efficient string manipulation, Java provides mutable classes like ...
read more
Java
Sort students by marks in Java
Last Updated: 30 January 2026
The arrays roll[] and marks[] store student roll numbers and their corresponding marks. The objective is to reorder the roll numbers such that they follow the descending o...
read more
Java
Meeting Maximum Guests in Java
Last Updated: 29 January 2026
Given two arrays, arr[] and dep[] representing the arrival and departure times of guests at a party, where each arrival corresponds to a departure at the same index, the g...
read more
Java
Sort an Array According to Another Array in Java
Last Updated: 29 January 2026
Given two arrays of equal size, an integer array a[] and a character array b[], each character is associated with an integer at the same index.Sort the character array b[]...
read more
Java
The thief problem in Java
Last Updated: 29 January 2026
Given an array arr[] and an integer K, find the maximum possible sum of any K elements.Examples:Input: arr[] = {3, 7, 2, 5, 12, 30}, K = 3 Output: 49Explanation: Pick 30, ...
read more
Java
Keeping indexes after sorting in Java
Last Updated: 28 January 2026
Given an integer array, sort its elements in ascending order while retaining and displaying their original indexes, ensuring the initial positions of elements are preserve...
read more
Java
Comparator Methods and Examples
Last Updated: 29 January 2026
The Comparator interface in Java is used to define custom sorting logic for objects. It allows sorting collections based on different attributes without modifying the orig...
read more
Java
Design a DS for prices - duplicates allowed
Last Updated: 28 January 2026
Design a data structure that stores items with associated prices (duplicates allowed) while supporting fast insertion, lookup by price, and sorted as well as range-based r...
read more
Java
Design a DS for item prices in Java
Last Updated: 29 January 2026
Given a collection of items with their corresponding prices, design a data structure that efficiently supports the following operations:add(price, item): Adds a new item a...
read more
Java
Ceiling on right in Java
Last Updated: 28 January 2026
Given an integer array, the goal is to find the ceiling on the right for each element - the smallest number greater than or equal to it that appears after it. If no such n...
read more
Java
Design DS for balance in Java
Last Updated: 28 January 2026
Design a data structure to store user IDs and their corresponding balances in an e-Wallet system. The data structure must support insertion, update, and retrieval of balan...
read more
Java
Print Frequencies in an Order in Java
Last Updated: 28 January 2026
Given an array of integers, determine the number of occurrences of each distinct element and output them in the same sequence in which they first appear in the array.Examp...
read more
Java
Purchasing maximum items in Java
Last Updated: 28 January 2026
Given an array of item costs and a total sum, determine the maximum number of items that can be purchased without exceeding the given sum.Example:Input: costs[] = {8, 3, 6...
read more
Java
Generate numbers with given digits in Java
Last Updated: 29 January 2026
Generating numbers using a given set of digits is a common problem in Java programming.It helps in understanding recursion, permutations, loops, and number construction lo...
read more
Java
Design a data structure with min/max operations in Java
Last Updated: 29 January 2026
Design a data structure that supports the following operations efficiently to achieve O(1) time complexity for retrieving minimum and maximum elementsinsert(x): Insert an ...
read more
Java
1
2
3
4
...
625