随笔分类 - jt
摘要:public ListNode deleteDuplicates (ListNode head) { // write code here ListNode cur=head; while(cur!=null){ while(cur.next!=null&&cur.val==cur.next.val
阅读全文
摘要:链表逆置 public class Solution { /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param head ListNode类 * @return ListNode类 */ public ListNode ReverseList
阅读全文
摘要:import java.util.Stack; public class Solution { Stack<Integer> stack1 = new Stack<Integer>(); Stack<Integer> stack2 = new Stack<Integer>(); public voi
阅读全文
摘要:层次遍历 /** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode() {} * TreeNode(int v
阅读全文
摘要:jdbc和Mybatis的区别? JDBC(Java Database Connectivity)和 MyBatis(也称为 iBatis)都是用于在 Java 应用程序中访问数据库的工具,但它们有一些重要的区别。 抽象程度: 1.JDBC: 是 Java 标准库的一部分,提供了一组用于执行 SQL
阅读全文
摘要:快速排序 package jh; public class QuickSort { public static int partition(int[] array,int start,int end){ int base = array[start]; while (start < end){ //
阅读全文