Skip to content

Instantly share code, notes, and snippets.

View jyhjuzi's full-sized avatar

Yanhong Ju jyhjuzi

  • China
View GitHub Profile
public class Q11_8{
public static void main(String[] args){
Node root = new Node(5);
track(1,root);
track(1,root);
}
public static Node track(int i, Node root){
if root == null
public class Q11_8{
public static void main(String[] args){
Node root = new Node(5);
track(1,root);
track(1,root);
}
public static Node track(int i, Node root){
if root == null
public class Q11_8{
public static void main(String[] args){
Node root = new Node(5);
track(1,root);
track(1,root);
}
public static Node track(int i, Node root){
if root == null
public class Q11_8{
public static void main(String[] args){
Node root = new Node(5);
track(1,root);
track(1,root);
}
public static Node track(int i, Node root){
if root == null
public class Q11_8{
public static void main(String[] args){
Node root = new Node(5);
track(1,root);
track(1,root);
}
public static Node track(int i, Node root){
if root == null
public class Q11_8{
public static void main(String[] args){
Node root = new Node(5);
track(1,root);
track(1,root);
}
public static Node track(int i, Node root){
if root == null
package Chapter5;
public class Q5_8{
static void drawHorizontalLine(byte[] screen, int width, int x1, int x2, int y){
int height = screen.length/width/8;
int startOffset = x1%8;
int firstFullByte = x1/8;
if(startOffset!=0)
firstFullByte ++;
package Chapter5;
import java.util.ArrayList;
import java.util.Arrays;
public class Q5_7{
public static void main(String[] args){
int[] test = {6,1,2,3,4,5,11,7,8,9,15,0,16,14,12,10,13};
int n = 17;
System.out.println(getMiss(test,n));
public class Q5_6{
public static void main(String[] args){
int test = 0b01011100110100010101001;
System.out.println(Integer.toBinaryString(swap(test)));
}
static int swap(int input){
return ((input & 0x55555555) << 1) | ((input & 0xaaaaaaaa)>>1);
}
}
public class Q5_5{
public static void main(String[] args){
int test1= 0b100111010110;
int test2= 0b011001000101;
System.out.println(numberOfCovert(test1,test2));
}
static int numOfConvert(int number1, int number2){
int temp = number1^ number2;
int count = 0;
while(temp>0){