Log In | Sign Up
Preparing Questions...
Interactive, AI-guided solutions that stick
Given an array of integers `nums` and an integer `target`, return indices of the two numbers such that they add up to `target`.
Given an integer array `nums`, rotate the array to the right by `k` steps, where `k` is non-negative.
Reverse bits of a given 32 bits unsigned integer.
Write a function that takes the binary representation of an unsigned integer and returns the number of '1' bits it has (also known as the [Hamming weight](http://en.wikipedia.org/wiki/Hammingweight)).
Given a text file `file.txt`, transpose its content.
You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that adjacent houses have security systems connected and it will automatically contact the police if two adjacent houses were broken into on the same night.
Given the `root` of a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom.
Given an `m x n` 2D binary grid `grid` which represents a map of `'1'`s (land) and `'0'`s (water), return the number of islands.
Given two integers `left` and `right` that represent the range `[left, right]`, return the bitwise AND of all numbers in this range, inclusive.
Write an algorithm to determine if a number `n` is happy.
Given the `head` of a linked list and an integer `val`, remove all the nodes of the linked list that has `Node.val == val`, and return the new head.
Given an integer `n`, return the number of prime numbers that are strictly less than `n`.