Skip to content

Tag Archives: Arrays

Given a word and a text, return the count of the occurrences of anagrams of the word in the text(For eg: anagrams of word for… Read More
Given a linked list of alphabets and special characters. Reverse the given linked list without affecting the position of the special characters.  Examples:   Input: g… Read More
An Array is a collection of elements which can be of either primitive datatypes or objects. Arrays in Java are static in nature. ArrayLists, on… Read More
Given a number N, create an array such the first half of the array is filled with odd numbers till N, and the second half… Read More
Given an array of N integers and an integer M. You can change the sign(positive or negative) of any element in the array. The task… Read More
Given an array arr[] containing n + 1 integers where each integer is between 1 and n (inclusive). There is only one duplicate element, find… Read More
Given an array of integers arr[], find the number of recycled pairs in the array. A recycled pair of two numbers {a, b} has the… Read More
Given N rows with M elements each and an array arr[] of L numbers, the task is to print the count of elements of that… Read More
Given an array A of N positive integers and a budget B. Your task is to decide the maximum number of elements to be picked… Read More
Given an array of distinct integers and a range [a, b], the task is to count the number of triplets having a sum in the… Read More
Given three integers N, M and X, the task is to find the number of ways to form an array, such that all consecutive numbers… Read More
Given an array of N integers, find the difference between the summation of numbers whose frequency of all digits are same and different. For e.g.… Read More
Given a non-empty string S of uppercase alphabets of length L and the task is to find the longest string from the given string with… Read More
Given two arrays A and B of the same size N. Check whether array A can be fit into array B. An array is said… Read More
Given two arrays arr1[] and arr2[] sorted in ascending order and an integer K. The task is to find k pairs with the smallest sums… Read More

Start Your Coding Journey Now!