The File library of java provides many methods for creating new directories, listing the contents of a directory, path name, deleting or renaming files and modes in which file can be opened Read more →
Java Programs
25 postsGiven a numeric string, the task is to split the string into the sequence of two or more positive integers and check that it satisfies the following conditions or not. 1. Each Read more →
Given an array of N elements. You have to partition the array into two non-empty subarrays such that every number in the right subarray is strictly greater than every number in the Read more →
Get an overview of four pillars of object-oriented programming (OOP) and see their suitable real life examples. What is OOP? Picture a cluttered garage?️. Tools are scattered everywhere, various shelves are overflowing Read more →
Problem: Given an integer ‘n’, find sum of all n digits which come in power of 2 of given number n. Examples: Input: p = 9 Output: 8 Explanation : 2^9 = Read more →
Given an arithmetic progression and having any number of duplicates, we have to find the index of first occurrence of duplicate element in the series. After getting the index we will remove Read more →
Sort a list in JAVA and then return the index of elements in sorted order. Examples: Input : [2, 3, 1, 4, 5] Output : [2, 0, 1, 3, 4] After sorting Read more →
Given an array of N integers, where each value represents the volume of the cloud. The task is to choose the two highest volume clouds from an array and smash them together. Read more →
Given a string s, the task is to print all permutations of a string that are in ascending order, i.e., their characters are in ascending order. Examples: Input: Cplusplus Output: Cllppssuu Out Read more →
Given an array arr[] of 2N integers, where N is any positive integer. The task is to divide the array into N pairs such that the pair sum minimizes the maximum sum Read more →