03 2020 档案

摘要:LeetCode 1394. Find Lucky Integer in an Array找出数组中的幸运数【Easy】【Python】【暴力】 Problem "LeetCode" Given an array of integers , a lucky integer is an integer 阅读全文
posted @ 2020-03-29 14:54 Wonz 阅读(298) 评论(0) 推荐(0)
摘要:LeetCode 1395. Count Number of Teams统计作战单位数【Medium】【Python】【暴力】 Problem "LeetCode" There are soldiers standing in a line. Each soldier is assigned a u 阅读全文
posted @ 2020-03-29 14:38 Wonz 阅读(314) 评论(0) 推荐(0)
摘要:LeetCode 1396. Design Underground System设计地铁系统【Medium】【Python】【设计】 Problem "LeetCode" Implement the class that supports three methods: 1. A customer w 阅读全文
posted @ 2020-03-29 14:03 Wonz 阅读(297) 评论(0) 推荐(0)
摘要:LeetCode 0892. Surface Area of 3D Shapes三维形体的表面积【Easy】【Python】【数学】 Problem "LeetCode" On a grid, we place some cubes. Each value represents a tower of 阅读全文
posted @ 2020-03-27 21:10 Wonz 阅读(196) 评论(0) 推荐(0)
摘要:LeetCode 面试题17. 打印从1到最大的n位数【剑指Offer】【Easy】【Python】【遍历】 问题 "力扣" 输入数字 n,按顺序打印出从 1 到最大的 n 位十进制数。比如输入 3,则打印出 1、2、3 一直到最大的 3 位数 999。 示例 1: 说明: 用返回一个整数列表来代替 阅读全文
posted @ 2020-03-27 20:50 Wonz 阅读(199) 评论(0) 推荐(0)
摘要:LeetCode 面试题09. 用两个栈实现队列【剑指Offer】【Easy】【Python】【栈】【队列】 问题 "力扣" 用两个栈实现一个队列。队列的声明如下,请实现它的两个函数 appendTail 和 deleteHead ,分别完成在队列尾部插入整数和在队列头部删除整数的功能。(若队列中没 阅读全文
posted @ 2020-03-27 20:40 Wonz 阅读(170) 评论(0) 推荐(0)
摘要:LeetCode 0070. Climbing Stairs爬楼梯【Easy】【Python】【动态规划】 Problem "LeetCode" You are climbing a stair case. It takes n steps to reach to the top. Each tim 阅读全文
posted @ 2020-03-27 20:18 Wonz 阅读(199) 评论(0) 推荐(0)
摘要:LeetCode 0509. Fibonacci Number斐波那契数【Easy】【Python】【动态规划】 Problem "LeetCode" The Fibonacci numbers , commonly denoted form a sequence, called the Fibon 阅读全文
posted @ 2020-03-27 20:02 Wonz 阅读(185) 评论(0) 推荐(0)
摘要:LeetCode 面试题10 II. 青蛙跳台阶问题【剑指Offer】【Easy】【Python】【动态规划】 问题 "力扣" 一只青蛙一次可以跳上1级台阶,也可以跳上2级台阶。求该青蛙跳上一个 n 级的台阶总共有多少种跳法。 答案需要取模 1e9+7(1000000007),如计算初始结果为:10 阅读全文
posted @ 2020-03-27 18:49 Wonz 阅读(408) 评论(0) 推荐(0)
摘要:LeetCode 面试题10 I. 斐波那契数列【剑指Offer】【Easy】【Python】【动态规划】 问题 "力扣" 写一个函数,输入 n ,求斐波那契(Fibonacci)数列的第 n 项。斐波那契数列的定义如下: 斐波那契数列由 0 和 1 开始,之后的斐波那契数就是由之前的两数相加而得出 阅读全文
posted @ 2020-03-27 18:16 Wonz 阅读(270) 评论(0) 推荐(0)
摘要:LeetCode 0914. X of a Kind in a Deck of Cards卡牌分组【Easy】【Python】【数学】 Problem "LeetCode" In a deck of cards, each card has an integer written on it. Ret 阅读全文
posted @ 2020-03-27 16:35 Wonz 阅读(165) 评论(0) 推荐(0)
摘要:LeetCode 面试题62. 圆圈中最后剩下的数字【剑指Offer】【Easy】【Python】【数学】 问题 "力扣" 0,1,,n 1这n个数字排成一个圆圈,从数字0开始,每次从这个圆圈里删除第m个数字。求出这个圆圈里剩下的最后一个数字。 例如,0、1、2、3、4这5个数字组成一个圆圈,从数字 阅读全文
posted @ 2020-03-24 20:56 Wonz 阅读(200) 评论(0) 推荐(0)
摘要:LeetCode 1390. Four Divisors四因数【Medium】【Python】【数学】 Problem "LeetCode" Given an integer array , return the sum of divisors of the integers in that arr 阅读全文
posted @ 2020-03-24 09:36 Wonz 阅读(191) 评论(0) 推荐(0)
摘要:LeetCode 1389. Create Target Array in the Given Order按既定顺序创建目标数组【Easy】【Python】【数组】 Problem "LeetCode" Given two arrays of integers and . Your task is 阅读全文
posted @ 2020-03-24 09:12 Wonz 阅读(197) 评论(0) 推荐(0)
摘要:LeetCode 1386. Cinema Seat Allocation安排电影院座位【Medium】【Python】【哈希表】 Problem "LeetCode" A cinema has rows of seats, numbered from 1 to and there are ten 阅读全文
posted @ 2020-03-24 09:00 Wonz 阅读(463) 评论(0) 推荐(0)
摘要:LeetCode 0113. Path Sum II路径总和 II【Medium】【Python】【回溯】 Problem "LeetCode" Given a binary tree and a sum, find all root to leaf paths where each path's 阅读全文
posted @ 2020-03-23 23:32 Wonz 阅读(131) 评论(0) 推荐(0)
摘要:LeetCode 面试题34. 二叉树中和为某一值的路径【剑指Offer】【Medium】【Python】【回溯】 问题 "力扣" 输入一棵二叉树和一个整数,打印出二叉树中节点值的和为输入整数的所有路径。从树的根节点开始往下一直到叶节点所经过的节点形成一条路径。 示例: 给定如下二叉树,以及目标和 阅读全文
posted @ 2020-03-23 23:23 Wonz 阅读(248) 评论(0) 推荐(0)
摘要:LeetCode 0876. Middle of the Linked List链表的中间结点【Easy】【Python】【双指针】 Problem "LeetCode" Given a non empty, singly linked list with head node , return a 阅读全文
posted @ 2020-03-23 22:39 Wonz 阅读(156) 评论(0) 推荐(0)
摘要:在 Anaconda Python3.7 环境下使用 Pycharm 安装 Python3.6 版本的 PyTorch 一、Anaconda 安装 可以参考一下我写的教程: "Anaconda——最省心的 Python 版本" 二、Pycharm创建新环境 因为我需要用到 ,所以创建的是 项目,指定 阅读全文
posted @ 2020-03-23 13:32 Wonz 阅读(8557) 评论(0) 推荐(0)
摘要:LeetCode 1387. Sort Integers by The Power Value将整数按权重排序【Medium】【Python】【排序】 Problem "LeetCode" The power of an integer is defined as the number of ste 阅读全文
posted @ 2020-03-22 10:03 Wonz 阅读(505) 评论(0) 推荐(0)
摘要:LeetCode 1385. Find the Distance Value Between Two Arrays两个数组间的距离值【Easy】【Python】【暴力】 Problem "LeetCode" Given two integer arrays and , and the integer 阅读全文
posted @ 2020-03-22 09:46 Wonz 阅读(345) 评论(0) 推荐(0)
摘要:LeetCode 0365. Water and Jug Problem水壶问题【Medium】【Python】【BFS】【数学】 Problem "LeetCode" You are given two jugs with capacities x and y litres. There is a 阅读全文
posted @ 2020-03-21 20:55 Wonz 阅读(385) 评论(0) 推荐(0)
摘要:LeetCode 面试题33. 二叉搜索树的后序遍历序列【剑指Offer】【Medium】【Python】【递归】 问题 "力扣" 输入一个整数数组,判断该数组是不是某二叉搜索树的后序遍历结果。如果是则返回 ,否则返回 。假设输入的数组的任意两个数字都互不相同。 参考以下这颗二叉搜索树: 示例 1: 阅读全文
posted @ 2020-03-21 19:36 Wonz 阅读(156) 评论(0) 推荐(0)
摘要:LeetCode 面试题32 III. 从上到下打印二叉树 III【剑指Offer】【Medium】【Python】【二叉树】【BFS】 问题 "力扣" 请实现一个函数按照之字形顺序打印二叉树,即第一行按照从左到右的顺序打印,第二层按照从右到左的顺序打印,第三行再按照从左到右的顺序打印,其他行以此类 阅读全文
posted @ 2020-03-21 00:00 Wonz 阅读(152) 评论(0) 推荐(0)
摘要:LeetCode 0102. Binary Tree Level Order Traversal二叉树的层次遍历【Medium】【Python】【BFS】 Problem "LeetCode" Given a binary tree, return the level order traversal 阅读全文
posted @ 2020-03-20 23:23 Wonz 阅读(124) 评论(0) 推荐(0)
摘要:LeetCode 面试题32 II. 从上到下打印二叉树 II【剑指Offer】【Easy】【Python】【二叉树】【BFS】 问题 "力扣" 从上到下按层打印二叉树,同一层的节点按从左到右的顺序打印,每一层打印到一行。 例如: 给定二叉树: , 返回其层次遍历结果: 提示: 1. `节点总数 L 阅读全文
posted @ 2020-03-20 22:58 Wonz 阅读(199) 评论(0) 推荐(0)
摘要:LeetCode 面试题32 I. 从上到下打印二叉树【剑指Offer】【Medium】【Python】【二叉树】【BFS】 问题 "力扣" 从上到下打印出二叉树的每个节点,同一层的节点按照从左到右的顺序打印。 例如: 给定二叉树: , 返回: 提示: 1. `节点总数 List[int]: imp 阅读全文
posted @ 2020-03-19 23:16 Wonz 阅读(139) 评论(0) 推荐(0)
摘要:LeetCode 0226. Invert Binary Tree翻转二叉树【Easy】【Python】【二叉树】【递归】 Problem "LeetCode" Invert a binary tree. Example: Input: Output: Trivia: This problem wa 阅读全文
posted @ 2020-03-19 22:06 Wonz 阅读(114) 评论(0) 推荐(0)
摘要:LeetCode 面试题27. 二叉树的镜像【剑指Offer】【Easy】【Python】【二叉树】【递归】 问题 "力扣" 请完成一个函数,输入一个二叉树,该函数输出它的镜像。 例如输入: 镜像输出: 示例 1: 限制: 代码地址 "GitHub链接" 阅读全文
posted @ 2020-03-19 21:35 Wonz 阅读(120) 评论(0) 推荐(0)
摘要:LeetCode 0409. Longest Palindrome最长回文串【Easy】【Python】【字符串】 Problem "LeetCode" Given a string which consists of lowercase or uppercase letters, find the 阅读全文
posted @ 2020-03-19 21:04 Wonz 阅读(149) 评论(0) 推荐(0)
摘要:LeetCode 面试题26. 树的子结构【Medium】【Python】【DFS】 问题 "力扣" 输入两棵二叉树A和B,判断B是不是A的子结构。(约定空树不是任意一个树的子结构) B是A的子结构, 即 A中有出现和B相同的结构和节点值。 例如: 给定的树 A: 给定的树 B: 返回 true,因 阅读全文
posted @ 2020-03-18 23:38 Wonz 阅读(176) 评论(0) 推荐(0)
摘要:LeetCode 0836. Rectangle Overlap矩形重叠【Easy】【Python】【数学】 Problem "LeetCode" A rectangle is represented as a list , where are the coordinates of its bott 阅读全文
posted @ 2020-03-18 21:45 Wonz 阅读(249) 评论(0) 推荐(0)
摘要:LeetCode 0106. Construct Binary Tree from Inorder and Postorder Traversal从中序与后序遍历序列构造二叉树【Medium】【Python】【二叉树】【递归】 Problem "LeetCode" Given inorder and 阅读全文
posted @ 2020-03-18 21:05 Wonz 阅读(126) 评论(0) 推荐(0)
摘要:LeetCode 0105. Construct Binary Tree from Preorder and Inorder Traversal从前序与中序遍历序列构造二叉树【Medium】【Python】【二叉树】【递归】 Problem "LeetCode" Given preorder and 阅读全文
posted @ 2020-03-18 20:29 Wonz 阅读(128) 评论(0) 推荐(0)
摘要:LeetCode 面试题07. 重建二叉树【剑指Offer】【Medium】【Python】【二叉树】【递归】 问题 "力扣" 输入某二叉树的前序遍历和中序遍历的结果,请重建该二叉树。假设输入的前序遍历和中序遍历的结果中都不含重复的数字。 例如,给出 返回如下的二叉树: 限制: 代码地址 "GitH 阅读全文
posted @ 2020-03-18 20:13 Wonz 阅读(165) 评论(0) 推荐(0)
摘要:LeetCode 面试题06. 从尾到头打印链表【剑指Offer】【Easy】【Python】【链表】 问题 "力扣" 输入一个链表的头节点,从尾到头反过来返回每个节点的值(用数组返回)。 示例 1: 限制: `0 List[int]: solution one: reverse res = [] 阅读全文
posted @ 2020-03-17 23:33 Wonz 阅读(245) 评论(0) 推荐(1)
摘要:LeetCode 面试题05. 替换空格【剑指Offer】【Easy】【Python】【字符串】 问题 "力扣" 请实现一个函数,把字符串 s 中的每个空格替换成"%20"。 示例 1: 限制: `0 str: solution one res = '' for c in s: if c == ' 阅读全文
posted @ 2020-03-17 22:39 Wonz 阅读(135) 评论(0) 推荐(0)
摘要:LeetCode 0240. Search a 2D Matrix II搜索二维矩阵 II【Medium】【Python】【数组】 Problem "LeetCode" Write an efficient algorithm that searches for a value in an m x 阅读全文
posted @ 2020-03-17 21:02 Wonz 阅读(245) 评论(0) 推荐(0)
摘要:LeetCode 面试题04. 二维数组中的查找【剑指Offer】【Easy】【Python】【数组】 问题 "力扣" 在一个 n m 的二维数组中,每一行都按照从左到右递增的顺序排序,每一列都按照从上到下递增的顺序排序。请完成一个函数,输入这样的一个二维数组和一个整数,判断数组中是否含有该整数。 阅读全文
posted @ 2020-03-17 20:41 Wonz 阅读(178) 评论(0) 推荐(0)
摘要:LeetCode 面试题03. 数组中重复的数字【剑指Offer】【Easy】【Python】【数组】【哈希表】【排序】 问题 "力扣" 找出数组中重复的数字。 在一个长度为 n 的数组 nums 里的所有数字都在 0~n 1 的范围内。数组中某些数字是重复的,但不知道有几个数字重复了,也不知道每个 阅读全文
posted @ 2020-03-17 19:54 Wonz 阅读(195) 评论(0) 推荐(0)
摘要:LeetCode 1160. Find Words That Can Be Formed by Characters拼写单词【Easy】【Python】【字符串】 Problem "LeetCode" You are given an array of strings and a string . 阅读全文
posted @ 2020-03-17 15:51 Wonz 阅读(273) 评论(0) 推荐(0)
摘要:LeetCode 面试题 01.06. 字符串压缩【Easy】【Python】【双指针】 问题 "力扣" 字符串压缩。利用字符重复出现的次数,编写一种方法,实现基本的字符串压缩功能。比如,字符串aabcccccaaa会变为a2b1c5a3。若“压缩”后的字符串没有变短,则返回原先的字符串。你可以假设 阅读全文
posted @ 2020-03-16 22:37 Wonz 阅读(543) 评论(0) 推荐(0)
摘要:LeetCode 1382. Balance a Binary Search Tree将二叉搜索树变平衡【Medium】【Python】【二叉树】 Problem "LeetCode" Given a binary search tree, return a balanced binary sear 阅读全文
posted @ 2020-03-15 16:37 Wonz 阅读(382) 评论(0) 推荐(0)
摘要:LeetCode 1381. Design a Stack With Increment Operation设计一个支持增量操作的栈【Medium】【Python】【栈】 Problem "LeetCode" Design a stack which supports the following o 阅读全文
posted @ 2020-03-15 15:15 Wonz 阅读(174) 评论(0) 推荐(0)
摘要:LeetCode 1380. Lucky Numbers in a Matrix矩阵中的幸运数【Easy】【Python】【暴力】 Problem "LeetCode" Given a matrix of distinct numbers, return all lucky numbers in t 阅读全文
posted @ 2020-03-15 13:49 Wonz 阅读(334) 评论(0) 推荐(0)
摘要:LeetCode 1071. Greatest Common Divisor of Strings字符串的最大公因子【Easy】【Python】【字符串】 Problem "LeetCode" For strings and , we say " divides " if and only if ( 阅读全文
posted @ 2020-03-12 21:57 Wonz 阅读(297) 评论(0) 推荐(0)
摘要:东方财富 2020 春季校园招聘后端开发在线笔试【Python】【C++】【字符串】【动态规划】 一、单选题 一共有 256 个结点的二叉树高度最小是多少:8。 读程题,选出正确的程序输出结果。 不记得了。 二、不定项选择 哪些属于设计模式。 不记得了。 三、填空题 20 6 = 140 是几进制: 阅读全文
posted @ 2020-03-12 21:32 Wonz 阅读(169) 评论(0) 推荐(0)
摘要:东方财富 2020 春季校园招聘后端开发在线笔试【Python】【C++】【字符串】【动态规划】 一、单选题 一共有 256 个结点的二叉树高度最小是多少:8。 读程题,选出正确的程序输出结果。 不记得了。 二、不定项选择 哪些属于设计模式。 不记得了。 三、填空题 20 6 = 140 是几进制: 阅读全文
posted @ 2020-03-12 21:30 Wonz 阅读(381) 评论(0) 推荐(0)
摘要:LeetCode 0188. Best Time to Buy and Sell Stock IV买卖股票的最佳时机 IV【Hard】【Python】【动态规划】 Problem "LeetCode" Say you have an array for which the i th element 阅读全文
posted @ 2020-03-11 22:59 Wonz 阅读(138) 评论(0) 推荐(0)
摘要:LeetCode 0123. Best Time to Buy and Sell Stock III买卖股票的最佳时机 III【Hard】【Python】【动态规划】 Problem "LeetCode" Say you have an array for which the i th elemen 阅读全文
posted @ 2020-03-11 21:59 Wonz 阅读(110) 评论(0) 推荐(0)
摘要:LeetCode 0714. Best Time to Buy and Sell Stock with Transaction Fee买卖股票的最佳时机含手续费【Medium】【Python】【动态规划】 Problem "LeetCode" Your are given an array of i 阅读全文
posted @ 2020-03-11 21:03 Wonz 阅读(194) 评论(0) 推荐(0)
摘要:LeetCode 0309. Best Time to Buy and Sell Stock with Cooldown最佳买卖股票时机含冷冻期【Medium】【Python】【动态规划】 Problem "LeetCode" Say you have an array for which the 阅读全文
posted @ 2020-03-11 20:47 Wonz 阅读(197) 评论(0) 推荐(0)
摘要:LeetCode 1013. Partition Array Into Three Parts With Equal Sum将数组分成和相等的三个部分【Easy】【Python】【双指针】 Problem "LeetCode" Given an array of integers, return i 阅读全文
posted @ 2020-03-11 20:20 Wonz 阅读(200) 评论(0) 推荐(0)
摘要:LeetCode 0543. Diameter of Binary Tree二叉树的直径【Easy】【Python】【递归】 Problem "LeetCode" Given a binary tree, you need to compute the length of the diameter 阅读全文
posted @ 2020-03-10 16:33 Wonz 阅读(225) 评论(0) 推荐(0)
摘要:LeetCode 1376. Time Needed to Inform All Employees通知所有员工所需的时间【Medium】【Python】【自底向上遍历】 Problem "LeetCode" A company has employees with a unique ID for 阅读全文
posted @ 2020-03-08 22:50 Wonz 阅读(277) 评论(0) 推荐(0)
摘要:LeetCode 1375. Bulb Switcher III灯泡开关 III【Medium】【Python】【最大编号】 Problem "LeetCode" There is a room with bulbs, numbered from to , arranged in a row fro 阅读全文
posted @ 2020-03-08 15:51 Wonz 阅读(260) 评论(0) 推荐(0)
摘要:LeetCode 1374. Generate a String With Characters That Have Odd Counts生成每种字符都是奇数个的字符串【Easy】【Python】【字符串】 Problem "LeetCode" Given an integer , return a 阅读全文
posted @ 2020-03-08 15:32 Wonz 阅读(262) 评论(0) 推荐(0)
摘要:LeetCode 1372. Longest ZigZag Path in a Binary Tree二叉树中的最长交错路径【Medium】【Python】【DFS】 Problem "LeetCode" Given a binary tree , a ZigZag path for a binar 阅读全文
posted @ 2020-03-08 15:19 Wonz 阅读(286) 评论(0) 推荐(0)
摘要:LeetCode 1370. Increasing Decreasing String上升下降字符串【Easy】【Python】【排序】 Problem "LeetCode" Given a string . You should re order the string using the foll 阅读全文
posted @ 2020-03-08 13:37 Wonz 阅读(239) 评论(0) 推荐(0)
摘要:LeetCode 面试题59 II. 队列的最大值【Medium】【Python】【队列】 问题 "力扣" 请定义一个队列并实现函数 得到队列里的最大值,要求函数 、`push_back pop_front` 的 均摊 时间复杂度都是O(1)。 若队列为空, 和 需要返回 1 示例 1: 示例 2: 阅读全文
posted @ 2020-03-08 13:09 Wonz 阅读(376) 评论(0) 推荐(0)
摘要:LeetCode 0039. Combination Sum组合总和【Medium】【Python】【回溯】 Problem "LeetCode" Given a set of candidate numbers ( ) (without duplicates) and a target numbe 阅读全文
posted @ 2020-03-07 13:30 Wonz 阅读(217) 评论(0) 推荐(0)
摘要:LeetCode 面试题 57 Ⅱ. 和为s的连续正数序列【Easy】【Python】【滑窗】【数学】 问题 "力扣" 输入一个正整数 target ,输出所有和为 target 的连续正整数序列(至少含有两个数)。 序列内的数字由小到大排列,不同序列按照首个数字从小到大排列。 示例 1: 示例 2 阅读全文
posted @ 2020-03-06 14:59 Wonz 阅读(515) 评论(0) 推荐(0)
摘要:LeetCode 0077. Combinations组合【Medium】【Python】【回溯】 Problem "LeetCode" Given two integers n and k , return all possible combinations of k numbers out of 阅读全文
posted @ 2020-03-05 22:14 Wonz 阅读(158) 评论(0) 推荐(0)
摘要:LeetCode 0047. Permutations II全排列 II【Medium】【Python】【回溯】 Problem "LeetCode" Given a collection of numbers that might contain duplicates, return all po 阅读全文
posted @ 2020-03-05 21:13 Wonz 阅读(182) 评论(0) 推荐(0)
摘要:LeetCode 1103. Distribute Candies to People分糖果 II【Easy】【Python】【暴力】 Problem "LeetCode" We distribute some number of , to a row of people in the follow 阅读全文
posted @ 2020-03-05 15:13 Wonz 阅读(211) 评论(0) 推荐(0)
摘要:LeetCode 0046. Permutations全排列【Medium】【Python】【回溯】【DFS】 Problem "LeetCode" Given a collection of distinct integers, return all possible permutations. 阅读全文
posted @ 2020-03-04 23:10 Wonz 阅读(248) 评论(0) 推荐(0)
摘要:LeetCode 0079. Word Search单词搜索【Medium】【Python】【DFS】 Problem "LeetCode" Given a 2D board and a word, find if the word exists in the grid. The word can 阅读全文
posted @ 2020-03-04 21:52 Wonz 阅读(177) 评论(0) 推荐(0)
摘要:LeetCode 0017. Letter Combinations of a Phone Number电话号码的字母组合【Medium】【Python】【回溯】【DFS】【暴力】 Problem "LeetCode" Given a string containing digits from in 阅读全文
posted @ 2020-03-04 21:13 Wonz 阅读(135) 评论(0) 推荐(0)
摘要:LeetCode 0093. Restore IP Addresses复原IP地址【Medium】【Python】【回溯】【DFS】【暴力】 Problem "LeetCode" Given a string containing only digits, restore it by returni 阅读全文
posted @ 2020-03-04 20:49 Wonz 阅读(403) 评论(0) 推荐(0)
摘要:LeetCode 0994. Rotting Oranges腐烂的橘子【Easy】【Python】【BFS】 Problem "LeetCode" In a given grid, each cell can have one of three values: the value represent 阅读全文
posted @ 2020-03-04 14:49 Wonz 阅读(302) 评论(0) 推荐(0)
摘要:LeetCode 面试题 10.01. Sorted Merge LCCI【Easy】【Python】【双指针】 问题 "力扣" 给定两个排序后的数组 A 和 B,其中 A 的末端有足够的缓冲空间容纳 B。 编写一个方法,将 B 合并入 A 并排序。 初始化 A 和 B 的元素数量分别为 m 和 n 阅读全文
posted @ 2020-03-03 13:31 Wonz 阅读(186) 评论(0) 推荐(0)
摘要:LeetCode 0257. Binary Tree Paths二叉树的所有路径【Easy】【Python】【DFS】 Problem "LeetCode" Given a binary tree, return all root to leaf paths. Note: A leaf is a n 阅读全文
posted @ 2020-03-02 23:07 Wonz 阅读(242) 评论(0) 推荐(0)
摘要:LeetCode 0206. Reverse Linked List反转链表【Easy】【Python】【链表】 Problem "LeetCode" Reverse a singly linked list. Example: Follow up: A linked list can be rev 阅读全文
posted @ 2020-03-02 16:04 Wonz 阅读(164) 评论(0) 推荐(0)
摘要:LeetCode 0225. Implement Stack using Queues用队列实现栈【Easy】【Python】【栈】【队列】 Problem "LeetCode" Implement the following operations of a stack using queues. 阅读全文
posted @ 2020-03-01 22:56 Wonz 阅读(125) 评论(0) 推荐(0)
摘要:LeetCode 1366. Rank Teams by Votes通过投票对团队排名【Medium】【Python】【排序】 Problem "LeetCode" In a special ranking system, each voter gives a rank from highest t 阅读全文
posted @ 2020-03-01 22:33 Wonz 阅读(332) 评论(0) 推荐(0)
摘要:LeetCode 1365. How Many Numbers Are Smaller Than the Current Number有多少小于当前数字的数字【Easy】【Python】【暴力】 Problem "LeetCode" Given the array , for each find o 阅读全文
posted @ 2020-03-01 15:36 Wonz 阅读(291) 评论(0) 推荐(0)
摘要:LeetCode 面试题 04.10. 检查子树【Medium】【Python】【DFS】 问题 "力扣" 检查子树。你有两棵非常大的二叉树:T1,有几万个节点;T2,有几万个节点。设计一个算法,判断 T2 是否为 T1 的子树。 如果 T1 有这么一个节点 n,其子树与 T2 一模一样,则 T2 阅读全文
posted @ 2020-03-01 15:18 Wonz 阅读(197) 评论(0) 推荐(0)
摘要:LeetCode 1367. Linked List in Binary Tree二叉树中的列表【Medium】【Python】【DFS】 Problem "LeetCode" Given a binary tree and a linked list with as the first node. 阅读全文
posted @ 2020-03-01 14:40 Wonz 阅读(186) 评论(0) 推荐(0)