//: Playground - noun: a place where people can play import UIKit // fallthrough // fallthrough会在当前case执行完之后继续下一个case // 如果在下一个case中声明了变量, 则不能使用fallthrough var coordinate = (1, 0) switch coordinate { case (0, 0): print("It's at origin!") fallthr…
1 Arrays PS:Arrays位于java.util包下 int binarySearch(type[] a, type key); 使用二分法查询 key 元素在 a 数组中的索引,如果数组不包含这个值,则返回负数.使用前要求这个数组是升序排列,才能得到正确结果. int binarySearch(type[] a, int fromIndex, int toIndex, type key); 和上面类似,但是只从 fromIndex 到 toIndex 范围内找元素,一样要求数组是升序…