小黑day0前往乌鲁木齐,去大巴扎放开胃口,day1天山天池大口呼吸,驱车五彩滩被小咬蚊子折磨的痛苦不堪的leetcode之旅:剑指 Offer II 017. 含有所有字符的最短字符串
小黑代码(思路优于官方题解)
class Solution:def minWindow(self, s: str, t: str) -> str:# 字符串长度n_s = len(s)n_t = len(t)# 没有找到if n_t > n_s:return ''# 计数变量map_count = collections.Counter(t)map_ = collections.Counter(t)map_windows = collections.defaultdict(int)count = n_t# 定义头尾指针head = 0tail = 0# 初始化变量is_first = True# 结果变量result = n_sresult_s = ''while tail < n_s:# 寻找初始位置while is_first and tail < n_s:map_windows[s[tail]] += 1if map_[s[tail]]:count -= 1map_[s[tail]] -= 1tail += 1if not count:count = n_tresult = tail - headresult_s = s[head:tail]is_first = Falsebreakif is_first:break# 右指针右移动while tail < n_s and count < n_t:if map_windows[s[tail]] < map_count[s[tail]]:count += 1map_windows[s[tail]] += 1tail += 1# 左指针右移动while count == n_t:if map_windows[s[head]] == map_count[s[head]]:count -= 1map_windows[s[head]] -= 1if tail - head < result:result = tail - headresult_s = s[head:tail]head += 1return result_s

喜茶店学完了算法,准备回家吃饭

续费换地方,钢琴练习《知更鸟罗宾》


去常营练琴,吃DQ

下午赶往大兴机场





坐上了大飞机,全坐满了













(看到了雪峰)



到达乌鲁木齐地窝堡国际机场,节俭的我们吃泡面充饥

到达东方王朝酒店,价格惊到我们了







前往大巴扎小吃街吃晚饭











(羊肉大串)







(烤蛋)

(冰碴子)


(小羊腿)

(手抓羊肉)




(肉馕)

(乌鲁木齐棒棒的治安,跟警察和警犬合一个影)






day1早餐



坐大巴车到达天山天池景区



坐景区接驳车上去




到达天山天池,深吸气


(看到可爱小松鼠)




游览天山天池
























































午饭下山后的团餐

驱车7小时去布尔津,穿越准葛尔盆地沙漠










(遇到沙尘暴)
































游览五彩滩景区,被小咬蚊子折磨的够够的














































(感谢本科新疆同学的推荐)





来到布尔津酒店


酒店边上拉条子

隔壁的店吃几串烧烤,撸可爱的猫猫



第二天去了喀纳斯,下次分享~
本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!
