• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
neverlandly
博客园    首页    新随笔    联系   管理    订阅  订阅
10 2019 档案
Leetcode: Diagonal Traverse

只有注册用户登录后才能阅读该文。
posted @ 2019-10-31 13:29 neverlandly 阅读(5) 评论(0) 推荐(0)
Leetcode: Shortest Path in Binary Matrix

只有注册用户登录后才能阅读该文。
posted @ 2019-10-31 12:41 neverlandly 阅读(2) 评论(0) 推荐(0)
Leetcode: Closest Leaf in a Binary Tree

摘要:Tree > Graph Note only the nodes visited in DFS are put into the backedgeMap, the others don't. This is fine, cause only from KNode to root this path, 阅读全文
posted @ 2019-10-31 10:09 neverlandly 阅读(163) 评论(0) 推荐(0)
Leetcode: Peak Index in a Mountain Array

只有注册用户登录后才能阅读该文。
posted @ 2019-10-30 14:44 neverlandly 阅读(5) 评论(0) 推荐(1)
Leetcode: Design Bounded Blocking Queue && Summary of Reentrant Lock

只有注册用户登录后才能阅读该文。
posted @ 2019-10-30 14:24 neverlandly 阅读(8) 评论(0) 推荐(0)
Leetcode: Exam Room

只有注册用户登录后才能阅读该文。
posted @ 2019-10-30 13:03 neverlandly 阅读(7) 评论(0) 推荐(0)
Leetcode: Top K Frequent Words

只有注册用户登录后才能阅读该文。
posted @ 2019-10-29 15:04 neverlandly 阅读(7) 评论(0) 推荐(0)
Leetcode: Single-Row Keyboard

只有注册用户登录后才能阅读该文。
posted @ 2019-10-29 13:44 neverlandly 阅读(1) 评论(0) 推荐(0)
Leetcode: Flatten a Multilevel Doubly Linked List

只有注册用户登录后才能阅读该文。
posted @ 2019-10-29 13:31 neverlandly 阅读(3) 评论(0) 推荐(0)
Leetcode: K Closest Points to Origin

只有注册用户登录后才能阅读该文。
posted @ 2019-10-28 09:52 neverlandly 阅读(6) 评论(0) 推荐(0)
Leetcode: Reorder Data in Log Files

只有注册用户登录后才能阅读该文。
posted @ 2019-10-28 09:23 neverlandly 阅读(1) 评论(0) 推荐(0)
Leetcode: Partition Labels

只有注册用户登录后才能阅读该文。
posted @ 2019-10-28 09:04 neverlandly 阅读(2) 评论(0) 推荐(0)
Amazon | OA 2019 | Optimal Utilization

摘要:2-Pointers Syntax side: Pay attention to how to print an array: System.out.println(Arrays.toString(int[] item)); 阅读全文
posted @ 2019-10-28 08:16 neverlandly 阅读(1464) 评论(0) 推荐(0)
Amazon | OA 2019 | Movies on Flight

只有注册用户登录后才能阅读该文。
posted @ 2019-10-28 07:04 neverlandly 阅读(3) 评论(0) 推荐(0)
Leetcode: Minimum Cost to Connect Sticks

只有注册用户登录后才能阅读该文。
posted @ 2019-10-28 06:05 neverlandly 阅读(4) 评论(0) 推荐(0)
Leetcode: Critical Connections in a Network && Summary: Detect Cycle in a Graph

只有注册用户登录后才能阅读该文。
posted @ 2019-10-27 15:13 neverlandly 阅读(2) 评论(0) 推荐(0)
Amzon OA prepare: Treasure Island II

只有注册用户登录后才能阅读该文。
posted @ 2019-10-27 08:51 neverlandly 阅读(3) 评论(0) 推荐(0)
Leetcode: 01 Matrix

只有注册用户登录后才能阅读该文。
posted @ 2019-10-27 07:56 neverlandly 阅读(2) 评论(0) 推荐(0)
Leetcode: Number of Submatrices That Sum to Target

只有注册用户登录后才能阅读该文。
posted @ 2019-10-26 15:35 neverlandly 阅读(9) 评论(0) 推荐(0)
Leetcode: Maximize Distance to Closest Person

只有注册用户登录后才能阅读该文。
posted @ 2019-10-26 10:28 neverlandly 阅读(2) 评论(0) 推荐(0)
Leetcode: Path with Maximum Gold

只有注册用户登录后才能阅读该文。
posted @ 2019-10-26 09:14 neverlandly 阅读(3) 评论(0) 推荐(0)
Leetcode: Reorganize String

只有注册用户登录后才能阅读该文。
posted @ 2019-10-25 14:59 neverlandly 阅读(7) 评论(0) 推荐(0)
Leetcode: Minimum Knight Moves

只有注册用户登录后才能阅读该文。
posted @ 2019-10-25 13:25 neverlandly 阅读(6) 评论(0) 推荐(0)
Leetcode: Similar String Groups

只有注册用户登录后才能阅读该文。
posted @ 2019-10-25 10:33 neverlandly 阅读(4) 评论(0) 推荐(0)
Leetcode: Car Fleet

只有注册用户登录后才能阅读该文。
posted @ 2019-10-25 08:47 neverlandly 阅读(3) 评论(0) 推荐(0)
Leetcode: Swap Adjacent in LR String

只有注册用户登录后才能阅读该文。
posted @ 2019-10-25 06:40 neverlandly 阅读(2) 评论(0) 推荐(0)
Leetcode: Fruit Into Baskets

只有注册用户登录后才能阅读该文。
posted @ 2019-10-24 15:06 neverlandly 阅读(2) 评论(0) 推荐(0)
Leetcode: Insert into a Cyclic Sorted List

只有注册用户登录后才能阅读该文。
posted @ 2019-10-24 13:33 neverlandly 阅读(2) 评论(0) 推荐(0)
Leetcode: Basic Calculator III

只有注册用户登录后才能阅读该文。
posted @ 2019-10-24 10:21 neverlandly 阅读(6) 评论(0) 推荐(0)
Leetcode: Maximum Frequency Stack

只有注册用户登录后才能阅读该文。
posted @ 2019-10-24 04:31 neverlandly 阅读(7) 评论(0) 推荐(0)
Leetcode: Hand of Straights

只有注册用户登录后才能阅读该文。
posted @ 2019-10-23 15:35 neverlandly 阅读(5) 评论(0) 推荐(0)
Leetcode: Redundant Connection II

只有注册用户登录后才能阅读该文。
posted @ 2019-10-23 11:59 neverlandly 阅读(3) 评论(0) 推荐(0)
Leetcode: Remove All Adjacent Duplicates In String

只有注册用户登录后才能阅读该文。
posted @ 2019-10-22 15:16 neverlandly 阅读(2) 评论(0) 推荐(0)
Leetcode: Search in a Sorted Array of Unknown Size

只有注册用户登录后才能阅读该文。
posted @ 2019-10-22 15:10 neverlandly 阅读(2) 评论(0) 推荐(0)
Leetcode: Brace Expansion II

只有注册用户登录后才能阅读该文。
posted @ 2019-10-22 13:41 neverlandly 阅读(3) 评论(0) 推荐(0)
Leetcode: Sentence Similarity II

只有注册用户登录后才能阅读该文。
posted @ 2019-10-21 10:56 neverlandly 阅读(4) 评论(0) 推荐(0)
Leetcode: Vertical Order Traversal of a Binary Tree

只有注册用户登录后才能阅读该文。
posted @ 2019-10-21 09:48 neverlandly 阅读(4) 评论(0) 推荐(0)
Leetcode: Number of Matching Subsequences

只有注册用户登录后才能阅读该文。
posted @ 2019-10-21 08:02 neverlandly 阅读(4) 评论(0) 推荐(0)
Leetcode: Snapshot Array

只有注册用户登录后才能阅读该文。
posted @ 2019-10-21 06:37 neverlandly 阅读(2) 评论(0) 推荐(0)
Leetcode: My Calendar I

只有注册用户登录后才能阅读该文。
posted @ 2019-10-21 02:44 neverlandly 阅读(3) 评论(0) 推荐(0)
Leetcode: Minimum Swaps To Make Sequences Increasing

只有注册用户登录后才能阅读该文。
posted @ 2019-10-20 15:22 neverlandly 阅读(5) 评论(0) 推荐(0)
Leetcode: Confusing Number II

只有注册用户登录后才能阅读该文。
posted @ 2019-10-20 08:05 neverlandly 阅读(4) 评论(0) 推荐(0)
Leetcode: Escape a Large Maze

只有注册用户登录后才能阅读该文。
posted @ 2019-10-20 05:57 neverlandly 阅读(2) 评论(0) 推荐(0)
Leetcode: Split BST

摘要:Note: The size of the BST will not exceed 50. The BST is always valid and each node's value is different. Note: The size of the BST will not exceed 50 阅读全文
posted @ 2019-10-18 15:04 neverlandly 阅读(214) 评论(0) 推荐(0)
Leetcode: Flip Equivalent Binary Trees

只有注册用户登录后才能阅读该文。
posted @ 2019-10-18 13:25 neverlandly 阅读(2) 评论(0) 推荐(0)
Leetcode: Find And Replace in String

摘要:HashMap Sort and replace S from right to left (未深究) 阅读全文
posted @ 2019-10-18 12:57 neverlandly 阅读(134) 评论(0) 推荐(0)
Leetcode: Crack The Safe

只有注册用户登录后才能阅读该文。
posted @ 2019-10-18 10:21 neverlandly 阅读(4) 评论(0) 推荐(0)
Leetcode: Confusing Number

只有注册用户登录后才能阅读该文。
posted @ 2019-10-17 15:28 neverlandly 阅读(17) 评论(0) 推荐(0)
Leetcode: Optimize Water Distribution in a Village && Summary: Union Find and Minimum Spanning Tree

只有注册用户登录后才能阅读该文。
posted @ 2019-10-17 14:24 neverlandly 阅读(5) 评论(0) 推荐(0)
Leetcode: Rotated Digits

摘要:X is a good number if after rotating each digit individually by 180 degrees, we get a valid number that is different from X. Each digit must be rotated - we cannot choose to leave it alone. A number i 阅读全文
posted @ 2019-10-17 12:21 neverlandly 阅读(135) 评论(0) 推荐(0)
Leetcode: Find Eventual Safe States

只有注册用户登录后才能阅读该文。
posted @ 2019-10-16 15:38 neverlandly 阅读(2) 评论(0) 推荐(0)
Leetcode: Minimum Area Rectangle II

只有注册用户登录后才能阅读该文。
posted @ 2019-10-16 13:22 neverlandly 阅读(4) 评论(0) 推荐(0)
Leetcode: Binary Tree Coloring Game

只有注册用户登录后才能阅读该文。
posted @ 2019-10-16 09:51 neverlandly 阅读(3) 评论(0) 推荐(0)
Leetcode: Repeated String Match

摘要:The idea is to keep string builder and appending until the length A is greater or equal to B. use a while loop to keep adding A to stringBuilder until 阅读全文
posted @ 2019-10-15 15:28 neverlandly 阅读(73) 评论(0) 推荐(0)
Leetcode: Delete Nodes And Return Forest

只有注册用户登录后才能阅读该文。
posted @ 2019-10-15 13:50 neverlandly 阅读(3) 评论(0) 推荐(0)
Leetcode: Construct Binary Tree from Preorder and Postorder Traversal

只有注册用户登录后才能阅读该文。
posted @ 2019-10-15 10:14 neverlandly 阅读(2) 评论(0) 推荐(0)
Leetcode: Longest Word in Dictionary through Deleting

只有注册用户登录后才能阅读该文。
posted @ 2019-10-14 15:08 neverlandly 阅读(3) 评论(0) 推荐(0)
Leetcode: Student Attendance Record II

只有注册用户登录后才能阅读该文。
posted @ 2019-10-14 13:21 neverlandly 阅读(2) 评论(0) 推荐(0)
Leetcode: Student Attendance Record I

摘要:1-liner s.contains("") normally is O(nm), but can be optimized to be O(n) O(n) scan 阅读全文
posted @ 2019-10-14 11:43 neverlandly 阅读(137) 评论(0) 推荐(0)
Microsoft OA

摘要:没有想到要再存一个HashMap, appearance to character mapping 阅读全文
posted @ 2019-10-14 08:34 neverlandly 阅读(517) 评论(0) 推荐(0)
Leetcode: Split Array into Consecutive Subsequences

只有注册用户登录后才能阅读该文。
posted @ 2019-10-13 09:26 neverlandly 阅读(4) 评论(0) 推荐(0)
Leetcode: Robot Room Cleaner

摘要:Given a robot cleaner in a room modeled as a grid. Each cell in the grid can be empty or blocked. The robot cleaner with 4 given APIs can move forward, turn left or turn right. Each turn it made is... 阅读全文
posted @ 2019-10-13 07:43 neverlandly 阅读(270) 评论(0) 推荐(0)
Leetcode: Time Based Key-Value Store

只有注册用户登录后才能阅读该文。
posted @ 2019-10-13 05:53 neverlandly 阅读(3) 评论(0) 推荐(0)
Leetcode: Most Stones Removed with Same Row or Column

摘要:If stone a and stone b are in the same column/row, we connect them as a component The largest possible number of moves we can make = the number of uni 阅读全文
posted @ 2019-10-12 15:03 neverlandly 阅读(196) 评论(0) 推荐(0)
Leetcode: Minimum Area Rectangle

只有注册用户登录后才能阅读该文。
posted @ 2019-10-12 13:33 neverlandly 阅读(2) 评论(0) 推荐(0)
Leetcode: Find the Shortest Superstring

只有注册用户登录后才能阅读该文。
posted @ 2019-10-11 14:01 neverlandly 阅读(5) 评论(0) 推荐(0)
Leetcode: Network Delay Time

只有注册用户登录后才能阅读该文。
posted @ 2019-10-10 16:04 neverlandly 阅读(7) 评论(0) 推荐(0)
Leetcode: 24 Game

摘要:Backtracking: every time draw two cards, calculate the possible results, and add one result to the nextRound list. The nextRound list will have the re 阅读全文
posted @ 2019-10-10 14:10 neverlandly 阅读(196) 评论(0) 推荐(0)
Leetcode: Minimum Window Subsequence

只有注册用户登录后才能阅读该文。
posted @ 2019-10-10 10:33 neverlandly 阅读(2) 评论(0) 推荐(0)
Leetcode: Brace Expansion

只有注册用户登录后才能阅读该文。
posted @ 2019-10-09 15:52 neverlandly 阅读(3) 评论(0) 推荐(0)
Leetcode: Expressive Words

只有注册用户登录后才能阅读该文。
posted @ 2019-10-09 15:05 neverlandly 阅读(2) 评论(0) 推荐(0)
Leetcode: Race Car

只有注册用户登录后才能阅读该文。
posted @ 2019-10-09 13:53 neverlandly 阅读(3) 评论(0) 推荐(0)
Leetcode: Cat and Mouse

只有注册用户登录后才能阅读该文。
posted @ 2019-10-08 16:29 neverlandly 阅读(3) 评论(0) 推荐(0)
Leetcode: New 21 Game

只有注册用户登录后才能阅读该文。
posted @ 2019-10-07 14:44 neverlandly 阅读(3) 评论(0) 推荐(0)
Leetcode: String Transforms Into Another String

只有注册用户登录后才能阅读该文。
posted @ 2019-10-07 11:31 neverlandly 阅读(3) 评论(0) 推荐(0)
Leetcode: Design Search Autocomplete System

只有注册用户登录后才能阅读该文。
posted @ 2019-10-07 09:29 neverlandly 阅读(6) 评论(0) 推荐(0)
Leetcode: Capacity To Ship Packages Within D Days

摘要:Exactly the same with Split Array Largest Sum. Binary search or DP Binary Search 阅读全文
posted @ 2019-10-07 03:30 neverlandly 阅读(287) 评论(0) 推荐(0)
Leetcode: Stream of Characters

摘要:Store the words in the trie with reverse order, and check the query string from the end 阅读全文
posted @ 2019-10-06 16:38 neverlandly 阅读(361) 评论(0) 推荐(0)
Leetcode: Backspace String Compare

摘要:Complexity Analysis Time Complexity: O(M + N)O(M+N), where M, NM,N are the lengths of S and T respectively. Space Complexity: O(1)O(1). Time Complexit 阅读全文
posted @ 2019-10-06 09:58 neverlandly 阅读(135) 评论(0) 推荐(0)
Leetcode: Compare Strings by Frequency of the Smallest Character

只有注册用户登录后才能阅读该文。
posted @ 2019-10-03 15:28 neverlandly 阅读(2) 评论(0) 推荐(0)
Leetcode: Shortest Way to Form String

摘要:Greedy Use two pointers, one for source: i, one for target: j. While j scan through target, try to match each char of j in source by moving i. Count h 阅读全文
posted @ 2019-10-03 14:16 neverlandly 阅读(1230) 评论(0) 推荐(1)
Leetcode: License Key Formatting

只有注册用户登录后才能阅读该文。
posted @ 2019-10-03 12:54 neverlandly 阅读(4) 评论(0) 推荐(0)
Leetcode: Campus Bikes II

摘要:Basic: Backtracking + pruning DP: refer to https://leetcode.com/problems/campus-bikes-ii/discuss/305218/DFS-%2B-Pruning-And-DP-Solution state : dp[i][ 阅读全文
posted @ 2019-10-02 16:13 neverlandly 阅读(1542) 评论(0) 推荐(0)
Leetcode: Minimum Domino Rotations For Equal Row

摘要:1. The final uniform character should be either A[0] or B[0] 2. A[0] could be at the top, or the bottom. Same applies to B[0] 3. If A[0] works, no nee 阅读全文
posted @ 2019-10-01 13:27 neverlandly 阅读(479) 评论(0) 推荐(0)

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