摘要: 原题链接: "https://leetcode.com/problems/majority element/description/" 这道题目之前《剑指Offer》见到过,这次就直接能想起书上写的第二种较为简单的方法了: 第一种方法,就是利用快速排序的思想来解决啦! 官方答案 1. 双层循环暴力法 阅读全文
posted @ 2018-03-21 18:41 optor 阅读(98) 评论(0) 推荐(0)
摘要: 原题链接: "https://leetcode.com/problems/excel sheet column title/description/" 这道题目虽然是easy级别的,初看也以为很简单,但是我并未能写出一个完整的实现来。最后,还是抄袭别人的答案: 阅读全文
posted @ 2018-03-21 18:23 optor 阅读(119) 评论(0) 推荐(0)
摘要: 原题链接: "https://leetcode.com/problems/two sum ii input array is sorted/description/" 这道题目蛮有意思的,有点难度哦: Java import java.util.Arrays; / Created by clearb 阅读全文
posted @ 2018-03-21 17:10 optor 阅读(110) 评论(0) 推荐(0)
摘要: 原题链接: "https://leetcode.com/problems/intersection of two linked lists/description/" 这道题目貌似没说这两个单链表是排序的,刚开始我以为是排序的单链表呢,然后我写下了如下的答案,并且通过了。。。 阅读全文
posted @ 2018-03-21 14:57 optor 阅读(118) 评论(0) 推荐(0)