规雨
规雨
全部文章
每日一道编程题
Java-web开发(24)
Java底层(1)
Java项目实战(1)
会用决定下限,基础决定上限(5)
全栈-Java基础(13)
数据结构(8)
知识积累(8)
算法(1)
归档
标签
去牛客网
登录
/
注册
兴趣记录
以兴趣为驱动,以咸鱼为目标
全部文章
/ 每日一道编程题
(共57篇)
39 Sum of Nodes with Even-Valued Grandparent
为啥没有38? 因为38没过审。 今天点了十张图,登陆上了。 题目 Given a binary tree, return the sum of values of nodes with even-valued grandparent. (A grandparent of a node is t...
2020-03-03
0
450
37 Number of Steps to Reduce a Number to Zero
题目 Given a non-negative integer num, return the number of steps to reduce it to zero. If the current number is even, you have to divide it by 2, othe...
2020-02-29
0
449
36 Sort Integers by The Number of 1 Bits
题目 Given an integer array arr. You have to sort the integers in the array in ascending order by the number of 1’s in their binary representation and ...
2020-02-28
0
518
35 Delete Columns to Make Sorted
题目 We are given an array A of N lowercase letter strings, all of the same length. Now, we may choose any set of deletion indices, and for each strin...
2020-02-27
0
480
34 N-ary Tree Preorder Traversal
题目 跟上一篇N叉树后序遍历基本一致,区别就在于本题要求使用前序遍历。 分析 还是老办法,只需要利用遍历“最小元”的思想进行递归即可。 后序遍历: n叉树后序遍历的最小元:先遍历其他节点-->再遍历根节点 从题意可知,根节点是root,其他节点是root.children中的节点...
2020-02-27
0
442
33 N-ary Tree Postorder Traversal
题目 Given an n-ary tree, return the postorder traversal of its nodes’ values. Nary-Tree input serialization is represented in their level order trave...
2020-02-26
0
570
32 Number of Recent Calls
题目 Write a class RecentCounter to count recent requests. It has only one method: ping(int t), where t represents some time in milliseconds. Return ...
2020-02-25
0
430
31 Search in a Binary Search Tree
关注 每天一道编程题 专栏,一起学习进步。 题目 Given the root node of a binary search tree (BST) and a value. You need to find the node in the BST that the node’s value...
2020-02-24
0
404
30 Peak Index in a Mountain Array
关注 每天一道编程题 专栏,一起学习进步。 题目 Let’s call an array A a mountain if the following properties hold: A.length >= 3 There exists some 0 < i < A.le...
2020-02-23
0
574
28 Array Partition I
关注 每天一道编程题 专栏,一起学习进步。 题目 Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1, b1), (a2, b2), …, (...
2020-02-20
0
464
首页
上一页
1
2
3
4
5
6
下一页
末页