随笔分类 -  c++

摘要:项目主页:http://grinninglizard.com/tinyxml2docs/index.html tinyxml2.h /*Original code by Lee Thomason (www.grinninglizard.com)This software is provided... 阅读全文
posted @ 2017-11-17 22:28 wangyaning 阅读(1683) 评论(0) 推荐(0)
摘要:Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. • push(x) – Push element x onto stack. • p... 阅读全文
posted @ 2017-11-17 22:28 wangyaning 阅读(182) 评论(0) 推荐(0)
摘要:Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as 00000010100101000001111010011100)... 阅读全文
posted @ 2017-11-17 22:28 wangyaning 阅读(120) 评论(0) 推荐(0)
摘要:今天看了一个华为西安研究院的一个女生代码大神的总结很有感悟,下面这句话送给大家:只有好的程序员才能写出人类可以理解的代码You are a professional robber planning to rob houses along a street. Each house ha... 阅读全文
posted @ 2017-11-17 22:28 wangyaning 阅读(157) 评论(0) 推荐(0)
摘要: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 occ... 阅读全文
posted @ 2017-11-17 22:28 wangyaning 阅读(121) 评论(0) 推荐(0)
摘要: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... 阅读全文
posted @ 2017-11-17 22:28 wangyaning 阅读(91) 评论(0) 推荐(0)
摘要: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 intege... 阅读全文
posted @ 2017-11-17 22:28 wangyaning 阅读(192) 评论(0) 推荐(0)
摘要:Remove all elements from a linked list of integers that have valueval.ExampleGiven: 1 --> 2 --> 6 --> 3 --> 4 --> 5 --> 6, val = 6Return: 1 --> 2 --... 阅读全文
posted @ 2017-11-17 22:28 wangyaning 阅读(102) 评论(0) 推荐(0)
摘要:Description:Count the number of prime numbers less than a non-negative number, n 提示晒数法:http://en.wikipedia.org/wiki/Sieve_of_Eratostheneshttps://p... 阅读全文
posted @ 2017-11-17 22:28 wangyaning 阅读(116) 评论(0) 推荐(0)
摘要:概述排序有内部排序和外部排序,内部排序是数据记录在内存中进行排序,而外部排序是因排序的数据很大,一次不能容纳全部的排序记录,在排序过程中需要访问外存。我们这里说说八大排序就是内部排序。 当n较大,则应采用时间复杂度为O(nlog2n)的排序方法:快速排序、堆排序或归并排序序。 快速排序:... 阅读全文
posted @ 2017-11-17 22:28 wangyaning 阅读(324) 评论(0) 推荐(0)
摘要:http://www.cnblogs.com/sleepwalker/p/3676600.html?utm_source=tuicoolhttp://blog.csdn.net/carson2005/article/details/9502053 Retinex理论Retinex理论始于Lan... 阅读全文
posted @ 2017-11-17 22:28 wangyaning 阅读(272) 评论(0) 推荐(0)
摘要:问题来源:http://bbs.csdn.net/topics/390998279?page=1#post-398983061 // Only_once.cpp : 定义控制台应用程序的入口点。////请参考>#include "StdAfx.h"#include #include usi... 阅读全文
posted @ 2017-11-17 22:28 wangyaning 阅读(358) 评论(0) 推荐(0)
摘要:话不多说,上代码: #include #include #include using namespace std;const int DO = 261;const int RE = 293;const int MI = 329;const int FA = 349;const int SO = 39... 阅读全文
posted @ 2017-11-17 22:28 wangyaning 阅读(374) 评论(0) 推荐(0)
摘要:转载请注明出处:http://blog.csdn.net/wangyaninglm/article/details/44151213,来自:shiter编写程序的艺术 1.绪论图切割算法是组合图论的经典算法之一。近年来,许多学者将其应用到图像和视频分割中,取得了很好的效果。本文简单介绍了图切算法和交... 阅读全文
posted @ 2017-11-17 22:28 wangyaning 阅读(594) 评论(0) 推荐(0)
摘要:题目:输入一个正整数,若该数能用几个连续正整数之和表示,则输出所有可能的正整数序列。一个正整数有可能可以被表示为n(n>=2)个连续正整数之和,如: 15=1+2+3+4+5 15=4+5+6 15=7+8有些数可以写成连续N(>1)个自然数之和,比如14=2+3+4+5;有些不能,比如8.那么如何... 阅读全文
posted @ 2017-11-17 22:28 wangyaning 阅读(1232) 评论(0) 推荐(0)
摘要:题目:输入一个正整数,若该数能用几个连续正整数之和表示,则输出所有可能的正整数序列。一个正整数有可能可以被表示为n(n>=2)个连续正整数之和,如: 15=1+2+3+4+5 15=4+5+6 15=7+8有些数可以写成连续N(>1)个自然数之和,比如14=2+3+4+5;有些不能,比如8.那么如何... 阅读全文
posted @ 2017-11-17 22:27 wangyaning 阅读(257) 评论(0) 推荐(0)
摘要:转载请注明出处:http://blog.csdn.net/wangyaninglm/article/details/44151213,来自:shiter编写程序的艺术 1.绪论图切割算法是组合图论的经典算法之一。近年来,许多学者将其应用到图像和视频分割中,取得了很好的效果。本文简单介绍了图切算法和交... 阅读全文
posted @ 2017-11-17 22:27 wangyaning 阅读(18184) 评论(0) 推荐(2)
摘要:上代码先:问题代码来源:http://blog.csdn.net/v_JULY_v // MaxSum.cpp : 定义控制台应用程序的入口点。////copyright@ July//July、updated,2011.05.25。#include "stdafx.h"#include usi... 阅读全文
posted @ 2017-11-17 22:27 wangyaning 阅读(155) 评论(0) 推荐(0)
摘要:2010 年中兴面试题 编程求解: 输入两个整数n 和m,从数列1,2,3.......n 中随意取几个数, 使其和等于m ,要求将其中所有的可能组合列出来。// 21 题递归方法 //copyright@ July && yansha //July、yansha,updated。 #include... 阅读全文
posted @ 2017-11-17 22:27 wangyaning 阅读(299) 评论(0) 推荐(0)
摘要:概述排序有内部排序和外部排序,内部排序是数据记录在内存中进行排序,而外部排序是因排序的数据很大,一次不能容纳全部的排序记录,在排序过程中需要访问外存。我们这里说说八大排序就是内部排序。 当n较大,则应采用时间复杂度为O(nlog2n)的排序方法:快速排序、堆排序或归并排序序。 快速排序:... 阅读全文
posted @ 2017-11-17 22:27 wangyaning 阅读(1069) 评论(0) 推荐(0)