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

2019年11月29日

1143. Longest Common Subsequence
摘要: Given two strings text1 and text2, return the length of their longest common subsequence. A subsequence of a string is a new string generated from the 阅读全文
posted @ 2019-11-29 20:46 lychnis 阅读(154) 评论(0) 推荐(0)
 
 

2019年11月16日

108. Convert Sorted Array to Binary Search Tree
摘要: Given an array where elements are sorted in ascending order, convert it to a height balanced BST. For this problem, a height-balanced binary tree is d 阅读全文
posted @ 2019-11-16 21:01 lychnis 阅读(101) 评论(0) 推荐(0)
 
146. LRU Cache
摘要: Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and put. get(key) - Get the 阅读全文
posted @ 2019-11-16 20:53 lychnis 阅读(124) 评论(0) 推荐(0)
 
 

2019年11月11日

122. Best Time to Buy and Sell Stock II
摘要: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may comple 阅读全文
posted @ 2019-11-11 21:24 lychnis 阅读(111) 评论(0) 推荐(0)
 
121. Best Time to Buy and Sell Stock
摘要: Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transaction 阅读全文
posted @ 2019-11-11 21:23 lychnis 阅读(103) 评论(0) 推荐(0)
 
118. Pascal's Triangle
摘要: Given a non-negative integer numRows, generate the first numRows of Pascal's triangle. In Pascal's triangle, each number is the sum of the two numbers 阅读全文
posted @ 2019-11-11 18:45 lychnis 阅读(91) 评论(0) 推荐(0)
 
209. Minimum Size Subarray Sum
摘要: Given an array of n positive integers and a positive integer s, find the minimal length of a contiguous subarray of which the sum ≥ s. If there isn't 阅读全文
posted @ 2019-11-11 17:59 lychnis 阅读(95) 评论(0) 推荐(0)
 
206. Reverse Linked List
摘要: Reverse a singly linked list. Example: Input: 1->2->3->4->5->NULL Output: 5->4->3->2->1->NULL Follow up: A linked list can be reversed either iterativ 阅读全文
posted @ 2019-11-11 16:24 lychnis 阅读(89) 评论(0) 推荐(0)
 
 

2019年11月4日

98. Validate Binary Search Tree
摘要: Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is defined as follows: The left subtree of a node contains only 阅读全文
posted @ 2019-11-04 21:55 lychnis 阅读(136) 评论(0) 推荐(0)
 
 

2019年11月3日

94. Binary Tree Inorder Traversal
摘要: Given a binary tree, return the inorder traversal of its nodes' values. Example: Input: [1,null,2,3] 1 \ 2 / 3 Output: [1,3,2] Follow up: Recursive so 阅读全文
posted @ 2019-11-03 21:31 lychnis 阅读(95) 评论(0) 推荐(0)
 
 
上一页 1 2 3 4 5 6 ··· 9 下一页

公告


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