摘要: // language c // 剑指14-II // https://leetcode-cn.com/problems/jian-sheng-zi-ii-lcof/ // 操蛋的一题,妈的 int cuttingRope(int n){ if(n<=3) return n-1; if(n==4) 阅读全文
posted @ 2021-01-28 11:33 RougeBW 阅读(26) 评论(0) 推荐(0) 编辑
摘要: // language c // 剑指46 // https://leetcode-cn.com/problems/ba-shu-zi-fan-yi-cheng-zi-fu-chuan-lcof/ int translateNum(int num){ // 递归 if(num<10) return 阅读全文
posted @ 2021-01-28 10:38 RougeBW 阅读(27) 评论(0) 推荐(0) 编辑
摘要: // language c // 剑指56-I // https://leetcode-cn.com/problems/shu-zu-zhong-shu-zi-chu-xian-de-ci-shu-lcof/ // 通过了,但是肯定能优化,需要用到亦或,不太懂 /** * Note: The ret 阅读全文
posted @ 2021-01-28 08:28 RougeBW 阅读(32) 评论(0) 推荐(0) 编辑
摘要: // language c // 剑指13 // https://leetcode-cn.com/problems/ji-qi-ren-de-yun-dong-fan-wei-lcof/comments/ int movingCount(int m, int n, int k){ // 先整一个算数 阅读全文
posted @ 2021-01-28 06:06 RougeBW 阅读(37) 评论(0) 推荐(0) 编辑
摘要: // language c // 剑指66 // https://leetcode-cn.com/problems/gou-jian-cheng-ji-shu-zu-lcof/ /** * Note: The returned array must be malloced, assume calle 阅读全文
posted @ 2021-01-28 05:42 RougeBW 阅读(40) 评论(0) 推荐(0) 编辑
摘要: // language c // 剑指31 // https://leetcode-cn.com/problems/zhan-de-ya-ru-dan-chu-xu-lie-lcof/ bool validateStackSequences(int* pushed, int pushedSize, 阅读全文
posted @ 2021-01-28 05:31 RougeBW 阅读(34) 评论(0) 推荐(0) 编辑
摘要: // language c // 剑指26 // https://leetcode-cn.com/problems/shu-de-zi-jie-gou-lcof/ // 绕了半天才搞出来,由于本人c基础薄弱,只能想出用链表来动态存储地址的低效存储方案,以后没事干可优化 /** * Definitio 阅读全文
posted @ 2021-01-28 04:39 RougeBW 阅读(43) 评论(0) 推荐(0) 编辑
摘要: // language c // 剑指47 // https://leetcode-cn.com/problems/li-wu-de-zui-da-jie-zhi-lcof/ // 用递归的方法做 int maxValue(int** grid, int gridSize, int* gridCol 阅读全文
posted @ 2021-01-28 02:58 RougeBW 阅读(40) 评论(0) 推荐(0) 编辑