关闭页面特效
摘要: #pragma once #include<unordered_set> #include<unordered_map> namespace hash_function { //计算对应的哈希码 template<typename T> inline void hash_combine(size_t 阅读全文
posted @ 2023-08-17 16:45 Mexcellent 阅读(23) 评论(0) 推荐(0) 编辑
摘要: bool contains(_T& data, bn_ptr t)const 此时传入的成员参数是带有const属性的,但是data是不带const的,通过影响成员参数访问权限,而达到不能修改的目的; BinarySearchTree<_T>& BinarySearchTree<_T>::opera 阅读全文
posted @ 2023-08-11 17:26 Mexcellent 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 使用递归的方法最为简洁、高效;通过主次遍历,主要不为空,书的深度就加一,同时比较右侧树的深度,每次返回最大值; 1 public int maxDepth(TreeNode root) { 2 return root==null?0:Math.max(maxDepth(root.left)+1,ma 阅读全文
posted @ 2023-05-28 21:27 Mexcellent 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 哈夫曼的核心思想在于,wpl最小; 1 package dataSrtuct.TreeAlgorithm; 2 3 import java.util.ArrayList; 4 import java.util.Collections; 5 import java.util.List; 6 7 pub 阅读全文
posted @ 2023-05-23 21:39 Mexcellent 阅读(33) 评论(0) 推荐(0) 编辑
摘要: 记得在过滤器中加上对当前请求路径的判断,与重回向的页面不要重复;即: SID==null&&!(req.getRequestURI().equals(StaticVarieties.FAILURE_URL) 阅读全文
posted @ 2023-05-22 21:40 Mexcellent 阅读(30) 评论(0) 推荐(0) 编辑
摘要: 堆排序最重要的一点是将初始的无序堆转换成大顶堆或者是小顶堆;见代码: 1 package dataSrtuct.TreeAlgorithm; 2 3 import java.util.Arrays; 4 5 public class HeapSort { 6 public static void m 阅读全文
posted @ 2023-05-17 20:23 Mexcellent 阅读(97) 评论(0) 推荐(0) 编辑
摘要: 一般都是由于相关的文件权限不够,使用管理员权限打开编译软件就行了 阅读全文
posted @ 2023-05-09 19:36 Mexcellent 阅读(32) 评论(0) 推荐(0) 编辑
摘要: 废话不说,上代码l 1 package dataSrtuct.TreeAlgorithm; 2 3 import com.sun.source.tree.Tree; 4 5 public class ThreadBinaryTree { 6 public static void main(Strin 阅读全文
posted @ 2023-05-08 21:00 Mexcellent 阅读(21) 评论(0) 推荐(0) 编辑
摘要: 废话不多说,上代码 1 package com.mlq.servlet; 2 3 import com.sun.net.httpserver.HttpsServer; 4 5 import javax.servlet.ServletException; 6 import javax.servlet. 阅读全文
posted @ 2023-05-08 18:25 Mexcellent 阅读(18) 评论(0) 推荐(0) 编辑
摘要: 直接法和位运算发 1 public boolean isValidSudoku(char[][] board) { 2 int[][] line=new int[board.length][board.length]; 3 int[][] colum=new int[board.length][bo 阅读全文
posted @ 2023-04-17 22:16 Mexcellent 阅读(26) 评论(0) 推荐(0) 编辑
关注
跳至底部
点击右上角即可分享
微信分享提示