qzjs
qzjs
全部文章
剑指offer...
LeetCode(3)
华为机试(1)
基础知识及算法(2)
未归档(42)
牛客网(华为机试)(1)
纠删码(1)
归档
标签
去牛客网
登录
/
注册
永不止步
全部文章
/ 剑指offer(Java实现)
(共38篇)
剑指offer(13)调整数组顺序使奇数位于偶数前面
import java.util.List; import java.util.ArrayList; public class Solution { public void reOrderArray(int [] array) { List<Integer> o...
2019-03-20
0
446
剑指offer(12)数值的整数次方
public class Solution { public double Power(double base, int exponent) { double result = 1.0; if(exponent == 0){ retur...
2019-03-19
0
456
剑指offer(11)二进制中1的个数
public class Solution { public int NumberOf1(int n) { int count = 0; while(n != 0){ if((n&1)!=0){ ...
2019-03-19
0
477
剑指offer(9)变态跳台阶
public class Solution { public int JumpFloorII(int target) { if(target < 0){ return -1; }else if(target == 0){ ...
2019-03-18
0
430
剑指offer(4)重建二叉树
/** * Definition for binary tree * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val...
2019-03-15
0
379
剑指offer(3)从尾到头打印链表
/** * public class ListNode { * int val; * ListNode next = null; * * ListNode(int val) { * this.val = val; * ...
2019-03-15
0
425
剑指offer(2)替换空格
public class Solution { public String replaceSpace(StringBuffer str) { if(str == null){ return null; } StringB...
2019-03-15
0
411
剑指offer(1)二维数组中的查找
public class Solution { public boolean Find(int target, int [][] array) { int row = 0; int col = array[0].length-1; while(...
2019-03-15
0
376
首页
上一页
1
2
3
4
下一页
末页