#cpp
Read more stories on Hashnode
Articles with this tag
Given the root of a binary tree, invert the tree, and return its root. Example 1: Input: root = [4,2,7,1,3,6,9] Output: [4,7,2,9,6,3,1] Example...
Given the roots of two binary trees p and q, write a function to check if they are the same or not. Two binary trees are considered the same if they...
Write a function to delete a node in a singly-linked list. You will not be given access to the head of the list, instead you will be given access to...
Given the array arr of positive integers and the array queries where queries[i] = [Li, Ri], for each query i compute the XOR of elements from Li to Ri...
Given an unsorted array of integers nums, return the length of the longest consecutive elements sequence. Example 1: Input: nums =...
Implement pow(x, n), which calculates x raised to the power n. Example 1: Input: x = 2.00000, n = 10 Output: 1024.00000 Example 2: Input: x =...