![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
每日练习
heishan77
这个作者很懒,什么都没留下…
展开
-
C语言实现字符串中把空格换成%20问题
今天在笔试的时候遇到了一个题目,现在记录下来学习学习,题目就是把字符串中的空格换成“%20”,遇到这个问题会想到“%20”是一个字符还是3个字符,我当时就认为2个字符,'%','2','0'.实现这个代码的基本思想是:确定字符串数组的长度,和空格的个数,最后得到的字符串的长度为原字符串长度+2空格个数,从最后一个符号进行复制就可以了。#includevoid blankreplace(原创 2015-04-09 20:57:10 · 2227 阅读 · 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 NA P原创 2015-05-23 20:45:20 · 335 阅读 · 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 · 166 阅读 · 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 · 97 阅读 · 0 评论