摘要: 第一题:题目内容 Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input woul 阅读全文
posted @ 2019-01-03 21:54 stone1234567890 阅读(1170) 评论(0) 推荐(0) 编辑
摘要: 冒泡排序的时间复杂度是O(N^2) 冒泡排序的思想: 每次比较两个相邻的元素, 如果他们的顺序错误就把他们交换位置 比如有五个数: 12, 35, 99, 18, 76, 从大到小排序, 对相邻的两位进行比较 第一趟: 第一次比较: 35, 12, 99, 18, 76 第二次比较: 35, 99, 阅读全文
posted @ 2019-01-03 19:54 stone1234567890 阅读(201) 评论(0) 推荐(0) 编辑