1089 Insert or Merge
题目
According to Wikipedia:
Insertion sort iterates, consuming one input element each repetition, and growing a sorted output list. Each iteration, insertion sort removes one element from the input data, finds the location it belongs within the sorted list, and inserts it there. It repeats until no input elements remain.
Merge sort works as follows: Divide the unsorted list into N sublists, each containing 1 element (a list of 1 element is considered sorted). Then repeatedly merge two adjacent s ...
<Python><PAT> 1099 Build A Binary Search Tree
根据前序建立BST,并输出层序
<Python><PAT> 1100 Mars Numbers
进制转换问题,难点是处理所有条件分支
<Python><PAT> 1093 Count PAT's
要想做对此题,你必须成为逻辑带师
<Python><PAT> 1092 To Buy or Not to Buy
使用Counter的爽爆Python应用。
<Python><PAT> 1088 Rational Arithmetic
在20分的题里面算非常难了。主要是要处理的细节,非常非常多。我已经使用了Fraction类来降低复杂性,可是依然非常复杂。
<Python><PAT> 1085 Perfect Sequence
关键点在于理解题意。涉及到数学的表述总是有些抽象,单这题其实很简单。
<Python><PAT> 1084 Broken Keyboard
用Python的集合操作,又爽爆了。