Contains Duplicate
Given an integer array , return if any value appears at least twice in the array, and return if every element is distinct.
Example 1:
Given an integer array , return if any value appears at least twice in the array, and return if every element is distinct.
Example 1:
Given the of a singly linked list, reverse the list, and return the reversed list.
Example 1:
Given two strings and , determine if they are isomorphic.
Two strings and are isomorphic if the characters in can be replaced to get .
203.Remove Linked List Elements
Given the of a linked list and an integer , remove all the nodes of the linked list that has , and return the new head.
Example 1:
Write an algorithm to determine if a number is happy.
A happy number is a number defined by the following process:
Write a function that takes an unsigned integer and returns the number of ‘1’ bits it has (also known as the Hamming weight.
Note:
Given a string that represents the column title as appears in an Excel sheet, return its corresponding column number.
For example:
Given an array of size , return the majority element.
The majority element is the element that appears more than times. You may assume that the majority element always exists in the array.
Given an integer , return its corresponding column title as it appears in an Excel sheet.
For example: