- 博客(20)
- 收藏
- 关注
转载 (Java)IDEA 创建一个简单的 “Hello world”
早就听说IDEA 好用,今天晚上终于下载下来了,下载---安装--破解 一气呵成~起飞的地址看下面,这哥们的博客也很帅~https://www.cnblogs.com/jajian/p/7989032.html 下面正文开始接下来在弹出窗口如下:接下来界面是这样的,问我们是否需要模板,不勾! 谁知道模板长啥样啊,以后熟悉...
2018-12-18 23:12:00 164
原创 8.8
在精确的4SAT问题中,输入为一组字句,每个字句都是恰好4个文字的析取,且每个变量最多在每个字句中出现一次,目标是求它的满足赋值——如果赋值存在,证明精确的4SAT是NP完全问题证明: 首先很显然,EXACT 4SAT问题是NP问题。现在通过将3SAT归约到EXACT 4SAT来证明后者的NP完全性。对于任意一个3SAT实例,如果其中某个字句包含了同一个文字多次,那么可
2017-07-13 22:28:16 223
原创 400. Nth Digit
Find the nth digit of the infinite integer sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ...Note:n is positive and will fit within the range of a 32-bit signed integer (n 31).Example 1:Input
2017-06-11 23:05:02 183
原创 300. Longest Increasing Subsequence
Given an unsorted array of integers, find the length of longest increasing subsequence.For example,Given [10, 9, 2, 5, 3, 7, 101, 18],The longest increasing subsequence is [2, 3, 7, 101], ther
2017-06-04 21:40:31 186
原创 64. Minimum Path Sum
Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path.Note: You can only move either down or right at
2017-06-04 21:28:12 160
原创 474. Ones and Zeroes
474. Ones and ZeroesDescriptionHintsSubmissionsSolutionsTotal Accepted: 9812Total Submissions: 25753Difficulty: MediumContributors:piy9In the computer world,
2017-06-04 21:12:12 209
原创 62. Unique Paths
A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below).The robot can only move either down or right at any point in time. The robot is trying to reach the
2017-06-01 17:36:10 184
原创 343. Integer Break
Given a positive integer n, break it into the sum of at least two positive integers and maximize the product of those integers. Return the maximum product you can get.For example, given n = 2, ret
2017-05-21 18:23:39 157
原创 Counting Bits
Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1's in their binary representation and return them as an array.Example:For num = 5
2017-05-15 23:21:31 183
原创 Target Sum
You are given a list of non-negative integers, a1, a2, ..., an, and a target, S. Now you have 2 symbols + and -. For each integer, you should choose one from + and - as its new symbol.Find out
2017-05-07 22:20:04 142
原创 Climbing Stairs
You are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?Note: Given n will be a posi
2017-05-01 19:45:56 216
原创 112. Path Sum
Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.For example:Given the below binary tree and sum
2017-04-23 10:49:50 162
原创 235. Lowest Common Ancestor of a Binary Search Tree
Add to ListDescriptionHintsSubmissionsSolutionsTotal Accepted: 129842Total Submissions: 337481Difficulty: EasyContributor: LeetCodeGiven a binary search tree (BST
2017-04-16 12:04:28 205
原创 543. Diameter of Binary Tree
Given a binary tree, you need to compute the length of the diameter of the tree. The diameter of a binary tree is the length of the longest path between any two nodes in a tree. This path may or may n
2017-04-09 17:46:14 166
原创 Course Schedule
There are a total of n courses you have to take, labeled from 0 to n - 1.Some courses may have prerequisites, for example to take course 0 you have to first take course 1, which is expressed as
2017-04-02 23:12:05 226
原创 399. Evaluate Division
Equations are given in the format A / B = k, where A and B are variables represented as strings, and k is a real number (floating point number). Given some queries, return the answers. If the answ
2017-03-27 00:16:01 167
原创 Different Ways to Add Parentheses
Given a string of numbers and operators, return all possible results from computing all the different possible ways to group numbers and operators. The valid operators are +, - and *.Example 1
2017-03-20 14:29:57 260
原创 215. Kth Largest Element in an Array
寻找第K大的数,可以有很多的方法。一般而言想到的最简单的方法都是先对数组进行排序,然后直接选择第K个数,就是第k大的数。这样做的话,时间为O(nlogn)。那是否还有更快的方法呢? 我们可以使用分治算法的思想。参考快速排序,寻找到一个中点pivot,该中点把左半部分和右半部分分开,右半部分的值均大于左半部分。若K pivot,对右半部分继续实行上述步骤。直到K = pivot时,
2017-03-12 19:42:04 195
原创 448. Find All Numbers Disappeared in an Array
Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once.Find all the elements of [1, n] inclusive that do not appear in this array.Coul
2017-03-05 13:13:38 190
原创 485. Max Consecutive Ones
Given a binary array, find the maximum number of consecutive 1s in this array.Example 1:Input: [1,1,0,1,1,1]Output: 3Explanation: The first two digits or the last three digits are consecutive
2017-02-27 13:00:31 300
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人