Tag: c++
Write a program to swap odd and even bits in an integer with as few instructions as possible (e.g., bit 0 and bit 1 are swapped, bit 2 and …
Given a binary tree root, find the value of the deepest node. If there’s more than one deepest node, then return the leftmost one. Constraints n ≤ 100,000 where …
You are given a list of lowercase alphabet strings words where each string is of the same length. Return whether there’s two strings that differ only in one index. …
Given a list of integers nums and an integer target, return the number of triples i < j < k that exist such that nums + nums + nums …
Given a binary tree root, return whether all leaves are at the same level. Constraints n ≤ 100,000 where n is the number of nodes in root Breadth First …