11 2023 档案

摘要:code: int maxProduct(char ** words, int wordsSize){ int a[wordsSize]; //目标字符串转换成整型数组元素 int maxlen = 0; //最大长度乘积 for(int i = 0; i < wordsSize ;++i){ // 阅读全文
posted @ 2023-11-07 22:27 2B青年~ 阅读(26) 评论(0) 推荐(0)
摘要:123456 -> 456123,相当于是将数据形成了一个环,对于这些数据for(i = 0;i<n;++i), 想回到第几位,就这样写 i = (i + target )% n;不加target相当于成环但是位次没有移动,target为移动的长度; 阅读全文
posted @ 2023-11-04 10:19 2B青年~ 阅读(20) 评论(0) 推荐(0)
摘要:code: #include <stdio.h>#include <malloc.h>#include <string.h>char *CanTwo(int n) //其实应该定义为字符串常量,因为yes和no定义后不能再改变,变就是定义成字符串数组{ char *a="YES"; char *b= 阅读全文
posted @ 2023-11-03 16:48 2B青年~ 阅读(33) 评论(0) 推荐(0)