valid sudoku 题目描述 Determine if a Sudoku is valid, according to: Sudoku Puzzles – The Rules.The Sudoku board could …
分类:Algorithm
[leetcode]题目解析(190513)
Search for a range 题目描述 Given a sorted array of integers, find the starting and ending position of a given target value.…
[leetcode]题目解析(190425)
Remove Duplicates from sorted Array II 题目描述 Follow up for “Remove Duplicates”: What if duplicates are allowe…
[leetcode]题目解析(190423)
Remove duplicates from sorted list 题目描述 Given a sorted linked list, delete all duplicates such that each element appear …
[leetcode]题目解析(190422)
unique path 题目描述 A robot is located at the top-left corner of a m x n grid (marked ‘Start’ in the diagram be…
最大堆和最小堆
最大堆和最小堆 一、堆树的定义堆树的定义如下: 堆树是一颗完全二叉树; 堆树中某个节点的值总是不大于或不小于其孩子节点的值; 堆树中每个节点的子树都是堆树。当父节点的键值总是大于或等于任何一个子节点的键值时为最大堆。 当父节点的键值总是小于…
[Leetcode]merge sorted array
merge sorted array 题目描述 Given two sorted integer arrays A and B, merge B into A as one sorted array.Note: You may assum…