摘要: Divide two integers without using multiplication, division and mod operator. If it is overflow, return MAX_INT. 解法: 这道题让我们求两数相除,而且规定我们不能用乘法,除法和取余操作。 采 阅读全文
posted @ 2017-02-20 22:24 Strugglion 阅读(208) 评论(0) 推荐(0) 编辑
摘要: Implement strStr(). Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. 解法: 这道题让我们在一个字符串中找另一个字符串 阅读全文
posted @ 2017-02-20 18:01 Strugglion 阅读(518) 评论(0) 推荐(0) 编辑
摘要: Given an array and a value, remove all instances of that value in place and return the new length. Do not allocate extra space for another array, you 阅读全文
posted @ 2017-02-20 17:43 Strugglion 阅读(167) 评论(0) 推荐(0) 编辑
摘要: Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length. Do not allocate extra space fo 阅读全文
posted @ 2017-02-20 16:47 Strugglion 阅读(139) 评论(0) 推荐(0) 编辑
摘要: Given a linked list, reverse the nodes of a linked list k at a time and return its modified list. k is a positive integer and is less than or equal to 阅读全文
posted @ 2017-02-20 16:28 Strugglion 阅读(154) 评论(0) 推荐(0) 编辑
摘要: Given a linked list, swap every two adjacent nodes and return its head. For example, Given 1->2->3->4, you should return the list as 2->1->4->3. Your 阅读全文
posted @ 2017-02-20 14:27 Strugglion 阅读(147) 评论(0) 推荐(0) 编辑