python中字符串方法 name = "I teased at life as if it were a foolish game" print(name.capitalize())#首字母大写 print(name.count("a"))#查找字符串中a的个数 print(name.center(50,"-"))#长度为50将name放中间不够的用-补全 print(name.endswith("ex"))#字符串是否以e…
一.题目:从上到下打印二叉树 题目:从上往下打印出二叉树的每个结点,同一层的结点按照从左到右的顺序打印.例如输入下图中的二叉树,则依次打印出8.6.10.5.7.9.11. 二叉树节点的定义如下,采用C#语言描述: public class BinaryTreeNode { public int Data { get; set; } public BinaryTreeNode leftChild { get; set; } public BinaryTreeNode rightChild { g…