上一页 1 ··· 5 6 7 8 9 10 11 12 13 下一页
摘要: 4、二维数组中的查找 带行列中止验证的比较(自写) class Solution { public boolean findNumberIn2DArray(int[][] matrix, int target) { for (int i = 0; i < matrix.length; i++) { 阅读全文
posted @ 2020-06-25 15:34 北鼻coder 阅读(179) 评论(0) 推荐(0)
摘要: 9、二叉树镜像 操作给定的二叉树,将其变换为源二叉树的镜像。 其他方法 方法1:递归代码 /** public class TreeNode { int val = 0; TreeNode left = null; TreeNode right = null; public TreeNode(int 阅读全文
posted @ 2020-06-25 15:32 北鼻coder 阅读(165) 评论(0) 推荐(0)
摘要: 10、补充基础:栈与队列模型 (1)Queue PriorityQueue PriorityQueue是Queue队列实现类,PriorityQueue保存队列元素的顺序不是按照加入队列的顺序,而是按照队列元素的大小进行重新排序。当调用peek()或者poll()方法获取队列元素时,获取的是队列最小 阅读全文
posted @ 2020-06-25 15:30 北鼻coder 阅读(174) 评论(0) 推荐(0)
摘要: 3、数组中重复的数字 方法1:简单排序排序思想比较 //方法1:确定临时最小值,后续匹配(类似简单选择排序思想) public int findRepeatNumber(int[] nums) { for (int i = 0; i < nums.length; i++) { int temp = 阅读全文
posted @ 2020-06-25 15:29 北鼻coder 阅读(150) 评论(0) 推荐(0)
摘要: 1、用两个栈实现队列 1.1、[牛客]用两个栈来实现一个队列,完成队列的Push和Pop操作。 队列中的元素为int类型。 package jianzhioffer; import java.util.Stack; /** * @author jiyongjia * @create 2020/6/1 阅读全文
posted @ 2020-06-25 15:24 北鼻coder 阅读(250) 评论(0) 推荐(0)
摘要: 2、斐波那契数列 方法1: 使用迭代for循环,效率高 /** * 时间上可以不超时 * int f[]={0,1,1,2,3,5,8,13,21,34...] */ public static int fib2(int n) { if (n==0 || n==1){ return n; } els 阅读全文
posted @ 2020-06-25 15:21 北鼻coder 阅读(663) 评论(0) 推荐(0)
摘要: 左旋转字符串(Java)-循环Index方式 题目要求 ​ 汇编语言中有一种移位指令叫做循环左移(ROL),现在有个简单的任务,就是用字符串模拟这个指令的运算结果。对于一个给定的字符序列S,请你把其循环左移K位后的序列输出。例如,字符序列S=”abcXYZdef”,要求输出循环左移3位后的结果,即“ 阅读全文
posted @ 2020-06-25 14:56 北鼻coder 阅读(414) 评论(0) 推荐(0)
摘要: > 题目要求 链接:https://www.nowcoder.com/questionTerminal/00de97733b8e4f97a3fb5c680ee10720?answerType=1&f=discussion来源:牛客网请实现一个函数用来找出字符流中第一个只出现一次的字符。例如,当从字符 阅读全文
posted @ 2020-06-25 13:26 北鼻coder 阅读(208) 评论(0) 推荐(0)
摘要: springboot与thymeleaf搭建项目 一、springboot跳转html的项目搭建 参考: springboot项目创建教程 https://blog.csdn.net/q18771811872/article/details/88126835 springboot2.0 跳转html 阅读全文
posted @ 2020-05-21 11:11 北鼻coder 阅读(4664) 评论(1) 推荐(1)
摘要: Y7000P电脑环境i7处理器,1060显卡,16g内存,win10家庭版(系统版本号1809),在联想官网升级过bios,所有驱动都是最新。(截止时间点2019年3月1日) python3.5 安装GeForce Experience到官网下载https://www.nvidia.com/zh-c 阅读全文
posted @ 2019-03-09 17:41 北鼻coder 阅读(2042) 评论(0) 推荐(0)
上一页 1 ··· 5 6 7 8 9 10 11 12 13 下一页