Problem Description:
Given an array arr[] consisting of N integers, the task is to find all the array elements which occurs more than floor (n/3) times.
Input: arr[] = {5, 3, 5}Output: 5…
Problem Statement:Given an array of integers arr, write a function absSort(arr), that sorts the array according to the absolute values of the numbers in arr. If two numbers have the same absolute value, sort them according to sign, where the negative numbers come before the…
arr
absSort(arr)
Problem Statement: Given an m x n matrix board containing 'X' and 'O', capture all regions that are…
m x n
board
'X'
'O'
Problem Statement: Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.
k is a positive integer and is less than or equal to the length of the linked list. If the number of nodes is not a…
Problem Statement:
Given two strings s and t, determine if they are isomorphic.
s
t
Two strings s and t are isomorphic if the characters in s can be replaced to get t.
All occurrences of a character must be replaced with…
Given two integers K, X, and an array arr[] consisting of N distinct elements, the task is to find X elements closest to the Kth smallest element from the given…