- 博客(10)
- 收藏
- 关注
原创 大三暑假计算机学生的实习
在这里先感谢头条爸爸的拯救❤️内推是在学校论坛上找的,没有大佬们那么厉害,我一般都会凉在笔试那一关之前参加了大摩的笔试,大摩的大多数答案网上都有,以下有参考
2018-05-22 15:03:06
5543
转载 309. Best Time to Buy and Sell Stock with Cooldown---C语言
http://www.cnblogs.com/jdneo/p/5228004.html大佬的自动机大法好!
2017-07-26 20:35:16
293
原创 122. Best Time to Buy and Sell Stock II
大概意思是不是只找最大差值,而是把所有的差值全部找出来网上某个大佬提供了一个很巧妙的思路,就是把后一个减去前一个,然后得到差值如果大于零就加上去int maxProfit(int* prices, int pricesSize) { int i=1,profit=0; for(;i { if(prices[i]-prices[i-1]>0
2017-07-24 11:24:23
199
原创 121. Best Time to Buy and Sell Stock
动态规划 就是相当于每次找到最小的那个然后进行更新,接着看那个profit会不会变化int maxProfit(int* prices, int pricesSize) { int i,profit=0,min=prices[0],temp; if(pricesSize==0) return 0; for(i=1;i
2017-07-24 11:09:54
252
原创 VS2008中openGL开发环境配置(目前最全版)
来啊来啊,造福广大人民群众啦,首先感谢网上各位大神支援,但有些实际问题还是不一样的应老师要求 得装VS2008(惊了。。。)1.各种库的配置(1)glew下载:https://sourceforge.net/projects/glew/files/glew/1.7.0/glew-1.7.0.zip/download将include文件夹下的.h文件拷贝到C:\Progr
2017-07-19 19:38:56
1201
原创 337. House Robber III C语言
The thief has found himself a new place for his thievery again. There is only one entrance to this area, called the "root." Besides the root, each house has one and only one parent house. After a tour
2017-07-16 09:55:53
235
原创 213. House Robber II来啊接着抢劫
题目大概就是介个样子 ,然后我根据上次的基础改了一下,不是成环吗,所以得分第一个抢不抢int rob(int* nums, int numsSize) {int money[2],max=0,maxx=0;int t1=0;if(numsSize>1)//当不只有一个的时候,分第一个抢不抢{ if(t1==0)//第一个不抢{ money[0]=0;mo
2017-07-13 10:00:43
264
原创 来啊抢劫啊198. House Robber
题目如下:You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that adjacen
2017-07-12 18:08:42
185
原创 152. Maximum Product Subarray
题目:Find the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given the array [2,3,-2,4],the contiguous subarray [2,3] has the large
2017-07-11 10:00:45
190
原创 628. Maximum Product of Three Numbers
第一次刷leetcode是超级简单的一道题 一开始还以为是需要用到动态规划。。。题目如下:Given an integer array, find three numbers whose product is maximum and output the maximum product.Example 1:Input: [1,2,3]Output: 6Example
2017-07-10 19:32:03
177
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人