每日练习
heishan77
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
C语言实现字符串中把空格换成%20问题
今天在笔试的时候遇到了一个题目,现在记录下来学习学习,题目就是把字符串中的空格换成“%20”,遇到这个问题会想到“%20”是一个字符还是3个字符,我当时就认为2个字符,'%','2','0'. 实现这个代码的基本思想是:确定字符串数组的长度,和空格的个数,最后得到的字符串的长度为原字符串长度+2空格个数,从最后一个符号进行复制就可以了。 #include void blankreplace(原创 2015-04-09 20:57:10 · 2387 阅读 · 2 评论 -
ZigZag Conversion
题目 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 N A P原创 2015-05-23 20:45:20 · 386 阅读 · 0 评论 -
Add Two Numbers
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 and return i...原创 2018-07-26 12:04:29 · 249 阅读 · 0 评论 -
Longest Substring Without Repeating Characters
Examples: Given "abcabcbb", the answer is "abc", which the length is 3. Given "bbbbb", the answer is "b", with the length of 1. Given "pwwkew", the answer is "wke", with the length of 3. Note t原创 2018-07-26 16:04:16 · 148 阅读 · 0 评论
分享