uva 111 History Grading
Many problems in Computer Science involve maximizing some measure according to constraints.
Consider a history exam in which students are asked to put several histori...
分类:
其他好文 时间:
2015-01-13 23:22:43
阅读次数:
513
https://oj.leetcode.com/problems/unique-binary-search-trees/Givenn, how many structurally uniqueBST's(binary search trees) that store values 1...n?For...
分类:
其他好文 时间:
2015-01-13 21:13:32
阅读次数:
161
# -*- coding: utf8 -*-'''__author__ = 'dabay.wang@gmail.com'https://oj.leetcode.com/problems/zigzag-conversion/The string "PAYPALISHIRING" is written ...
分类:
编程语言 时间:
2015-01-13 21:10:46
阅读次数:
416
原题链接:https://oj.leetcode.com/problems/median-of-two-sorted-arrays/
这是一道比较搞脑子的一道题,细节较多。
1. 这里用到的是findKth的思想,就是如果一共有奇数个元素,假设一共有t个元素,则中间元素为第t / 2 + 1个最大的,如果是偶数,则是t / 2位置和t / 2 + 1位置的平均数。
2. 关于find...
分类:
其他好文 时间:
2015-01-13 17:41:54
阅读次数:
108
https://oj.leetcode.com/problems/single-number/Given an array of integers, every element appearstwiceexcept for one. Find that single one.Note:Your al...
分类:
其他好文 时间:
2015-01-13 14:16:55
阅读次数:
141
https://oj.leetcode.com/problems/excel-sheet-column-number/Related to questionExcel Sheet Column TitleGiven a column title as appear in an Excel sheet...
分类:
其他好文 时间:
2015-01-13 14:16:34
阅读次数:
141
https://oj.leetcode.com/problems/same-tree/Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered ...
分类:
其他好文 时间:
2015-01-13 14:14:55
阅读次数:
125
https://oj.leetcode.com/problems/best-time-to-buy-and-sell-stock-ii/Say you have an array for which theithelement is the price of a given stock on day...
分类:
其他好文 时间:
2015-01-13 14:14:12
阅读次数:
100
https://oj.leetcode.com/problems/maximum-depth-of-binary-tree/Given a binary tree, find its maximum depth.The maximum depth is the number of nodes alo...
分类:
其他好文 时间:
2015-01-13 14:13:55
阅读次数:
105
https://oj.leetcode.com/problems/best-time-to-buy-and-sell-stock/Say you have an array for which theithelement is the price of a given stock on dayi.I...
分类:
其他好文 时间:
2015-01-13 14:08:51
阅读次数:
132