摘要:
package newleedcode;/** * leetcode2.两数相加 * 两链表相加,逆序存放,首位为个位 */public class XLeedCode2 { //链表结点 public static class ListNode{ int val; ListNode next; L 阅读全文
摘要:
package newleetcode;//未完全理解public class LeetCode38 { public String viewDate(int n){ //初始化str String str="1"; //通过循环修改数组 for(int i=2;i<=n;i++){ //每次循环初 阅读全文
摘要:
package newleetcode;/** * 搜索插入位置 * 不存在该数据即插入顺序数组适当位置 */public class LeetCode35 { public int search(int[] nums,int val){ for(int i=0;i<nums.length;i++) 阅读全文
摘要:
package newleetcode;/** * leetcode20.strStr匹配字符串 * 给定一个主串和一个匹配字符串 * 在主串中寻找匹配字符串并返回下标 */public class LeetCode28 { //KMP算法 //dp前一个括号代表匹配状态 private int[] 阅读全文
摘要:
关于git推送(码云)远程仓库详解 去码云创建一个仓库,复制仓库密钥。(无图) 在本地建立一个仓库,使用ssh-keygen -t rsa -C 获得本地密钥(无图) 将本地密钥保存到码云上(无图) 使用git clone (远程仓库密钥)获得远程仓库和本地仓库连接的一个文件夹 至此本地仓库和远程仓 阅读全文
摘要:
public class LeetCode27 { //双指针法 public int move(int[] num,int val){ //i为标记 int i=0; //极其简单,判断是否相等,把不相等的值赋给第一位,然后加一,最终数组前面即全为不相等值,后面全为相等值,并且通过i可知不相等值有 阅读全文
摘要:
public class LeetCode26 { public int Solution(int[] nums){ //标记数据,匹配成功一次加1 int x=0,y=0; for(int i=1;i<=nums.length;i++){ if(nums[i-1]==nums[i]){ for(i 阅读全文
摘要:
public class LeetCode21 { //链表结点 public static class ListNode{ int val; ListNode next; ListNode(){ next=null; } ListNode(int x){ val=x; } ListNode(int 阅读全文
摘要:
public class LeetCode20 { //Hashmap(key,value)匹配键值,Character为字符类 private HashMap<Character,Character> map; //构造类 public LeetCode20(){ this.map=new Has 阅读全文
摘要:
public class LeetCode14 { public String newBigPrefix(String[] strs){ //标记数据 int y=0,z=0; //返回字符串 String num=""; //返回字符串数组中值最小的下标 for(int i=1;i<strs.le 阅读全文