码迷,mamicode.com
首页 >  
搜索关键字:solution upgrade    ( 13024个结果
hdu 4956 Poor Hanamichi 解题报告
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4956(它放在题库后面的格式有一点点问题啦,所以就把它粘下来,方便读者观看) 题目意思:给出一个范围 [l, r] 你, 问是否能从中找到一个数证明Hanamichi’s solution 的解法是错.....
分类:其他好文   时间:2014-08-17 22:40:52    阅读次数:217
LeetCode ZigZag Conversion
class Solution {public: string convert(string s, int nRows) { int len = s.length(); if (len cols; int si = 0; int ri =...
分类:其他好文   时间:2014-08-17 21:21:32    阅读次数:218
Recover Binary Search Tree
Two elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure.Note:A solution using O(n) space is ...
分类:其他好文   时间:2014-08-17 21:08:02    阅读次数:339
Convert Sorted Array to Binary Search Tree
Given an array where elements are sorted in ascending order, convert it to a height balanced BST.思路:取数组的中点为树的根,前半部分为左子树,后半部分为右子树。 1 class Solution { 2...
分类:其他好文   时间:2014-08-17 13:02:12    阅读次数:210
LeetCode OJ--Minimum Window Substring ***
https://oj.leetcode.com/problems/minimum-window-substring/模拟题这道题细节比较多。从左到右扫一遍模拟着做 class Solution {public: string minWindow(string S, string T) { ...
分类:Windows程序   时间:2014-08-17 12:55:42    阅读次数:262
ZOJ 3212 K-Nice (K)
K-NiceTime Limit:1 Second Memory Limit:32768 KB Special JudgeThis is a super simple problem. The description is simple, the solution is simple. If you...
分类:其他好文   时间:2014-08-17 02:16:11    阅读次数:273
LeetCode "Container With Most Water" - GREEDY?
O(n^2) is a naive solution. As rule of thumb, there must be O(n) soluion. Yes - greedy (WHY?)class Solution {public: int maxArea(vector &height) ...
分类:其他好文   时间:2014-08-16 15:04:30    阅读次数:153
ubuntu安装软件或upgrade出现 You might want to run 'apt-get -f install' to correct these
今天在ubuntu下安装任何软件都提示以下错误:You might want to run 'apt-get -f install' to correct these:The following packages have unmet dependencies:kate : Depends: kde...
分类:其他好文   时间:2014-08-16 13:49:20    阅读次数:454
LeetCode-Evaluate Reverse Polish Notation[AC源码]
1 package com.lw.leet2; 2 3 /** 4 * @ClassName:Solution 5 * @Description: 6 * Evaluate the value of an arithmetic expression in Reverse P...
分类:其他好文   时间:2014-08-16 13:44:40    阅读次数:211
LeetCode "Sudoku Solver"
Simply DFS + Backtrace, as N-Queenclass Solution {public: vector> rows; vector> cols; vector>> subboxHm; bool isValid(char c, int i, int j...
分类:其他好文   时间:2014-08-16 07:29:10    阅读次数:166
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!