- 博客(32)
- 资源 (7)
- 收藏
- 关注
原创 字符串大小写移动位置
腾讯 实习生题目小Q最近遇到了一个难题:把一个字符串的大写字母放到字符串的后面,各个字符的相对位置不变,且不能申请额外的空间。你能帮帮小Q吗?看到众多答案中 这是我最服的答案 没有之一!#include #include using namespace std;int main(){ string s; while(cin >> s){
2016-09-08 14:41:44
634
原创 205. Isomorphic Strings
Given two strings s and t, determine if they are isomorphic.Two strings are isomorphic if the characters in s can be replaced to get t.All occurrences of a character must be replaced with anot
2016-09-08 09:39:55
421
原创 299. Bulls and Cows
You are playing the following Bulls and Cows game with your friend: You write down a number and ask your friend to guess what the number is. Each time your friend makes a guess, you provide a hint t
2016-08-31 16:11:38
483
原创 389. Find the Difference
Given two strings s and t which consist of only lowercase letters.String t is generated by random shuffling string s and then add one more letter at a random position.Find the letter that was
2016-08-30 15:58:10
530
原创 101. Symmetric Tree
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree [1,2,2,3,4,4,3] is symmetric: 1 / \ 2 2 / \ / \3 4 4 3
2016-08-24 19:08:37
432
原创 102. Binary Tree Level Order Traversal
Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level).For example:Given binary tree [3,9,20,null,null,15,7], 3 / \ 9 2
2016-08-23 19:27:36
332
转载 C++ STL--stack/queue 的使用方法
http://www.cnblogs.com/mfryf/archive/2012/08/09/2629992.html1、stackstack 模板类的定义在头文件中。stack 模板类需要两个模板参数,一个是元素类型,一个容器类型,但只有元素类型是必要的,在不指定容器类型时,默认的容器类型为deque。定义stack 对象的示例代码如下:stack s1;sta
2016-08-23 17:56:41
297
原创 二叉树的遍历
参考自:http://blog.youkuaiyun.com/fansongy/article/details/6798278/遍历即将树的所有结点访问且仅访问一次。按照根节点位置的不同分为前序遍历,中序遍历,后序遍历。前序遍历:根节点->左子树->右子树中序遍历:左子树->根节点->右子树后序遍历:左子树->右子树->根节点例如:求下面树的三种遍历
2016-08-23 16:37:48
365
原创 24. Swap Nodes in Pairs
Given a linked list, swap every two adjacent nodes and return its head.For example,Given 1->2->3->4, you should return the list as 2->1->4->3.Your algorithm should use only constant space. Y
2016-08-23 14:33:59
381
原创 141. Linked List Cycle
Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?为了不另开内存,可以用快慢指针来判别,如果有环那么快指针肯定会追上慢指针;fast=fast->next->next;slow=slow->next;判
2016-08-23 09:34:30
351
原创 345. Reverse Vowels of a String
Write a function that takes a string as input and reverse only the vowels of a string.Example 1:Given s = "hello", return "holle".Example 2:Given s = "leetcode", return "leotcede".Note
2016-08-22 23:45:51
365
原创 70. 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?拿到题目先莫方,可以先列几个试试;
2016-08-22 10:32:02
417
原创 235. Lowest Common Ancestor of a Binary Search Tree
Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST.According to the definition of LCA on Wikipedia: “The lowest common ancestor is defined betw
2016-08-22 00:57:31
452
原创 191. Number of 1 Bits (Hamming weight计算)
Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as the Hamming weight).For example, the 32-bit integer ’11' has binary representation 000000
2016-08-22 00:29:13
387
原创 202. Happy Number
Write an algorithm to determine if a number is "happy".A happy number is a number defined by the following process: Starting with any positive integer, replace the number by the sum of the squares
2016-08-22 00:16:57
407
原创 LeetCode 231: Power of Two
Given an integer, write a function to determine if it is a power of two.很简单的题目,但是可以有多种方法解决;一,求log2(n)用换底公式可以得到double res=log10(n)/log10(2);判断res是否为零。此法可以判断各种 幂的问题代码如下:class Solution {public
2016-08-21 23:19:30
418
原创 leetcode 383. Ransom Note
class Solution {public: bool canConstruct(string ransomNote, string magazine) { map m; int len1=ransomNote.size(); int len2=magazine.size(); int icount=0;
2016-08-20 12:30:02
1183
原创 2016 MSR Image Recognition Challenge (IRC) Results
MSR Image Recognition Challenge (IRC) @ IEEE ICME 2016 结果出来了,Top 5 accuracy rank 10,without extra data.总之各种被自动化所无情碾压。。。。。。纯粹是爱好Dog才参加的,一大堆论文要rebuttal,submit..........也算是一个交代吧,结果不重要,重要的是熟练地运行深度学习,训
2016-03-20 17:27:49
922
原创 微软 MSR Image Recognition Challenge 2016(IRC@ICME) 测试demo
参加微软举办的MSR Image Recognition Challenge 2016(IRC@ICME) 狗种分类大赛。我将自己训练的模型公开,欢迎大家试用我的demo。网址: http://tinyurl.com/xgz-dog可通过手机、平板、pc网页打开,然后上传进行识别。鉴于后台PC有可能关机断网,本demo仅供娱乐,谢绝商用这是我家的美国恶霸,欢迎提
2016-03-16 20:00:44
1269
原创 OpenCV dnn模块支持Caffe
#include #include #include using namespace cv;using namespace cv::dnn;#include #include #include using namespace std;/* Find best class for the blob (i. e. class with maximal probability) */
2016-01-07 22:20:16
7452
原创 OpenCV 3.10+Visual Studio 2013+Camera
#include #include #include #include using namespace std;using namespace cv;int main(){ //打开视频文件:其实就是建立一个VideoCapture结构 VideoCapture capture(0); //检测是否正常打开:成功打开时,isOpened返回ture if (!captur
2016-01-07 20:47:44
1006
原创 深度学习框架 Digits 3.0 安装运行
NVIDIA 不愧是推动Deep learning 的中坚力量,之前运行2.0版本正得心应手时,就推出了3.0 版本。Github地址:https://github.com/NVIDIA/DIGITS,3.0版本的安装使用更为简洁,极易上手。更新内容:The new DIGITS 3 release improves training productivity with enhance
2015-12-16 15:48:04
2772
原创 NVIDIA DIGITS2 Deep Convolutional Feature Visualization
相信大家对Digits 这个框架的简单、易上手印象深刻,本人也认为其测试的特征可视化结果较为醒目:但是该框架是如何实现的呢?通过https://groups.google.com/forum/#!topic/digits-users/eRGijUu9q30,发现位于digits-2.0/digits/model/tasks中 caffe_train.py https://
2015-12-11 20:46:34
922
原创 Caffe Matlab feature extraction 特征提取
Caffe 作为一款比较流行的DCNN特征提取框架已获得广泛应用。在CVPR/ICCV/ECCV关于DCNN的文章中屡屡出境。Caffe的安装步骤比较繁琐,但是网上相关的配置文章也有很多,本文就不再啰嗦。其中基于python的Caffe特征抽取可参考http://nbviewer.ipython.org/github/BVLC/caffe/blob/master/examples/net_su
2015-12-11 11:38:43
6971
原创 ASP.NET 无法向会话状态服务器发出会话状态请求请。确保 ASP.NET State Service (ASP.NET 状态服务)已启动
运行之后无法加载网页,老是提示 “无法向会话状态服务器发出会话状态请求请。确保 ASP.NET State Service (ASP.NET 状态服务)已启动......”现在的解决方案为:方法一:右击“我的电脑”-》“计算机管理”-》“服务和应用程序”-》“服务”,在服务中找到ASP.NET状态服务,启动ASP.NET 状态服务,就可以了。
2015-10-04 15:55:03
1002
原创 Faster R-CNN
Faster R-CNN 可以看做是对 Fast R-CNN 的进一步加速,最主要解决的如何快速获得 proposal。
2015-07-26 10:39:38
1892
1
原创 BRISK描述特征构建Bag-of-feature
BRISK描述特征构建Bag-of-feature,效果优于SURF描述,有没有在Spatial-Pyramid 上利用BRISK、ORB、FREAK之类的特征的?我们讨论一下
2015-03-23 20:33:24
1150
转载 模板匹配的基本概念
转自:http://blog.sina.com.cn/s/blog_4a9d14b30100lsp3.html模板匹配是数字图像处理的重要组成部分之一。把不同传感器或同一传感器在不同时间、不同成像条件下对同一景物获取的两幅或多幅图像在空间上对准,或根据已知模式到另一幅图中寻找相应模式的处理方法就叫做模板匹配。 简单而言,模板就是一幅已知的小图像。模板匹配就是在一幅大图像中搜寻
2013-11-26 14:32:33
1548
原创 BRISK与ORB对比
后两张效果就不好了,ORB的参数还要到features2D中修改,具体如何修改还要慢慢尝试,得到最佳值。 #include #include "brisk/brisk.h"#include #include #include #include #include #include #include //standard configuration fo
2013-10-27 17:31:24
3665
原创 BRISK 在VS2010 OpenCV2.44中的运行
因为BRISK是基于AGAST的,于是乎,在VS2010配置中一定不要忘了包含thirdpart 中agast—include,agast—include——agast,要不然会出现cvWrapper.h 无法找到的错误。工程——添加项——现有中,将所有agast——src下的文件添加进来,编译时会浪费点时间,但是你就离成功不远了。程序就是ETH网站上原汁原
2013-10-25 21:56:13
1780
2
原创 OpenCV2.44 在win7 64 VS2010下的配置
在Opencv中,最难的部分不是程序,而是配置。在无数次失败与尝试之后,终于成功,现将配置简要贴出。顺便帮自己记忆。环境变量配置:1,变量 OpenCV : path: D:\Program Files\Microsoft Visual Studio\Tools\WinNT;D:\Program Files\Microsoft Visual Studio
2013-10-25 20:37:57
1985
献给CV和CG入门者之科研经验浅问细答兼与大家探讨
2014-04-24
VLFEAT_0.9.17 OpenCv Matlab接口工具
2013-10-29
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人