Tag: c++
Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the array, and it …
Given a binary tree, return the sum of values of nodes with even-valued grandparent. (A grandparent of a node is the parent of its parent, if it exists.) If …
Given an integer n. No-Zero integer is a positive integer which doesn’t contain any 0 in its decimal representation. Return a list of two integers where: A and B …
Given a 2D grid of size n * m and an integer k. You need to shift the grid k times. In one shift operation: Element at grid becomes …
The C++ method iota (not to be confused with itoa which is to convert integers to string), is defined in header numeric. Its purpose is to compute increasing values …