摘要: 目前没通过;https://leetcode-cn.com/problems/3sum/ /** * Return an array of arrays of size *returnSize. * The sizes of the arrays are returned as *returnCol 阅读全文
posted @ 2020-07-18 23:56 yushimeng 阅读(113) 评论(0) 推荐(0) 编辑
摘要: char * longestCommonPrefix(char ** strs, int strsSize){ char ch; int len=0, i, j; if (strsSize < 1) {return "";} len = strlen(strs[0]); for (i=1; i<st 阅读全文
posted @ 2020-07-18 23:10 yushimeng 阅读(108) 评论(0) 推荐(0) 编辑
摘要: int romanToInt(char * s){ int count = 0; while (*s) { switch(*s) { case 'I': if (*(s+1) == 'V' || *(s+1) == 'X') count -= 1; else count += 1; break; c 阅读全文
posted @ 2020-07-18 22:53 yushimeng 阅读(108) 评论(0) 推荐(0) 编辑
摘要: char * intToRoman(int num){ int symInt[13]={1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1}; char *symStr[13]={"M", "CM", "D", "CD", "C",&# 阅读全文
posted @ 2020-07-18 22:46 yushimeng 阅读(87) 评论(0) 推荐(0) 编辑
摘要: 给你 n 个非负整数 a1,a2,...,an,a56爆大奖在线娱乐数代表坐标中的一个点 (i, ai) 。在坐标内画 n 条垂直线,垂直线 i 的两个端点分别为 (i, ai) 和 (i, 0)。找出其中的两条线,使得它们与 x 轴共同构成的容器可以容纳最多的水。 说明:你不能倾斜容器,且 n 的值至少为 2。 阅读全文
posted @ 2020-07-18 22:24 yushimeng 阅读(96) 评论(0) 推荐(0) 编辑