#code
Read more stories on Hashnode
Articles with this tag
Write a function that takes an unsigned integer and returns the number of '1' bits it has (also known as the Hamming weight). Example 1: Input: n =...
Given two integers a and b, return the sum of the two integers without using the operators + and -. Example 1: Input: a = 1, b = 2 Output: 3...
Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum. A subarray is...
Given an integer array nums, return true if any value appears at least twice in the array, and return false if every element is distinct. Example 1:...
You are given an array prices where prices[i] is the price of a given stock on the ith day. You want to maximize your profit by choosing a single day...
Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each...