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: […]
You are given the root of a binary tree and a positive integer k. The level sum in the tree is the sum of the
Given a string s, return the maximum number of unique substrings that the given string can be split into. You can split string s into any
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
Given two positive integers n and k, the binary string Sn is formed as follows: S1 = “0” Si = Si – 1 + “1”
Given an integer array nums, find the maximum possible bitwise OR of a subset of nums and return the number of different non-empty subsets with the maximum bitwise OR. An
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
A boolean expression is an expression that evaluates to either true or false. It can be in one of the following shapes: ‘t’ that evaluates to true.
Given a doubly linked list, each node is at most k-indices away from its target position. The problem is to
You are given an integer num. You can swap two digits at most once to get the maximum valued number. Return the