摘要:
Description Given two non-empty binary trees s and t, check whether tree t has exactly the same structure and node values with a subtree of s. A subtr 阅读全文
摘要:
Description Every time it rains on Farmer John's fields, a pond forms over Bessie's favorite clover patch. This means that the clover is covered by wa 阅读全文
摘要:
Description A square is a 4-sided polygon whose sides have equal length and adjacent sides form 90-degree angles. It is also a polygon such that rotat 阅读全文
摘要:
递归版归并排序 我们在 CLRS 中已经学会了归并排序的递归写法: merge函数: def merge(left, right): # prerequisite: both left and right is sorted list ret = [] i = 0 j = 0 while i < l 阅读全文
摘要:
Description You are given a bunch of wooden sticks. Each endpoint of each stick is colored with some color. Is it possible to align the sticks in a st 阅读全文