0%

How does the writer like to treat young people?

People are always talking about ‘the problem of youth’. If there is one — which I take leave to doubt — then it is older people who create it, not the young themselves. Let us get down to fundamentals and agree that the young are after all human beings — people just like their elders. There is only one difference between an old man and a young one: the young man has a glorious future before him and the old one has a splendid future behind him: and maybe that is where the rub is.

When I was a teenager, I felt that I was just young and uncertain — that I was a new boy in a huge school, and I would have been very pleased to be regarded as something so interesting as a problem. For one thing, being a problem gives you a certain identity, and that is one of the things the young are busily engaged in seeking.

I find young people exciting. They have an air of freedom, and they have not a dreary commitment to mean ambitions or love of comfort. They are not anxious social climbers, and they have no devotion to material things. All this seems to me to link them with life, and the origins of things. It’s as if they were, in some sense, cosmic beings in violent and lovely contrast with us suburban creatures. All that is in my mind when I meet a young person. He may be conceited, ill-mannered, presumptuous or fatuous, but I do not turn for protection to dreary cliches about respect for elders — as if mere age were a reason for respsect. I accept that we are equal, and I will argue with him, as an equal, if I think he is wrong.

📘 深度解析:《如何对待年轻人》


🎯 文章结构图

1
2
3
4
5
引言:驳斥"青年问题"

个人经历:理解年轻人的需求

核心观点:欣赏+平等对待

📖 逐句精讲

第一段:破除偏见

句1-2:

“People are always talking about ‘the problem of youth’. If there is one—which I take leave to doubt—then it is older people who create it, not the young themselves.”

解析:

  • “take leave to doubt” = 恕我怀疑(礼貌的质疑表达)
  • 强调句 “it is…who…” 强调是老年人制造问题
  • 逻辑: 即使有问题,责任也在老年人

句3:

“Let us get down to fundamentals and agree that the young are after all human beings—people just like their elders.”

解析:

  • get down to fundamentals = 回归本质
  • after all = 毕竟,归根结底
  • 核心论点: 年轻人=人类=和老年人一样

句4-5:

“There is only one difference between an old man and a young one: the young man has a glorious future before him and the old one has a splendid future behind him: and maybe that is where the rub is.”

解析:

  • 对比修辞:
    • before him (在前方) ↔ behind him (在身后)
    • glorious (光辉的) ↔ splendid (辉煌的)
  • “where the rub is” = 问题所在(出自莎士比亚《哈姆雷特》)
  • 深层含义: 老年人可能嫉妒年轻人的未来,这才是代际冲突的根源

第二段:同理心视角

句1:

“When I was a teenager, I felt that I was just young and uncertain—that I was a new boy in a huge school…”

解析:

  • 比喻: 青少年 = 大学校里的新生
  • 体现年轻人的感受:渺小、不确定、缺乏归属感

句2:

“…and I would have been very pleased to be regarded as something so interesting as a problem.”

解析:

  • 反讽手法: 被当作”问题”反而是好事
  • 原因: 至少说明被关注了,有存在感

句3:

“For one thing, being a problem gives you a certain identity, and that is one of the things the young are busily engaged in seeking.”

解析:

  • 核心洞察: 年轻人最需要的是身份认同(identity)
  • “busily engaged in seeking” = 忙于寻找
  • 揭示青春期的本质任务:自我定位

第三段:作者的态度(重点段)

Part 1: 欣赏年轻人的品质

“I find young people exciting.”

解析:

  • 开门见山表明态度:exciting(令人兴奋的,而非troublesome麻烦的)

“They have an air of freedom, and they have not a dreary commitment to mean ambitions or love of comfort.”

解析:

  • an air of freedom = 自由的气息/氛围
  • not…dreary commitment to mean ambitions = 没有对卑微野心的沉闷执着
    • dreary = 沉闷乏味的
    • mean = 卑微的、低劣的(指功利性的小目标)
    • 对比: 年轻人有理想主义,不像成年人只追求实际利益

“They are not anxious social climbers, and they have no devotion to material things.”

解析:

  • anxious social climbers = 焦虑的社会攀登者(指热衷于提升社会地位的人)
  • devotion to material things = 对物质的热衷
  • 总结年轻人的优点:
    1. ✅ 不功利
    2. ✅ 不攀附权贵
    3. ✅ 不物质主义

Part 2: 哲学性比喻

“All this seems to me to link them with life, and the origins of things.”

解析:

  • link them with life = 把他们与生命本质联系起来
  • the origins of things = 万物的起源
  • 含义: 年轻人更接近生命的本真状态

“It’s as if they were, in some sense, cosmic beings in violent and lovely contrast with us suburban creatures.”

解析:

  • 核心对比:
年轻人 老年人
cosmic beings(宇宙生命) suburban creatures(郊区生物)
广阔、自由、本真 狭隘、世俗、平庸
  • violent and lovely contrast = 激烈而美好的对比

    • violent = 强烈的、激烈的(褒义)
    • 体现年轻人的生命力
  • suburban 的隐喻:

    • 字面:郊区的
    • 引申:安于现状、缺乏冒险精神、生活模式化

Part 3: 实践原则

“All that is in my mind when I meet a young person.”

解析:

  • 以上想法是作者遇到年轻人时的预设态度
  • 先入为主地欣赏,而非挑剔

“He may be conceited, ill-mannered, presumptuous or fatuous…”

解析:

  • 列举年轻人可能的缺点:
    • conceited = 自负的,自大的
    • ill-mannered = 没礼貌的
    • presumptuous = 放肆的,冒昧的
    • fatuous = 愚蠢的,昏庸的

“…but I do not turn for protection to dreary clichés about respect for elders—as if mere age were a reason for respect.”

解析:

  • turn for protection to = 求助于…来保护自己
  • dreary clichés = 陈腐的老生常谈
    • 指”尊敬长辈”这类说教
  • 破折号后的解释:
    • as if mere age were a reason for respect = 好像仅仅年龄就是值得尊重的理由
    • 虚拟语气(were) 表示作者认为这是不成立的假设

核心观点: 年龄本身不值得尊重,值得尊重的是人品和智慧


“I accept that we are equals, and I will argue with him, as an equal, if I think he is wrong.”

解析:

  • 三次强调”equal”(平等):

    1. we are equals
    2. as an equal
    3. argue with him(辩论,而非训斥)
  • argue 的积极含义:

    • 不是吵架,而是理性讨论
    • 体现尊重对方的思考能力

🎨 写作手法分析

1. 对比手法

对比项 年轻人 老年人
时间维度 未来在前 过去在后
生活态度 自由、理想主义 功利、物质主义
存在状态 宇宙生命 郊区生物
对比效果 violent & lovely dreary & mean

2. 反讽(Irony)

  • “被当作问题反而高兴” → 揭示年轻人渴望被关注
  • “尊重长辈的陈词滥调” → 讽刺以年龄压人的做法

3. 比喻(Metaphor)

  • 新生 vs 大学校 → 年轻人的不确定感
  • 宇宙生命 vs 郊区生物 → 本质 vs 平庸
  • 未来在前 vs 过去在后 → 时间的方向性

4. 排比(Parallelism)

  • “not…dreary commitment / not…anxious climbers / no devotion…”
  • “conceited, ill-mannered, presumptuous or fatuous”
  • 增强语气,强化观点

💡 深层主题

1. 代际关系的本质

  • 不是”问题 vs 解决者”
  • 而是”平等的人 vs 平等的人”

2. 尊重的真正含义

  • ❌ 不是基于年龄的等级制度
  • ✅ 是基于人格的相互理解

3. 青春的价值

  • 不在于”完美”
  • 而在于”生命力”和”可能性”

4. 成年人的反思

  • 是否失去了理想主义?
  • 是否变成了”郊区生物”?

📝 文章金句

  1. “It is older people who create it, not the young themselves.”

    • 问题的制造者往往是指责者
  2. “Being a problem gives you a certain identity.”

    • 存在感比完美更重要
  3. “As if mere age were a reason for respect.”

    • 年龄不等于智慧
  4. “Cosmic beings in violent and lovely contrast with suburban creatures.”

    • 生命力 vs 平庸性

🎓 写作启示

论证技巧:

  1. 先破后立: 先驳斥错误观点,再建立正确观点
  2. 以情动人: 用个人经历增强说服力
  3. 对比鲜明: 用强烈对比突出观点

语言特色:

  1. 修辞丰富: 比喻、反讽、排比
  2. 用词精准: cosmic vs suburban / violent vs dreary
  3. 句式多变: 长短句结合,节奏感强

总结

这篇文章是一篇关于代际关系的哲理散文,作者通过:

  • 🔍 驳斥”青年问题”论
  • 💭 回忆自身经历
  • ❤️ 表达对年轻人的欣赏
  • 🤝 主张平等对待

最终传达的核心价值观:

真正的尊重不是基于年龄,而是基于平等的人格;年轻人的价值不在于完美,而在于生命力和可能性。

题目

Given a binary search tree and the lowest and highest boundaries as L and R, trim the tree so that all its elements lies in [L, R] (R >= L). You might need to change the root of the tree, so the result should return the new root of the trimmed binary search tree.

Example 1:

1
2
3
4
5
6
7
8
9
10
11
12
Input: 
1
/ \
0 2

L = 1
R = 2

Output:
1
\
2

Example 2:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Input: 
3
/ \
0 4
\
2
/
1

L = 1
R = 3

Output:
3
/
2
/
1

难度

Easy

方法

采用递归的方法。如果root为空,则直接返回root; 如果root的值<L,表示root及其左子树所有节点都<L,那么需要改变root节点,从root.right中重新寻找root节点。同理,当root的值>R时,需要从root.left中重新寻找root节点。当L<=root.val<=R时,则递归处理root的左右子树。

python代码

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
class TreeNode(object):
def __init__(self, x):
self.val = x
self.left = None
self.right = None

class Solution(object):
def trimBST(self, root, L, R):
if root == None:
return None

if root.val < L:
return self.trimBST(root.right, L, R)
if root.val > R:
return self.trimBST(root.left, L, R)

root.left = self.trimBST(root.left, L, R)
root.right = self.trimBST(root.right, L, R)

return root

root = TreeNode(1)
root.left = TreeNode(0)
root.right = TreeNode(2)
assert Solution().trimBST(root, 3, 4) == None

root = TreeNode(3)
root.left = TreeNode(0)
root.right = TreeNode(4)
root.left.right = TreeNode(2)
root.left.right.left = TreeNode(1)
root = Solution().trimBST(root, 1, 3)
assert root.val == 3
assert root.left.val == 2
assert root.right == None
assert root.left.left.val == 1

晚上11点前睡,你能做到吗?

1

前几天,北京大学法学院2017迎新典礼上,白建军教授给新生的建议火遍全网:“早睡早起+把微信朋友圈控制在10人以内+拒绝以陪读为目的的表白。这个办法能不能把你弄成精英中的精英,我不知道。但试过的,都说好。”

这3条建议中,我试过“早睡早起”这一条。抓住早睡这个突破点后,早起也能轻松上手,投资小,回报大,性价比高。

但我观察周围,这大约是个年轻人全民熬夜的年代。有人工作分工没办法,有人夜晚干活效率高,有人单纯性晚睡拖延症。许多人在睡觉方面缺乏自制力,晚上不想睡,手机像长在手上似的;早上起不来,醒来就跟闹钟置气,一天到晚觉得困。

原来在我们这个时代,早睡早起,真的变成了最知易行难的自律。

虽然网上不时会曝出因为熬夜导致健康受损甚至猝死的案例,不管当事人如何苦口婆心地劝诫一定要规律作息,千万不要熬夜,可还是有许多人会说,道理我们都知道的,可就是忍不住熬夜啊。

2

以前我在深圳工作时,有段时间早上五点多就起床,去附近的荔香公园快走。我发现这个时段公园里老年人的密度极高,他们神采奕奕地进行着做操、跑步、挥鞭等各种锻炼。

而我看到年轻人密度最高的时段是晚上。我有时加班到晚上十点多,在赶回家睡觉的路上,看到写字楼里还有大片灯光,商场周围还有K歌聚会,便利店里还有人进人出。

这好像一幕滑稽戏,早睡早起的老年人和晚睡晚起的年轻人,处于不同的时区。结果,老年人状态越来越燃,年轻人却越活越没精神。

其实,早睡早起,是性价比最高的自律。

前东家大领导30多岁那年,大病一场之后,作息习惯大换血,他把工作模式从没日没夜改为早睡早起,工作绩效不减反增;

我婶婶婚后越长越好看,随着年纪增长,她的皮肤却比初见时细腻白嫩了很多,她说因为自己单身时熬的夜,结婚后都戒了;

我早上五点多去公园的事迹被同事们听说后,都叉着腰笑我过着老年人的生活,可我那时的工作效率和身体状态都处于巅峰级别。

Read more »

题目

Initially, there is a Robot at position (0, 0). Given a sequence of its moves, judge if this robot makes a circle, which means it moves back to the original place.

The move sequence is represented by a string. And each move is represent by a character. The valid robot moves are R(Right), L(Left), U(Up) and D(down). The output should be true or false representing whether the robot makes a circle.

Example 1:

1
2
Input: "UD"
Output: true

Example 2:

1
2
Input: "LL"
Output: false

难度

Easy

方法

对每个方向计数,如果L出现的次数==R出现的次数,并且U出现的次数==D出现的次数,则robot会回到初始位置,返回True;否则返回False

python代码

1
2
3
4
5
6
7
8
9
10
11
12
13
14
class Solution(object):
def judgeCircle(self, moves):
"""
:type moves: str
:rtype: bool
"""
counter = {}
for c in moves:
counter[c] = counter.get(c, 0) + 1

return counter.get("L") == counter.get("R") and counter.get("U") == counter.get("D")

assert Solution().judgeCircle("UD") == True
assert Solution().judgeCircle("LL") == False

题目

Given a non-empty special binary tree consisting of nodes with the non-negative value, where each node in this tree has exactly two or zero sub-node. If the node has two sub-nodes, then this node’s value is the smaller value among its two sub-nodes.

Given such a binary tree, you need to output the second minimum value in the set made of all the nodes’ value in the whole tree.

If no such second minimum value exists, output -1 instead.

Example 1:

1
2
3
4
5
6
7
8
9
Input: 
2
/ \
2 5
/ \
5 7

Output: 5
Explanation: The smallest value is 2, the second smallest value is 5.

Example 2:

1
2
3
4
5
6
7
Input: 
2
/ \
2 2

Output: -1
Explanation: The smallest value is 2, but there isn't any second smallest value.

难度

Easy

方法

首先将最小值minimum和第二小值second_minimum置为maxint,递归遍历二叉树,如果节点值比最小值小,则将最小值赋给第二小值,然后将最小值更新为节点值;如果节点值比最小值大,并且节点值小于第二小值,则将第二小值更新为节点值。节点遍历后如果第二小值==maxint,即没有第二小值,则返回-1

python代码

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import sys

class TreeNode(object):
def __init__(self, x):
self.val = x
self.left = None
self.right = None

class Solution(object):
def findSecondMinimumValue(self, root):
self.min = sys.maxint
self.second_min = sys.maxint
def traverse(node):
if node:
if node.val < self.min:
self.second_min = self.min
self.min = node.val
elif node.val < self.second_min and node.val != self.min:
self.second_min = node.val

traverse(node.left)
traverse(node.right)

traverse(root)
if self.second_min != sys.maxint:
return self.second_min
return -1

root = TreeNode(2)
root.left = TreeNode(2)
root.right = TreeNode(5)
root.right.left = TreeNode(5)
root.right.right = TreeNode(7)

assert Solution().findSecondMinimumValue(root) == 5

题目

We define a harmonious array is an array where the difference between its maximum value and its minimum value is exactly 1.
Now, given an integer array, you need to find the length of its longest harmonious subsequence among all its possible subsequences.
Example 1:

1
2
3
**Input:** [1,3,2,2,5,2,3,7]
**Output:** 5**
Explanation:** The longest harmonious subsequence is [3,2,2,2,3].

Note: The length of the input array will not exceed 20,000.

难度

Easy

方法

用一个map存放所有值出现的次数,对于map中的每个num,求出numnum+1出现的次数之和,找出最大值即可

python代码

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
class Solution(object):
def findLHS(self, nums):
"""
:type nums: List[int]
:rtype: int
"""
nums_count = {}
for num in nums:
nums_count[num] = nums_count.get(num, 0) + 1

result = 0
for num in nums_count:
count = nums_count[num]
if nums_count.get(num+1):
result = max(result, count + nums_count[num+1])
return result

assert Solution().findLHS([1,3,2,2,5,2,3,7]) == 5

题目

Given an integer, write an algorithm to convert it to hexadecimal. For negative integer, two’s complement method is used.
Note:

  1. All letters in hexadecimal (a-f) must be in lowercase.
  2. The hexadecimal string must not contain extra leading 0s. If the number is zero, it is represented by a single zero character ‘0’; otherwise, the first character in the hexadecimal string will not be the zero character.
  3. The given number is guaranteed to fit within the range of a 32-bit signed integer.
  4. You must not use any method provided by the library which converts/formats the number to hex directly.

Example 1:

1
2
3
4
Input:
26
Output:
"1a"

Example 2:

1
2
3
4
Input:
-1
Output:
"ffffffff"

难度

Easy

方法

对于num,每次num&15便可取到最右的4个bit位,然后num>>4循环处理即可将num转换为16进制。因为num范围为32bit位,因此最多右移8次,每次右移4个bit位。当num不为0时,转换为16进制后,前面有0需去除。

python代码

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
class Solution(object):
def toHex(self, num):
"""
:type num: int
:rtype: str
"""
if num == 0:
return "0"
map = ["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"]
hex = ""
for i in range(8):
hex = map[num & 0xf] + hex
num = num >> 4

return hex.lstrip("0")

assert Solution().toHex(-1) == "ffffffff"
assert Solution().toHex(26) == "1a"

题目

Given two non-negative integers num1 and num2 represented as string, return the sum of num1 and num2.

Note:

  1. The length of both num1 and num2 is < 5100.
  2. Both num1 and num2 contains only digits 0-9.
  3. Both num1 and num2 does not contain any leading zero.
  4. You must not use any built-in BigInteger library or convert the inputs to integer directly.

难度

Easy

方法

从低位到高位相加,每一位的结果为除10取余,如果有进位1,则在下一位求和的时候需要+1,循环处理即可。注意最高位相加后如果有进位,需要在结果的最前面补1

python代码

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
class Solution(object):
def addStrings(self, num1, num2):
"""
:type num1: str
:type num2: str
:rtype: str
"""
i = len(num1) - 1
j = len(num2) - 1
num = ""
carry = 0
while i >= 0 or j >= 0:
result = carry
if i >= 0:
result += int(num1[i])
if j >= 0:
result += int(num2[j])
if result >= 10:
carry = 1
else:
carry = 0
num = str(result % 10) + num
i -= 1
j -= 1
if carry == 1:
num = "1" + num
return num

assert Solution().addStrings("111", "234965") == "235076"
assert Solution().addStrings("999", "1") == "1000"

题目

Given a binary tree, you need to compute the length of the diameter of the tree. The diameter of a binary tree is the length of the longest path between any two nodes in a tree. This path may or may not pass through the root.

Example:
Given a binary tree

1
2
3
4
5
    1
/ \
2 3
/ \
4 5

Return 3, which is the length of the path [4,2,1,3] or [5,2,1,3].

Note: The length of path between two nodes is represented by the number of edges between them.

难度

Easy

方法

求出每个节点左右子树的深度,相加即为该节点对应的diameter,最后取最大的diameter即可

python代码

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
class TreeNode(object):
def __init__(self, x):
self.val = x
self.left = None
self.right = None

class Solution(object):
def diameterOfBinaryTree(self, root):
self.diameter = 0
def depth(node):
if node:
l_depth = depth(node.left)
r_depth = depth(node.right)
self.diameter = max(self.diameter, l_depth + r_depth)
return max(l_depth, r_depth) + 1
return 0

depth(root)
return self.diameter


root = TreeNode(1)
root.left = TreeNode(2)
root.right = TreeNode(3)
root.left.left = TreeNode(4)
root.left.right = TreeNode(5)
assert Solution().diameterOfBinaryTree(root) == 3

题目

Given a string and an integer k, you need to reverse the first k characters for every 2k characters counting from the start of the string. If there are less than k characters left, reverse all of them. If there are less than 2k but greater than or equal to k characters, then reverse the first k characters and left the other as original.
Example:

1
2
Input: s = "abcdefg", k = 2
Output: "bacdfeg"

Restrictions:

  1. The string consists of lower English letters only.
  2. Length of the given string and k will in the range [1, 10000]

难度

Easy

方法

每次处理s[0:2k],将s[0:k]逆序后拼接s[k:2k],然后将s[2k:]赋值给s,循环处理直至s为空即可

python代码

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
class Solution(object):
def reverseStr(self, s, k):
"""
:type s: str
:type k: int
:rtype: str
"""
result = ""
while s:
temp = s[0:k]
result += temp[::-1] + s[k:2*k]
s = s[2*k:]
return result

assert Solution().reverseStr("abcdefg", 2) == "bacdfeg"