上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 35 下一页

2017年9月12日

c语言-指针和字符串

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

posted @ 2017-09-12 14:55 sichenzhao 阅读(257) 评论(0) 推荐(0) 编辑

Leetcode c语言-Longest Common Prefix

摘要: Title:Write a function to find the longest common prefix string amongst an array of strings.这道题目不难,唯一要注意的是二重指针的使用,因为给了一个字符串数组,也就是一个二维数... 阅读全文

posted @ 2017-09-12 11:33 sichenzhao 阅读(468) 评论(0) 推荐(0) 编辑

2017年9月11日

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.这道题和上道题相反,将罗马数字转换成数字。两... 阅读全文

posted @ 2017-09-11 22:18 sichenzhao 阅读(117) 评论(0) 推荐(0) 编辑

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.这道题目就是将数字转换成罗马数字。比较简单。... 阅读全文

posted @ 2017-09-11 21:53 sichenzhao 阅读(123) 评论(0) 推荐(0) 编辑

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 s... 阅读全文

posted @ 2017-09-11 14:43 sichenzhao 阅读(88) 评论(0) 推荐(0) 编辑

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 integ... 阅读全文

posted @ 2017-09-11 14:23 sichenzhao 阅读(122) 评论(0) 推荐(0) 编辑

2017年9月10日

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... 阅读全文

posted @ 2017-09-10 21:45 sichenzhao 阅读(203) 评论(0) 推荐(0) 编辑

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 assu... 阅读全文

posted @ 2017-09-10 21:40 sichenzhao 阅读(132) 评论(0) 推荐(0) 编辑

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 pa... 阅读全文

posted @ 2017-09-10 10:20 sichenzhao 阅读(400) 评论(0) 推荐(0) 编辑

2017年9月9日

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... 阅读全文

posted @ 2017-09-09 11:55 sichenzhao 阅读(281) 评论(0) 推荐(0) 编辑

上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 35 下一页

导航