# 类别归档：LeetCode

LeetCode OJ is a platform for preparing technical coding interviews.

## 题目描述：

Implement `int sqrt(int x)`.

Compute and return the square root of x.

## Python代码：

``````class Solution(object):
def mySqrt(self, x):
"""
:type ...``````

## 题目描述：

Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array.

For example,
Given nums = [0, 1, 3] return 2.

Note:

Your algorithm should run in linear runtime ...

## 题目描述：

You are climbing a stair case. It takes n steps to reach to the top.

Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?

## 题目描述：

Write a program to find the n-th ugly number.

Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For example, 1, 2, 3, 4, 5, 6, 8, 9, 10, 12 is the sequence of the ...

## 题目描述：

Write a program to check whether a given number is an ugly number.

Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For example, 6, 8 are ugly while 14 is not ugly since it ...