文章 2022-02-16 来自:开发者社区

​LeetCode刷题实战519:随机翻转矩阵

今天和大家聊的问题叫做 随机翻转矩阵,我们先来看题面:https://leetcode-cn.com/problems/random-flip-matrix/There is an m x n binary grid matrix with all the values set 0 initially. Design an algorithm to randomly pick an index ....

文章 2022-02-16 来自:开发者社区

​LeetCode刷题实战293:翻转游戏

今天和大家聊的问题叫做 翻转游戏,我们先来看题面:https://leetcode-cn.com/problems/flip-game/You are playing the following Flip Game with your friend: Given a string that contains only these two characters: + and -, you and ....

文章 2022-02-15 来自:开发者社区

​LeetCode刷题实战226:翻转二叉树

今天和大家聊的问题叫做 翻转二叉树,我们先来看题面:https://leetcode-cn.com/problems/invert-binary-tree/Given the root of a binary tree, invert the tree, and return its root.翻转一棵二叉树。示例解题递归解决这是一道很经典的二叉树问题。显然,我们从根节点开始,递归地对树进行遍历....

​LeetCode刷题实战226:翻转二叉树
文章 2022-02-15 来自:开发者社区

​LeetCode刷题实战186:翻转字符串里的单词 II

今天和大家聊的问题叫做 翻转字符串里的单词 II  ,我们先来看题面:https://leetcode-cn.com/problems/reverse-words-in-a-string-ii/Given an input string , reverse the string word by word. Example:Input:  ["t","h","e"," ","s....

文章 2022-02-15 来自:开发者社区

​LeetCode刷题实战25:K 个一组翻转链表

今天和大家聊的问题叫做K 个一组翻转链表,我们先来看题面:https://leetcode-cn.com/problems/reverse-nodes-in-k-groupGiven a linked list, reverse the nodes of a linked list k at a time and return its modified list.k is a positive ....

本页面内关键词为智能算法引擎基于机器学习所生成,如有任何问题,可在页面下方点击"联系我们"与我们沟通。

算法编程

开发者社区在线编程频道官方技术圈。包含算法资源更新,周赛动态,每日一题互动。

+关注
AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等