Find the Sum of Last N nodes of the Linked List
Given a single linked list, calculate the sum of the last n nodes. Note: It is guaranteed that n <= number of nodes. Examples: […]
Given a single linked list, calculate the sum of the last n nodes. Note: It is guaranteed that n <= number of nodes. Examples: […]
Given an array arr[] and two integers say, x and y, find the number of sub-arrays in which the number of occurrences of x is equal to
A string str is given to represent a positive number. The task is to round str to the nearest multiple of 10.
Given an array arr[] of positive integers where every element appears even times except for one. Find that number occurring an odd
Given an array arr[] of integers, the task is to count the number of ways to split given array elements into two
Given a doubly linked list, each node is at most k-indices away from its target position. The problem is to
Given a singly linked list’s head. Your task is to complete the function alternatingSplitList() that splits the given linked list into two smaller lists.
Given an unsorted array of integers arr[], and a target tar, determine the number of subarrays whose elements sum up to the
Given a singly linked list. The task is to find the length of the linked list, where length is defined
Given a Singly Linked List, Delete all alternate nodes of the list ie delete all the nodes present in even positions. Examples
Given an array of integers arr, the task is to find and return the maximum sum of the smallest and second smallest element among all possible subarrays