# 档案日期2015的32

## 题目描述：

Given a non-negative integer num, repeatedly add all its digits until the result has only one digit.

For example:

Given num = 38, the process is like: 3 + 8 = 11, 1 + 1 = 2. Since 2 has only one digit, return ...

## 题目描述：

Given a binary tree, return all root-to-leaf paths.

For example, given the following binary tree:

```   1
/   \
2     3
\
5```

All root-to-leaf paths are:

`["1->2->5", "1->3"]`

## 题目大意：

```   1
/   \
2     3
\
5```

`["1->2->5", "1->3"]`

## 题目描述：

A city's skyline is the outer contour of the silhouette formed by all the buildings in that city when viewed from a distance. Now suppose you are given the locations and height of all the buildings as shown on ...

## 线段树 | 第1讲 （给定区间求和） 作者是 在线疯狂 发布于 2015年8月13日 在 数据结构, 算法, 译林.

1 计算从下标l到r的元素之和，其中 0 <= l <= r <= n-1
​2 修改数组指定元素的值arr[i] = x，其中 0 <= i <= n-1

## 题目描述：

The string `"PAYPALISHIRING"` is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility)

```P   A   H   N
A P L S ...```