This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "cachelab.h" | |
#include <unistd.h> | |
#include <getopt.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include "csim.h" | |
#include <stdlib.h> | |
int tBit = 0, sBit = 0, bBit = 0; | |
struct params args; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static <R> R buildTreeByStrings2(Integer[] input, Class<R> clazz) {//R为结点类型 | |
if (input == null || input.length == 0) return null; | |
Method getLeft = null; | |
Method getRight = null; | |
Method setLeft = null; | |
Method setRight = null; | |
try {//一定得有这几个方法 | |
getLeft = clazz.getMethod("getLeft"); | |
getRight = clazz.getMethod("getRight"); | |
setLeft = clazz.getMethod("setLeft",clazz); |