![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Codewars的实战积累
next_paradise
就读于中南大学,目前属于小白一个,希望在平台上多多学习,共同进步,请多多指教
展开
-
Codewars一些积累No.4 string类对字符串的操作
目录前言正文C语言时期的字符串操作方式C++时期对字符串的操作方式string类的用法1.声明2.用法1)赋值:=,assign()2)插入:insert()3)元素存取:[ ],at( )4)求字符串的长度:length(),size(),empty()5)添加字符:push_back()6)拼接:+,append()7)删除:clear(),erase() 前言 Emmm…最进由于学校里在学习...原创 2020-04-11 23:53:51 · 437 阅读 · 0 评论 -
Codewars一些积累No.3 从罗马数字编码器来初探string的实用用法
文章目录1.开头2.具体先看题目内容1)要求2)例子3.我的又一次头秃探索1)认识罗马数字计数方法2)认识基本string操作1.字符串的生成2.字符串的大小和容量3.string的插入:push_back() 和 insert()4.string拼接字符串:append() & + 操作符5.string的删除:erase()3)我的实现构想 1.开头 今天在Codewars上又是碰到一...原创 2020-03-23 01:10:22 · 390 阅读 · 0 评论 -
Codewar一些积累No.2 从矩阵的加法体会vector的用法
用代码实现矩阵加法问题 最近在Codewar上看到一个有趣的问题是关于矩阵的加法问题. 题目中, 我所要编写的函数的传入参数是两个向量, 而且此向量是嵌套的, 具体内容如下: std::vector<std::vector<int> > matrixAddition(std::vector<std::vector<int> > a,std::vect...原创 2020-03-18 11:22:00 · 216 阅读 · 0 评论 -
CodeWars一些积累No.1 超市排队的实现
超市排队问题(多窗口服务时间) 要求 There is a queue for the self-checkout tills at the supermarket. Your task is write a function to calculate the total time required for all the customers to check out! input custom...原创 2020-03-15 20:24:05 · 339 阅读 · 0 评论