摘要:
原题: "640.Solve the Equation" Solve a given equation and return the value of x in the form of string "x= value". The equation contains only '+', ' ' op 阅读全文
posted @ 2018-08-21 21:27
默写年华
阅读(156)
评论(0)
推荐(0)
摘要:
原题: "670.Maximum Swap" Given a non negative integer, you could swap two digits at most once to get the maximum valued number. Return the maximum value 阅读全文
posted @ 2018-08-21 21:27
默写年华
阅读(103)
评论(0)
推荐(0)
摘要:
原题: "29. Divide Two Integers" Divide two integers without using multiplication, division and mod operator. If it is overflow, return MAX_INT. 题目大意:不用乘 阅读全文
posted @ 2018-08-21 21:24
默写年华
阅读(142)
评论(0)
推荐(0)
摘要:
"原题462. Minimum Moves to Equal Array Elements II" 题目大意: 给你一串数字,对于每个数字,一次性可以移动一步(数值增加1或者减小1),请问如何在最小的步伐数内使所有的数字都相等 Example Input: [1,2,3] Output: 2 Exp 阅读全文
posted @ 2018-08-21 21:21
默写年华
阅读(103)
评论(0)
推荐(0)
摘要:
"原题:781. Rabbits in Forest" 题目大意: 森林里每只兔子报告说有多少只兔子和它的颜色一样,求森林里最少有几只兔子? 解题思路: 首先确定有多少只兔子的说法相同,假设有 a[i] 只兔子都说和它颜色相同的兔子有 i 只,那么要分析 a[i] 与 i 的关系。比如说,3只兔子说 阅读全文
posted @ 2018-08-21 21:20
默写年华
阅读(174)
评论(0)
推荐(0)
摘要:
"原题:592. Fraction Addition and Subtraction" 题目大意: 给出一个分数字符串式子(分子分母都是1~10),求其和 解题思路: 利用 ,它可以自动地实现字符串和数字之间的转换,比如 1/2,可以输出为 1,/,2,把每个数取出来后就通分进行计算 代码: 以上 阅读全文
posted @ 2018-08-21 21:19
默写年华
阅读(99)
评论(0)
推荐(0)
摘要:
"原题:858. Mirror Reflection" There is a special square room with mirrors on each of the four walls. Except for the southwest corner, there are receptor 阅读全文
posted @ 2018-08-21 21:16
默写年华
阅读(379)
评论(0)
推荐(0)
摘要:
"原题:869. Reordered Power of 2" Starting with a positive integer N, we reorder the digits in any order (including the original order) such that the lea 阅读全文
posted @ 2018-08-21 21:13
默写年华
阅读(238)
评论(0)
推荐(0)
摘要:
1. \ 一级标题 \ 二级标题 \ 三级标题 2. 引用 > +空格 + 引用内容” 3. 粗体 \ \ 文字 4. 斜体 \ 文字 5. 段首空格 推荐全角空格,切换到全角模式下(一般的中文输入法都是按 shift + space)输入两个空格就行了。这个相对 来说稍微干净一点,而且宽度是 阅读全文
posted @ 2018-08-21 21:03
默写年华
阅读(127)
评论(0)
推荐(0)
摘要:
1. Hello World Linux 系统根据 " !" 及该字串后面的信息确定该文件的类型,可以通过 man magic命令 及 /usr/share/magic 文件来了解这方面的更多内容。 在 BASH 中 第一行的 " !" 及后面的 /bin/bash 就表明该文件是一个 BASH 程 阅读全文
posted @ 2018-08-21 21:02
默写年华
阅读(290)
评论(0)
推荐(0)