首页
题库
公司真题
专项练习
面试题库
在线编程
面试
面试经验
AI 模拟面试
简历
求职
学习
基础学习课
实战项目课
求职辅导课
专栏&文章
竞赛
我要招人
发布职位
发布职位、邀约牛人
更多企业解决方案
AI面试、笔试、校招、雇品
HR免费试用AI面试
最新面试提效必备
登录
/
注册
nayota
快手_音视频技术_测试开发
获赞
17
粉丝
17
关注
22
看过 TA
310
女
哈尔滨工业大学
2021
Java
IP属地:北京
暂未填写个人简介
私信
关注
拉黑
举报
举报
确定要拉黑nayota吗?
发布(39)
评论
刷题
收藏
nayota
关注TA,不错过内容更新
关注
2020-09-03 11:07
快手_音视频技术_测试开发
链表反转-牛客网错误提示分析;
一般情况下,测试用例通过为0的可能原因:(1)语法错误,例如出现对null值进行调用,数组越界;(2)参数范围不属于题意的合理范围但是却没有进行判断筛选;(3)代码整体逻辑就错了; 链表反转这道题注意一下java的引用和对象的关系; 对象A一旦被赋值为对象B,那么对象A和B都是一个对象了,操作后对于对象的存储区域都具有后果;但是对象A一旦被赋值为NULL或者被赋值为对象C,它就对对象B所在的存储区域没有操作能力了,也就是说赋值为NULL只是切换了对象A的操作对象罢了,不是将B对应的存储区域赋值为NULL了。代码: /* public class ListNode { int val; List...
0
点赞
评论
收藏
分享
2020-09-03 10:46
快手_音视频技术_测试开发
链表问题
java里没有指针,但是可以模拟一下next,这道题注意的点如下:(1)双指针的链表方法;(2)输入参数要进行合理范围限制,例如k<1是不合理的要返回Null。。。 /* public class ListNode { int val; ListNode next = null; ListNode(int val) { this.val = val; } }*/ public class Solution { public ListNode FindKthToTail(ListNode head,int k) { if(head==null){ return null; } if(k&l...
0
点赞
评论
收藏
分享
2020-09-03 10:30
快手_音视频技术_测试开发
数组内部元素顺序调整:下标法和辅助数组法;
1.下标法,注意一下当发现偶数的时候,不能将它直接与最近的奇数交换,这样奇数的相对顺序虽然没有改变,但是偶数的相对数据变化了,所以移位吧。 public class Solution { int[] tempArray; public void reOrderArray(int [] array) { int length=array.length; tempArray=new int[length]; if(length==0||length==1){ } else{ int o; for(int i=0;i<length;){ if(array[i]%2==1){ i++; }els...
0
点赞
评论
收藏
分享
2020-09-01 19:19
快手_音视频技术_测试开发
整数转为二进制的问题,参考官方题解即可;
public class Solution { public int NumberOf1(int n) { int ans=0; int mark=0x01; while(mark!=0){ if((mark&n)!=0)++ans; mark<<=1; } return ans; } }
0
点赞
评论
收藏
分享
2020-08-29 14:38
快手_音视频技术_测试开发
两个栈实现队列;
import java.util.Stack; public class Solution { Stack<Integer> stack1 = new Stack<Integer>(); Stack<Integer> stack2 = new Stack<Integer>(); public void push(int node) { while(!stack2.empty()){ Integer nodeOnWay=stack2.pop(); stack1.push(nodeOnWay); } stack1.push(node); while(...
0
点赞
评论
收藏
分享
2020-08-29 14:29
快手_音视频技术_测试开发
二叉树重建-递归的终止条件不要忘记,要有出口啊。
/** * Definition for binary tree * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */ public class Solution { private int[] pre; private int[] in; public TreeNode reConstructBinaryTree(int [] pre,int [] in) { /* 要注意一下, */ this.pre=pre; this.in...
0
点赞
评论
收藏
分享
2020-08-28 15:20
快手_音视频技术_测试开发
设置函数参数为空时候的返回值问题
这道题值得注意的是返回不能返回null,要返回一个空数组;切记切记; /** * public class ListNode { * int val; * ListNode next = null; * * ListNode(int val) { * this.val = val; * } * } * */ import java.util.ArrayList; public class Solution { public ArrayList<Integer> printListFromTailToHead(ListNode listNode) { ArrayList<Int...
0
点赞
评论
收藏
分享
2020-08-28 15:01
已编辑
快手_音视频技术_测试开发
【剑指offer】替换空格 -- Java 实现(StringBuffer系列)
注意一下StringBuffer函数的toString输出结果就是当前字符串;StringBuffer继承的Object函数是:clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait;这些函数可以被调用;另外StringBuffer是final类,不可被重写; 答案1:将其转化为String格式,调用String的replace函数: public class Solution { public String replaceSpace(StringBuffer str) { return ...
0
点赞
评论
收藏
分享
2020-08-27 14:29
已编辑
快手_音视频技术_测试开发
二维有序数组-二分查找(顺带一下快排)
public class Solution { public boolean Find(int target, int [][] array) { int m=array.length; if(m==0)return false; int n=array[0].length; if(n==0)return false; //右上角元素 int r=0,c=n-1; while(r<m&&c>=0){ if(array[r][c]>target){ c--; }else if(array[r][c]<target){ r++; }else{ return ...
0
点赞
评论
收藏
分享
1
2
3
创作者周榜
更多
关注他的用户也关注了:
牛客网
牛客网在线编程
牛客网题解
牛客企业服务