dmndxld

码不停题

2019年5月11日

151. Reverse Words in a String

摘要: Given an input string, reverse the string word by word. My idea:删除左右两边空格,转换成数组,再把中间空格给改了,再专成字符串,用快慢指针找到单词放进去,很麻烦,所以效果不好。 执行用时 : 92 ms, 在Reverse Words 阅读全文

posted @ 2019-05-11 17:36 imyourterminal 阅读(202) 评论(0) 推荐(0) 编辑

119. Pascal's Triangle II

摘要: Given a non-negative index k where k ≤ 33, return the kth index row of the Pascal's triangle. Note that the row index starts from 0. Follow up: Could 阅读全文

posted @ 2019-05-11 16:11 imyourterminal 阅读(140) 评论(0) 推荐(0) 编辑

导航