Triplet Family
Given an array arr of integers. Find whether three numbers are such that the sum of two elements equals the third element. […]
Given an array arr of integers. Find whether three numbers are such that the sum of two elements equals the third element. […]
You are given the root of a binary tree with n nodes. Each node is assigned a unique value from 1 to n. You are also given an array queries of
Given a singly linked list and a key, count the number of occurrences of the given key in the linked list. Examples: Input: Linked List:
Given a list of folders folder, return the folders after removing all sub-folders in those folders. You may return the answer in any order. If
Given an array arr of distinct integers. Rearrange the array in such a way that the first element is the largest and the second
For a binary tree T, we can define a flip operation as follows: choose any node, and swap the left and right child
Given an array arr. Return the modified array in such a way that if the current and next numbers are valid numbers and
Given the root of a binary tree, replace the value of each node in the tree with the sum of all its cousins’
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