摘要:
Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For exampl... 阅读全文
摘要:
Given a 2D board containing'X'and'O', capture all regions surrounded by'X'.A region is captured by flipping all'O's into'X's in that s... 阅读全文
摘要:
Given a 2D board containing'X'and'O', capture all regions surrounded by'X'.A region is captured by flipping all'O's into'X's in that s... 阅读全文
摘要:
Given a binary tree containing digits from0-9only, each root-to-leaf path could represent a number.An example is the root-to-leaf path... 阅读全文
摘要:
Given a binary tree containing digits from0-9only, each root-to-leaf path could represent a number.An example is the root-to-leaf path... 阅读全文
摘要:
Sort a linked list in O(n log n) time using constant space complexity.C++/** * Definition for singly-linked list. * struct ListNode { ... 阅读全文
摘要:
Sort a linked list in O(n log n) time using constant space complexity.C++/** * Definition for singly-linked list. * struct ListNode { ... 阅读全文
摘要:
Given an array of integers, every element appears twice except for one. Find that single one.Note: Your algorithm should have a linear... 阅读全文
摘要:
Given an array of integers, every element appears twice except for one. Find that single one.Note: Your algorithm should have a linear... 阅读全文
摘要:
Given an array of integers, every element appears three times except for one. Find that single one.Note: Your algorithm should have a ... 阅读全文