自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

hahachenchen789的博客

What does not kill me,makes me stronger.

  • 博客(40)
  • 收藏
  • 关注

原创 Leetcode Java-Combination Sum

Title:iven a set of candidate numbers (C) (without duplicates) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.The same repeated number may

2017-09-29 15:18:20 486

原创 LeetCode c语言- Count and Say

TiTle:The count-and-say sequence is the sequence of integers with the first five terms as following:1. 12. 113. 214. 12115. 1112211 is read off as "one 1" or 11.

2017-09-28 20:55:36 1758

原创 CCN-lite的安装及场景实现

CCN-lite是CCN的一个轻量实现。网站:http://www.ccn-lite.net/最新源码:https://github.com/cn-uofbasel/ccn-lite/releases/tag/0.3.0Ubuntu下的安装:1.需要openssl的库支持:sudo apt-get install libssl-dev2.设置环境变量export

2017-09-28 17:06:39 1142 1

原创 Leetcode c语言-Valid Sudoku

Title:Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules.The Sudoku board could be partially filled, where empty cells are filled with the character '.'.A par

2017-09-27 23:36:40 596

原创 Leetcode c语言-Search Insert Position

Title:Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.You may assume no duplicates i

2017-09-26 23:22:57 714

原创 LeetCode c语言-Search for a Range

Title:Given an array of integers sorted in ascending order, find the starting and ending position of a given target value.Your algorithm's runtime complexity must be in the order of O(log n)

2017-09-26 10:29:43 476

原创 Leetcode c语言-Search in Rotated Sorted Array

Title:Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).You are given a target value to sea

2017-09-24 23:59:49 526

原创 CCN(content centric networking)介绍

ICN工作原理简单介绍:当我们想要获取某项信息时,我们所获得的信息并不一定是信息所在的服务器传输过来的,而是由最近节点中缓存传输过来的。CCN是研究最多的ICN的一种具体实现。在CCN中主要有两种数据包:内容请求包(interest packet)和内容数据包(data packet)在CCN中,通过对内容的标识来确定内容,类似于IP地址前缀,例如"/aaa

2017-09-21 16:44:14 8255

原创 ICN(Information centric networking)体系结构和技术实现

ICN的目的是把内容与终端位置剥离,通过发布/订阅范式(Publish/Subscribe Paradigm)来提供存储和多方通信等服务。什么是发布/订阅范式(Publish/Subscribe Paradigm)发布/订阅范式是消息队列范例的一种,是一个更大的消息中间件系统的一部分。发布者只负责发布信息,订阅者可以订阅多个发布者所发布的信息,两者之间不用理会是谁发布和谁订阅,而通

2017-09-21 10:32:08 15773 2

原创 ICN(Information-Centric Networking)初步介绍

当前的互联网体系结构是基于终端间包交换的点到点连接通信架构。随着实时视频、话音等通信业务量的日益激增,由于TCP/IP体系固有结构的束缚,互联网传输、处理这些实时多媒体数据的能力受到越来越大的挑战,体现在效率低下、用户体验差。总结如下,目前基于TCP/IP的互联网体系架构具有以下缺点:1.不安全,可靠性差2.大量信息冗余,资源浪费3.系统由简变繁,复杂度高。因此信息中心

2017-09-21 09:41:27 6226

原创 Leetcode c语言-Next Permutation

Title:Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangement is not possible, it must rearrange it as the low

2017-09-20 19:24:21 653

转载 计算机与通信会议排名

附件是计算机领域的学术会议等级排名情况,分为A+, A, B, C, L 共5个档次。其中A+属于顶级会议,基本是这个领域全世界大牛们参与和关注最多的会议。国内的研究者能在其中发表论文的话,是很值得骄傲的成就。A类也是非常好的会议了,尤其是一些热门的研究方向,A类的会议投稿多录用率低,部分A类会议影响力逐步逼近A+类会议。B类的会议分两种,一种称为盛会级,参与的人多,发表的论文也多,论

2017-09-20 10:47:14 8771

原创 Leetcode c语言-Divide Two Integers

Title:Divide two integers without using multiplication, division and mod operator.If it is overflow, return MAX_INT.这道题就是实现除法,而且不能用到乘法,除法和取余。第一想法是利用加法,对于一般情况,被除数和除数都是正数,不断累加除数,直到除数

2017-09-19 21:38:43 696

原创 windows+sublime text3+MINGW编译运行c

在linux下,编译运行c或者c++或python等非常简单,因为包含了gcc,g++编译器和python解释器。在windows下,可以利用MINGW安装gcc和g++编译器。MINGW:是Minimalist GNUfor Windows的缩写。MINGW提供了一键自动安装的傻瓜式安装软件,地址:https://sourceforge.net/projects/mi

2017-09-19 16:23:25 2740 1

原创 Leetcode c语言-Implement strStr()

Title:Implement strStr().Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.这道题是实现c的库函数,strstr(str1,str2),也就是返回子字符串str2在str1中第一次

2017-09-19 16:02:54 1047

原创 Leetcode c语言-Remove Element

Title:Given an array and a value, remove all instances of that value in place and return the new length.Do not allocate extra space for another array, you must do this in place with constant

2017-09-19 13:36:32 682

原创 Leetcode c语言-Remove Duplicates from Sorted Array

Title:Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.Do not allocate extra space for another array, you must do this i

2017-09-19 11:24:31 784

原创 Leetcode c语言-Swap Nodes in Pairs

Title: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 const

2017-09-18 23:36:43 741

原创 LeetCode c语言-Generate Parentheses和买票找零问题

Title:Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, given n = 3, a solution set is:[ "((()))", "(()())", "(())()",

2017-09-18 17:35:23 1617

原创 Leetcode c语言- Merge Two Sorted Lists

Title:Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.这道题给定两个从小到大排列好的链表,然后合并为一个,要求新链表也是从小到大排列。

2017-09-18 13:45:15 1199

原创 Leetcode c语言-Valid Parentheses

Title:Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.The brackets must close in the correct order, "()" and "()[]{}" ar

2017-09-17 22:46:24 1261

原创 Leetcode c语言-Remove Nth Node From End of List

Title:Given a linked list, remove the nth node from the end of list and return its head.For example, Given linked list: 1->2->3->4->5, and n = 2. After removing the second node from

2017-09-17 19:07:25 1050

原创 Leetcode c语言-4Sum

Title:Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of target.Note: 

2017-09-17 13:01:05 421 1

原创 Letter c语言-Combinations of a Phone Number

Title:Given a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the telephone buttons) is given below.In

2017-09-13 23:41:16 1455

原创 对递归算法的理解

最近刷leecode题时,碰到题目需要用到递归算法,否则基本无解。接下来结合实例谈谈本人对递归算法的理解。对递归算法的形象解释:想象用一本纯英文词典查单词,要查某一个单词的意思,翻到这个单词时,看解释,发现解释中有一个单词不认识,所以,无法明白这个要查的单词是什么意思;这时,再用这本词典(函数本身)查那个不认识的单词,又发现查的第2个单词的解释中又有一个单词不认识,那么,又

2017-09-13 23:09:28 712

原创 Leetcode c语言-3Sum Closest

Title:Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would

2017-09-13 15:32:01 519

原创 Leetcode c语言-3Sum

Title:Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.Note: The solution set mu

2017-09-13 15:15:24 907

转载 c语言-指针和字符串

1、  字符串的表示形式在C语言中,我们可以用两种方式访问字符串(1)       用字符数组存放一个字符串,然后输出该字符串。main(){   char string[]="I love China!";   printf("%s\n", string);}(2)       用字符指针指向一个字符串。可以不定义字符数组,而定义一个字符指

2017-09-12 14:55:12 358

原创 Leetcode c语言-Longest Common Prefix

Title:Write a function to find the longest common prefix string amongst an array of strings.这道题目不难,唯一要注意的是二重指针的使用,因为给了一个字符串数组,也就是一个二维数组,strs[][],对于第一个字符串,应该是strs[0],对于第一个字符串中的第一个字符,应该是strs[0][

2017-09-12 11:33:05 741

原创 Leetcode c语言-Roman to Integer

Title:Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.这道题和上道题相反,将罗马数字转换成数字。两种解法:第一种,穷举法,列举出所有可能。这是所有罗马数字的整数,从1-3999. 任

2017-09-11 22:17:46 445

原创 Leetcode c语言-Integer to Roman

Title:Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.这道题目就是将数字转换成罗马数字。比较简单。Solutions:char* intToRoman(int num) { char*

2017-09-11 21:53:23 596

原创 Leetcode c语言-Container With Most Water

Title:Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (

2017-09-11 14:43:17 343

原创 Leetcode c语言-Palindrome Number

Title:Determine whether an integer is a palindrome. Do this without extra space.click to show spoilers.Some hints:Could negative integers be palindromes? (ie, -1)If you are thinking of c

2017-09-11 14:23:25 306

原创 Leetcode c语言-String to Integer (atoi)

Implement atoi to convert a string to an integer.Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input ca

2017-09-10 21:44:51 842

原创 Leetcode c语言-Reverse Integer

Reverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321click to show spoilers.Note:The input is assumed to be a 32-bit signed integer. Your function

2017-09-10 21:40:14 228

原创 Leetcode c语言-ZigZag Conversion

Title:The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility)P A H

2017-09-10 10:20:20 390

原创 Leetcode c语言-Longest Palindromic Substring

Title:Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000.Example:Input: "babad"Output: "bab"Note: "aba" is also a valid

2017-09-09 11:54:43 1318

原创 Leetcode c语言-Longest Substring Without Repeating Characters

Title:Given a string, find the length of the longest substring without repeating characters.Examples:Given "abcabcbb", the answer is "abc", which the length is 3.Given "bbbbb", the

2017-09-09 11:30:08 548

原创 Leetcode c语言-Add Two Numbers

Title:You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers

2017-09-08 10:47:50 414

原创 Leetcode c语言-Two Sum

Leedcode上面的题对面试很有帮助,problem上的solutions也有很多,但都是java,python,c++,js等高级语言的解答,用c的很少,Leecode也是在不久前才增加了对c的支持,接下来本人开始对problem进行c语言解答。Title:Given an array of integers, return indices of the two num

2017-09-08 10:15:04 716

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除