随笔分类 -  leetcode

leetcode算法题
摘要:leetcode算法题 pro1442 形成两个异或相等数组的三元组数目 原题地址:https://leetcode-cn.com/problems/count-triplets-that-can-form-two-arrays-of-equal-xor/ 题目描述 给你一个整数数组 arr 。 现 阅读全文
posted @ 2021-05-18 18:43 TidalCoast 阅读(56) 评论(0) 推荐(0)
摘要:leetcode算法题 pro999 二叉树的堂兄弟节点 原题地址:https://leetcode-cn.com/problems/cousins-in-binary-tree/ 题目内容 在二叉树中,根节点位于深度 0 处,每个深度为 k 的节点的子节点位于深度 k+1 处。 如果二叉树的两个节 阅读全文
posted @ 2021-05-17 20:21 TidalCoast 阅读(67) 评论(0) 推荐(0)
摘要:leetcode算法题 pro13 罗马数字转整数 原题地址:https://leetcode-cn.com/problems/roman-to-integer/ 题目内容 罗马数字包含以下七种字符: I, V, X, L,C,D 和 M。 字符 数值I 1V 5X 10L 50C 100D 500 阅读全文
posted @ 2021-05-15 16:53 TidalCoast 阅读(47) 评论(0) 推荐(0)
摘要:leetcode算法题 pro12 整数转罗马数字 原题地址:https://leetcode-cn.com/problems/integer-to-roman/ 题目内容 罗马数字包含以下七种字符: I, V, X, L,C,D 和 M。 字符 数值I 1V 5X 10L 50C 100D 500 阅读全文
posted @ 2021-05-14 15:15 TidalCoast 阅读(61) 评论(0) 推荐(0)
摘要:leetcode算法题 pro1269 停在原地的方案数 原题地址:https://leetcode-cn.com/problems/number-of-ways-to-stay-in-the-same-place-after-some-steps/ 题目描述 有一个长度为 arrLen 的数组,开 阅读全文
posted @ 2021-05-14 13:06 TidalCoast 阅读(109) 评论(0) 推荐(0)
摘要:LeetCode pro538 leetcode的一道简单算法题,是关于累加树的,要求把二叉搜索树转换为累加树 题干: 给定一个二叉搜索树(Binary Search Tree),把它转换成为累加树(Greater Tree),使得每个节点的值是原来的节点值加上所有大于它的节点值之和。 例如: 输入 阅读全文
posted @ 2020-09-21 18:07 TidalCoast