leetcode anagrams string find

LeetCode 669. 修剪二叉搜索树

#题目链接:[LeetCode 669. 修剪二叉搜索树](https://leetcode.cn/problems/trim-a-binary-search-tree/) ##题意: **给你二叉搜索树的根节点 root ,同时给定最小边界low 和最大边界 high。通过修剪二叉搜索树,使得所有 ......
LeetCode 669

LeetCode 450. 删除二叉搜索树中的节点

#题目链接:[LeetCode 450. 删除二叉搜索树中的节点](https://leetcode.cn/problems/delete-node-in-a-bst/) ##题意: **给定一个二叉搜索树的根节点 root 和一个值 key,删除二叉搜索树中的 key 对应的节点,并保证二叉搜索树 ......
节点 LeetCode 450

IDEA安装leetcode插件

1.在idea的Settings-Plugins-BrowseRepositories搜索leetcode。如图: 安装完成后,重启idea。 2.Idea的Tools下出现leetcode plugin: 设置leetcode官网的登录名和密码,设置TempFilePath这里设置为新建项目的路径 ......
插件 leetcode IDEA

数据库问题之“字符编码问题 Cause: java.sql.SQLException: Incorrect string value: '\xF0\x9F\x8E\x81\xE7\x88...' for column 'product_name' at row 41”

1)表1和表2的产品名称[数据库字段]字符编译方式不一致 ①问题 org.springframework.jdbc.UncategorizedSQLException: Error updating database. Cause: java.sql.SQLException: Incorrect ......

LeetCode 235. 二叉搜索树的最近公共祖先

#题目链接:[LeetCode 235. 二叉搜索树的最近公共祖先](https://leetcode.cn/problems/lowest-common-ancestor-of-a-binary-search-tree/description/) ##题意: **给定一个二叉搜索树, 找到该树中两 ......
祖先 LeetCode 235

LeetCode 701. 二叉搜索树中的插入操作

#题目链接:[LeetCode 701. 二叉搜索树中的插入操作](https://leetcode.cn/problems/insert-into-a-binary-search-tree/) ##题意: **给定二叉搜索树(BST)的根节点 root 和要插入树中的值 value ,将值插入二叉 ......
LeetCode 701

CString、string和char*字符转换

std::string TCHAR2STRING(TCHAR *STR){ int iLen = WideCharToMultiByte(CP_ACP, 0,STR, -1, NULL, 0, NULL, NULL); //首先计算TCHAR 长度。 char* chRtn = new char[i ......
字符 CString string char

LeetCode 236. 二叉树的最近公共祖先

#题目链接:[LeetCode 236. 二叉树的最近公共祖先](https://leetcode.cn/problems/lowest-common-ancestor-of-a-binary-tree/description/) ##题意: **给定一个二叉树, 找到该树中两个指定节点的最近公共祖 ......
祖先 LeetCode 236

(Leetcode)746

```java // 方式一:第一步不支付费用 class Solution { public int minCostClimbingStairs(int[] cost) { int len = cost.length; int[] dp = new int[len + 1]; // 从下标为 0 ......
Leetcode 746

leetcode 26. 删除有序数组中的重复项

## 直接法 ```java public int removeDuplicates(int[] nums) { if (nums == null) { return -1; } boolean start = false; int nextIndex = 1; for (int i = 1; i ......
数组 leetcode 26

leetcode 22. 括号生成

## 暴力枚举 ```java class Solution { public List generateParenthesis(int n) { List list = getAll(2 * n); List result = new ArrayList(); for (String item : ......
括号 leetcode 22

LeetCode 152. 乘积最大子数组

``` class Solution { public: static const int N=20010; int f[N],g[N]; int maxProduct(vector& nums) { int n=nums.size(); int res=nums[0]; f[0]=g[0]=num ......
乘积 数组 LeetCode 152

【leetcode】【剑指 Offer 06】【从尾到头打印链表】

# c++ ## 第一个方法 ```c++ /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) ......
leetcode Offer

[问题记录] C# string.format null值变量值需要显示在占位符

起因是在C#程序里执行存储过程,恰好参数值里有NULL值变量,可是null值没有填充到占位符上。 网上一看,好多都是添加参数的方法(command.Parameters.Add() ,DBNull.value)去解决这个问题,实在不想搞的这么麻烦, 我就只想简单点。 比如 string.Format ......
量值 string format 问题 null

【LeetCode】矩阵中的和

``` 给你一个下标从 0 开始的二维整数数组 nums 。一开始你的分数为 0 。你需要执行以下操作直到矩阵变为空: 矩阵中每一行选取最大的一个数,并删除它。如果一行中有多个最大的数,选择任意一个并删除。 在步骤 1 删除的所有数字中找到最大的一个数字,将它添加到你的 分数 中。 请你返回最后的 ......
矩阵 LeetCode

【笔试实战】LeetCode题单刷题-编程基础 0 到 1【二】

博客推行版本更新,成果积累制度,已经写过的博客还会再次更新,不断地琢磨,高质量高数量都是要追求的,工匠精神是学习必不可少的精神。因此,大家有何建议欢迎在评论区踊跃发言,你们的支持是我最大的动力,你们敢投,我就敢肝 ......
笔试 实战 LeetCode 基础

LeetCode 148. 排序链表

``` class Solution { public: ListNode* sortList(ListNode* head) { if(!head||!head->next) return head; ListNode* fast=head,*slow=head; while(fast->next ......
LeetCode 148

LeetCode 501. 二叉搜索树中的众数

#题目链接: [LeetCode 501. 二叉搜索树中的众数](https://leetcode.cn/problems/find-mode-in-binary-search-tree/description/) ##题意: **给你一个含重复值的二叉搜索树(BST)的根节点 root ,找出并返 ......
LeetCode 501

LeetCode 图

200. 岛屿数量 695. 岛屿的最大面积 精品题解 https://leetcode.cn/problems/number-of-islands/solution/dao-yu-lei-wen-ti-de-tong-yong-jie-fa-dfs-bian-li-/ 注意深度优先遍历,对一格陆地 ......
LeetCode

[Leetcode Weekly Contest]350

链接:[LeetCode](https://leetcode-cn.com/contest/weekly-contest-350/) ## [Leetcode]2739. 总行驶距离 卡车有两个油箱。给你两个整数,mainTank 表示主油箱中的燃料(以升为单位),additionalTank 表示 ......
Leetcode Contest Weekly 350

LeetCode 146. LRU缓存机制

``` class LRUCache { public: struct node { int key,val; node *l,*r; node(int a,int b) { l=r=NULL; key=a; val=b; } }*L,*R; unordered_map mp;//保存key和节点的 ......
缓存 LeetCode 机制 146 LRU

cannot find view for viewmodel caliburn micro

在用Caliburn.Micro使用官方的例子,当天还是可以运行出来界面如下: 但是隔天去公司后一直运行显示找不到shellviewmodel 百度显示,Caliburn.Micro对命名规范特别的严格。又重新写了一个新项目,还是出了问题 无解,步骤都是一样的。 最后的解决办法是重新开了一个新的WP ......
viewmodel caliburn cannot micro find

每日一题 力扣 445 https://leetcode.cn/problems/add-two-numbers-ii/

可以直接用栈去做就行,逆序想到栈的做法 然后算完一个就直接赋值给答案数组 我用的是常见 public ListNode addTwoNumbers(ListNode l1, ListNode l2) { int sizeA=0; int sizeB=0; ListNode start=l1; Lis ......

leetcode933使用队列

输入的时间是递增的 输出 的时[t-3000,t] queue <int>q; int ping(int t){ q.push(t); while(q.front<t-3000){ q,pop(); } return q.size(); } ......
队列 leetcode 933

【转】python踩坑(FileNotFoundError: Could not find module '此处省略了一些路径win_amd64.dll' (or one of its dependencies). Try using the full path with constructor syntax.)

1、报错 (FileNotFoundError: Could not find module '此处省略了一些路径\site-packages\scipy\.libs\libbanded5x.GL5FZ7Y77HIKQFNMZKUOMV5GID6YMX2V.gfortran-win_amd64.dl ......

byte转string再转回为有损过程

private class HostRemoveResponseModifier implements Modifier { protected String getHost() { return url; } @Override public byte[] mod(byte[] origin) { ......
过程 string byte

java.lang.NoSuchMethodError: org.apache.commons.lang.StringUtils.endsWith(Ljava/lang/String;Ljava/lang/String;)Z

最近一段时间参与部署一个spring mvc项目,打成war包,放到tomcat里。本地测试没有问题,部署到线上就有时会报错 “java.lang.NoSuchMethodError: org.apache.commons.lang.StringUtils.endsWith(Ljava/lang/S ......

convert string list to number list

``` #string with integers sepated by spaces string1="1 2 3 4 5 6 7 8" print("Actual String containing integers: ",string1) print("Type of string: ",ty ......
list convert string number to

LeetCode -- 767. 重构字符串

设字符串s长度为len s可以重构为相邻字符串不同时 有字符串中出现次数最多的字符 < (len + 1) >> 1 当满足上述条件时候,我们就能对其进行重构 重构法:先放置偶数位置,再放置奇数位置 c ++ class Solution { public: string reorganizeStr ......
字符串 字符 LeetCode 767

【LeetCode剑指offer#05】回文链表的两种解法+删除链表中间节点(链表的基本操作)

### 回文链表 给你一个单链表的头节点 head ,请你判断该链表是否为回文链表。如果是,返回 true ;否则,返回 false 。 示例 1: 输入:head = [1,2,2,1] 输出:true 示例 2: 输入:head = [1,2] 输出:false 提示: 链表中节点数目在范围[1 ......
回文 解法 基本操作 节点 LeetCode