• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
xiaoba1203
记录leetcode之路
博客园 | 首页 | 新随笔 | 新文章 | 联系 | 订阅 订阅 | 管理
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 19 下一页

2016年11月19日

✡ leetcode 162. Find Peak Element --------- java
摘要: A peak element is an element that is greater than its neighbors. Given an input array where num[i] ≠ num[i+1], find a peak element and return its inde 阅读全文
posted @ 2016-11-19 23:38 xiaoba1203 阅读(220) 评论(0) 推荐(0)
 
✡ leetcode 160. Intersection of Two Linked Lists 求两个链表的起始重复位置 --------- java
摘要: Write a program to find the node at which the intersection of two singly linked lists begins. For example, the following two linked lists: begin to in 阅读全文
posted @ 2016-11-19 23:20 xiaoba1203 阅读(223) 评论(0) 推荐(0)
 
leetcode 155. Min Stack --------- java
摘要: Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. push(x) -- Push element x onto stack. pop() -- Remov 阅读全文
posted @ 2016-11-19 15:45 xiaoba1203 阅读(320) 评论(0) 推荐(0)
 
leetcode 154. Find Minimum in Rotated Sorted Array II --------- java
摘要: Follow up for "Find Minimum in Rotated Sorted Array":What if duplicates are allowed? Would this affect the run-time complexity? How and why? Suppose a 阅读全文
posted @ 2016-11-19 14:55 xiaoba1203 阅读(130) 评论(0) 推荐(0)
 
 

2016年11月18日

leetcode 153. Find Minimum in Rotated Sorted Array --------- java
摘要: Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2). Find the minimum element. 阅读全文
posted @ 2016-11-18 23:25 xiaoba1203 阅读(289) 评论(0) 推荐(0)
 
leetcode 152. Maximum Product Subarray --------- java
摘要: Find the contiguous subarray within an array (containing at least one number) which has the largest product. For example, given the array [2,3,-2,4],t 阅读全文
posted @ 2016-11-18 22:42 xiaoba1203 阅读(178) 评论(0) 推荐(0)
 
leetcode 151. Reverse Words in a String --------- java
摘要: Given an input string, reverse the string word by word. For example,Given s = "the sky is blue",return "blue is sky the". Update (2015-02-12):For C pr 阅读全文
posted @ 2016-11-18 21:49 xiaoba1203 阅读(265) 评论(0) 推荐(0)
 
leetcode 150. Evaluate Reverse Polish Notation ------ java
摘要: Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are +, -, *, /. Each operand may be an integer or another e 阅读全文
posted @ 2016-11-18 18:12 xiaoba1203 阅读(524) 评论(0) 推荐(0)
 
leetcode 149. Max Points on a Line --------- java
摘要: Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. 求二维平面上n个点中,最多共线的点数。 1、比较直观的方法是,三层循环,以任意两点划线,判断第三个点 阅读全文
posted @ 2016-11-18 16:55 xiaoba1203 阅读(341) 评论(0) 推荐(0)
 
leetcode 148. Sort List ----- java
摘要: Sort a linked list in O(n log n) time using constant space complexity. 排序,要求是O(nlog(n))的时间复杂度和常数的空间复杂度,那么就使用归并就可以了。 阅读全文
posted @ 2016-11-18 11:19 xiaoba1203 阅读(363) 评论(0) 推荐(0)
 
 
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 19 下一页

公告


博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3