WilsonKalven
WilsonKalven
全部文章
分类
归档
标签
去牛客网
登录
/
注册
WilsonKalven的博客
全部文章
(共17篇)
题解 | #牛群字母的集合#
function cowCombination( s ) { // write code here let ans = [] const tracingback = (path,idx) => { ans.indexOf(path.join("...
2023-10-07
0
209
题解 | #奶牛的喂养路径#
function cowFeedingPath( root , targetSum ) { // write code here let ans = [] if(!root) return [] const traverse = (node,count,path) ...
2023-10-07
0
264
题解 | #Function.bind#
Function.prototype._bind = function(target, ...arguments1) { // 1.获取目标函数 var fn = this // 2.将target转成对...
2023-09-18
1
268
题解 | #_call函数#
Function.prototype._call = function(thisArg,...args) { // 1.获取目标函数 var fn = this // 2.将thisArg转换为对象类型,避免传入的是非对象类型 ...
2023-09-18
0
286
题解 | #检测循环依赖#
function findOrder( prerequisites , n ) { // write code here // 构建图 const res = [] let hasCycle = false const path = new Array(n)...
2023-08-11
1
398
题解 | #牛群的相似结构#
function isSameTree( p , q ) { // write code here if(p == null && q == null) return true if(p == null || q == null) return false ...
2023-07-31
0
292
题解 | #牛群的树形结构展开#
function flattenTree( root ) { // write code here if(root == null) return null flattenTree(root.left) flattenTree(root.right) le...
2023-07-30
0
259
题解 | #牛群分隔#
function cow_partition( head , x ) { // write code here let dummpy1 = new ListNode(-1) let dummpy2 = new ListNode(-1) let p1 = dummpy...
2023-07-27
0
270
题解 | #牛群的能量#
function maxEnergy( energy ) { // write code here let dp = [] dp[0] = energy[0] for(let i=1;i<energy.length;i++) { if(dp[i-...
2023-07-26
0
275
题解 | #基因变异最小次数#
function minMutation( start , end , bank ) { // write code here let hash = new Set() let visted = new Set() const keys = ["A&qu...
2023-07-26
0
252
首页
上一页
1
2
下一页
末页