#BBBuild[超话]#
You always laugh, which makes me feel that the world is not bad for you.
I hope you never lack the courage to start over again.
What you insist on one day will hug you in turn.
I am willing to believe you now, and I believe that you will give this matter a result. We are waiting for you, waiting for you to come back, and waiting for flowers to bloom next year.
You always laugh, which makes me feel that the world is not bad for you.
I hope you never lack the courage to start over again.
What you insist on one day will hug you in turn.
I am willing to believe you now, and I believe that you will give this matter a result. We are waiting for you, waiting for you to come back, and waiting for flowers to bloom next year.
#小全不努力怎么行#
题目:删除一个字符串中的所有相邻重复项(反复执行重复项删除操作,直到无法继续删除)。
解:用栈解决。(直接用栈弹出元素到字符串后得到的结果需要反转,如图2)
这里拿字符串直接作为栈,这样省去了栈还要转为字符串的操作。
如果s[i]==result.back(),遇到相邻重复项,result就弹出栈头result.pop_back();否则就进栈result.push_back(s[i]);最终得到的就是不含相邻重复项的字符串。
题目:删除一个字符串中的所有相邻重复项(反复执行重复项删除操作,直到无法继续删除)。
解:用栈解决。(直接用栈弹出元素到字符串后得到的结果需要反转,如图2)
这里拿字符串直接作为栈,这样省去了栈还要转为字符串的操作。
如果s[i]==result.back(),遇到相邻重复项,result就弹出栈头result.pop_back();否则就进栈result.push_back(s[i]);最终得到的就是不含相邻重复项的字符串。
#Alyn的碎碎念
situation:
1、昨晚大哭了一场 今早肿成
2、今早 大雾小雨 蒙上雾气的
3、上班路上正常行驶过程中两次差点和撞上
4、公司物业准备的双十一特饮 芒果百香果茶 巨TMD填 像极了兑了水化开的棒棒糖的味道
Task: 给自己找点快乐安抚一下
action: 买了杯星爸爸
result:满血复活
situation:
1、昨晚大哭了一场 今早肿成
2、今早 大雾小雨 蒙上雾气的
3、上班路上正常行驶过程中两次差点和撞上
4、公司物业准备的双十一特饮 芒果百香果茶 巨TMD填 像极了兑了水化开的棒棒糖的味道
Task: 给自己找点快乐安抚一下
action: 买了杯星爸爸
result:满血复活
✋热门推荐