摘要:
Given an n x n binary matrix image, flip the image horizontally, then invert it, and return the resulting image. To flip an image horizontally means t 阅读全文
摘要:
You are given coordinates, a string that represents the coordinates of a square of the chessboard. Below is a chessboard for your reference. Return tr 阅读全文
摘要:
A sentence is a list of words that are separated by a single space with no leading or trailing spaces. Each of the words consists of only uppercase an 阅读全文
摘要:
给你一个单链表的引用结点 head。链表中每个结点的值不是 0 就是 1。已知此链表是一个整数数字的二进制表示形式。 请你返回该链表所表示数字的 十进制值 。 示例 输入:head = [1,0,1]输出:5解释:二进制数 (101) 转化为十进制数 (5) 方法一:二进制转换成十进制(res初值为 阅读全文
摘要:
给你一棵二叉树,请你返回层数最深的叶子节点的和。 示例: 输入:root = [1,2,3,4,5,null,6,7,null,null,null,null,8]输出:15 来源:力扣(LeetCode)链接:https://leetcode-cn.com/problems/deepest-leav 阅读全文
摘要:
C++中容器queue的使用 front(),back()访问队首队尾元素;pop(),push()出队和入队 题目: 给定一个二叉树,返回其按层次遍历的节点值。 (即逐层地,从左到右访问所有节点)。 例如:给定二叉树: [3,9,20,null,null,15,7], 3 / \ 9 20 / \ 阅读全文