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
| [14:49:24] [main/INFO]: ModLauncher running: args [--username, Qubik65536, --version, neoforge-21.1.194, --gameDir, /Users/cubik65536/.minecraftx/instances/NeoForge 1.21.1, --assetsDir, /Users/cubik65536/.minecraftx/assets, --assetIndex, ce0fb8c410a8bb90b2ba2d7ae34b73f9d25d82d6, --uuid, e9816c14b26e420db9429a78800ce665, --accessToken, ❄❄❄❄❄❄❄❄, --clientId, ${clientid}, --xuid, ${auth_xuid}, --userType, msa, --versionType, release, --fml.neoForgeVersion, 21.1.194, --fml.fmlVersion, 4.0.41, --fml.mcVersion, 1.21.1, --fml.neoFormVersion, 20240808.144430, --launchTarget, forgeclient] | |
| [14:49:24] [main/INFO]: JVM identified as Eclipse Adoptium OpenJDK 64-Bit Server VM 21.0.7+6-LTS | |
| [14:49:24] [main/INFO]: ModLauncher 11.0.5+main.901c6ea8 starting: java version 21.0.7 by Eclipse Adoptium; OS Mac OS X arch aarch64 version 26.0 | |
| [14:49:24] [main/INFO]: Loading ImmediateWindowProvider fmlearlywindow | |
| [14:49:24] [main/INFO]: Trying GL version 4.6 | |
| [14:49:24] [main/INFO]: Trying GL version 4.5 | |
| [14:49:24] [main/INFO]: Trying |
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 bool checkForObviousMove(char[,] board) { | |
| int rows = board.GetLength(0); | |
| int cols = board.GetLength(1); | |
| int x; | |
| int y; | |
| int obviousCount; | |
| int blankCount; | |
| for (int i = 0; i < rows; i++) |
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
| import java.io.FileWriter; | |
| import java.util.ArrayList; | |
| import java.util.Scanner; | |
| class NoElementExceptionInStackException extends RuntimeException { | |
| public NoElementExceptionInStackException() { | |
| super("No element in stack to pop"); | |
| } | |
| } |
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
| import java.util.ArrayList; | |
| import java.util.Scanner; | |
| class LinearSearch { | |
| /** | |
| * 线性搜索 | |
| * @param list 要搜索的数组 | |
| * @param target 要搜索的目标 | |
| * @return 目标在数组中的索引,如果不存在则返回 -1 | |
| */ |
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
| import java.util.Random; | |
| import java.util.Scanner; | |
| class BinarySearchTreeNode { | |
| public int data; | |
| public BinarySearchTreeNode left; | |
| public BinarySearchTreeNode right; | |
| } | |
| class BinarySearchTree { |
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
| /** | |
| * 二叉树的节点 | |
| */ | |
| class BinaryTreeNode { | |
| int data; | |
| BinaryTreeNode left; | |
| BinaryTreeNode right; | |
| } | |
| /** |
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
| import java.util.Scanner; | |
| public class Recursion { | |
| /** | |
| * 计算 n 的阶乘 | |
| * @param n 非负整数 | |
| * @return n 的阶乘 | |
| */ | |
| private static int factorial(int n) { | |
| if (n == 0) { // 如果 n 是 0,说明算到阶乘的最后一步了,直接返回 1(递归的终止条件) |
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
| import java.util.ArrayList; | |
| public class MergeSort { | |
| /** | |
| * 将一个数组中的两个有序序列合并成一个新的有序序列 | |
| * @param list 要排序的数组 | |
| * @param left 数组的左边界 | |
| * @param middle 数组的中间元素的下标 | |
| * @param right 数组的右边界 | |
| */ |
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
| import java.util.ArrayList; | |
| import java.util.Collections; | |
| public class Main { | |
| /** | |
| * 合并两个有序数组 | |
| * @param list1 第一个有序数组 | |
| * @param list2 第二个有序数组 | |
| * @return 合并后的有序数组 | |
| */ |
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
| package org.qianq.examples; | |
| import java.util.ArrayList; | |
| import java.util.Scanner; | |
| class LinearSearch { | |
| /** | |
| * 线性搜索 | |
| * @param list 要搜索的数组 | |
| * @param target 要搜索的目标 |
NewerOlder