结点leetcode 19

LeetCode----前缀和

# 1 算法原理 **适用场景:利用preSum 数组,可以在O(1)的时间内快速求出nums任意区间[i,j]内的所有元素之和** **sum(i,j) = preSum(j + 1) - preSum[i]** ![](https://img2023.cnblogs.com/blog/21670 ......
前缀 LeetCode

LeetCode----回溯

# 1 算法模板 ``` for 选择 in 选择列表: # 做选择 将该选择从选择列表移除 路径.add(选择) backtrack(路径, 选择列表) # 撤销选择 路径.remove(选择) 将该选择再加入选择列表 ``` # 2 代码示例 [46. 全排列](https://leetcode ......
LeetCode

8.19 对象比较 equals

## demo1 equals 实例化参数内容相同才相等-- 类外对比 ``` class Person { private String name; private int age; public Person(String name,int age){ this.name = name; thi ......
对象 equals 8.19 19

LeetCode----二维网格DFS

# 1 算法模板 ``` void dfs(int[][] grid, int r, int c) { // 判断 base case // 如果坐标 (r, c) 超出了网格范围,直接返回 if (!inArea(grid, r, c)) { return; } // 访问上、下、左、右四个相邻结 ......
网格 LeetCode DFS

coe_xfr_sql_profile.sql脚本 适用 oracle数据库版本:10.2, 11.1, 11.2, 12.1, 12.2 18c_and 19c

coe_xfr_sql_profile.sql脚本 内容如下: 适用 oracle数据库版本:10.2, 11.1, 11.2, 12.1, 12.2 18c_and 19c 注明:复制粘贴即可。 SPO coe_xfr_sql_profile.log;SET DEF ON TERM OFF ECH ......

[LeetCode] 1351. Count Negative Numbers in a Sorted Matrix

Given a m x n matrix grid which is sorted in non-increasing order both row-wise and column-wise, return the number of negative numbers in grid. Exampl ......
LeetCode Negative Numbers Matrix Sorted

递归-二叉搜索树-leetcode98验证二叉搜索树

```java //leetcode submit region begin(Prohibit modification and deletion) /** * Definition for a binary tree node. * public class TreeNode { * int va ......
leetcode 98

LeetCode35.搜索插入位置

//个人学习笔记用 - 题目: 给定一个排序数组和一个目标值,在数组中找到目标值,并返回其索引。如果目标值不存在于数组中,返回它将会被按顺序插入的位置。 请必须使用时间复杂度为 O(log n) 的算法。 参考题解--代码随想录 - 暴力解法: ~~~c++ class Solution { pub ......
LeetCode 位置 35

LeetCode 90. 子集 II

``` class Solution { public: unordered_map cnt; vector> res; vector path; vector> subsetsWithDup(vector& nums) { for(auto i:nums) cnt[i]++; dfs(-10);/ ......
子集 LeetCode 90 II

【leetcode】104. Maximum Depth of Binary Tree

给定一个二叉树,找出其最大深度。 二叉树的深度为根节点到最远叶子节点的最长路径上的节点数。 **说明:** 叶子节点是指没有子节点的节点。 **示例:** 给定二叉树 `[3,9,20,null,null,15,7]`, ``` 3 / \ 9 20 / \ 15 7 ``` 返回它的最大深度 3 ......
leetcode Maximum Binary Depth Tree

LeetCode 40. 组合总和 II

``` class Solution { public: vector> res; vector> combinationSum2(vector& candidates, int target) { sort(candidates.begin(),candidates.end()); dfs(can ......
总和 LeetCode 40 II

LeetCode 39. 组合总和

``` class Solution { public: vector> res; vector> combinationSum(vector& candidates, int target) { dfs(candidates,0,target); return res; } vector path ......
总和 LeetCode 39

【leetcode】21. Merge Two Sorted Lists

将两个升序链表合并为一个新的 **升序** 链表并返回。新链表是通过拼接给定的两个链表的所有节点组成的。 **示例 1:** ![](https://assets.leetcode.com/uploads/2020/10/03/merge_ex1.jpg) **输入:**l1 = \[1,2,4\] ......
leetcode Sorted Merge Lists Two

Leetcode 2611. 老鼠和奶酪

### 题目: 有两只老鼠和 `n` 块不同类型的奶酪,每块奶酪都只能被其中一只老鼠吃掉。 下标为 `i` 处的奶酪被吃掉的得分为: - 如果第一只老鼠吃掉,则得分为 `reward1[i]` 。 - 如果第二只老鼠吃掉,则得分为 `reward2[i]` 。 给你一个正整数数组 `reward1` ......
奶酪 Leetcode 老鼠 2611

Oracle 19c dbca静默安装建库

Oracle 19c dbca静默安装建库 目前单节点无RAC环境,模板如下(RAC差不多,少部分不同)。 1 dbca -silent -createDatabase \ 2 -responseFile NO_VALUE \ 3 -templateName $ORACLE_HOME/assista ......
Oracle dbca 19c 19

Oracle 19C组件ID、组件名称和组件全称对应关系以及dbca静默组件选择

Oracle 19C组件ID、组件名称和组件全称对应关系以及dbca静默组件选择 dbca可以调用图形化界面来创建数据库,当选择“Custom Database”模板的时候会出现“Database Options”来选择options安装对应组件,总共8个options。 PS:在安装数据库期间,组 ......
组件 全称 名称 Oracle dbca

代码随想录Day19|二叉树(六)

今日任务 654.最大二叉树 617.合并二叉树 700.二叉搜索树中的搜索 98.验证二叉搜索树 654.最大二叉树 当不确定一个新的解决方案是否正确的时候 请优先使用暴力解的方式 /** * Definition for a binary tree node. * public class Tr ......
随想录 随想 代码 Day 19

2023-06-06:给你二叉树的根结点 root ,请你设计算法计算二叉树的 垂序遍历 序列。 对位于 (row, col) 的每个结点而言, 其左右子结点分别位于 (row + 1, col -

2023-06-06:给你二叉树的根结点 root ,请你设计算法计算二叉树的 垂序遍历 序列。 对位于 (row, col) 的每个结点而言, 其左右子结点分别位于 (row + 1, col - 1) 和 (row + 1, col + 1) 树的根结点位于 (0, 0) 。 二叉树的 垂序遍历 ......
结点 序列 算法 col row

LeetCode----字典树

# 1 原理 [字典树原理参考](https://blog.csdn.net/m0_46202073/article/details/107253959) # 2 构建字典树 ```python class Trie: def __init__(self): # 字典树结构 # children 数 ......
字典 LeetCode

Python基础19

模块的简介 1.模块 就是一系列功能的结合体 2.作用 节省时间,提高开发效率 3.模块来源 内置的 第三方的 自定义的 4.模块的存在形式 我们自己写的单个py文件 包:一系列模块的结合体,就是文件夹 import句式 1 import md 2 #import 模块名字,不加后缀名 首次导入文件 ......
基础 Python

python基础day19 模块

模块的简介 python语言 起源于Linux系统,调包侠(贬义>>>褒义) 什么是模块 模块:就是一系列功能的结合体(模块里面提前开发好的一堆功能而已) 为什么要用模块 提高开发效率(别人提前开发好的一些功能,我们直接拿来使用节省了我们自己的时间和精力):站在巨人的肩膀上 模块的来源 1. 内置的 ......
模块 基础 python day 19

Leetcode刷题指南

## 1. 数据结构 ### 1.1 数组 - **循环数组问题**:把数组扩大为两倍即可,但不是真的扩大两倍,而是通过索引取模的方式 ### 1.2 链表 链表可以通过引入虚拟头节点 `ListNode *dummy = new ListNode{-1, nullptr}` 来极大简化 0. ** ......
Leetcode 指南

leetcode 17. 电话号码的字母组合

## 递归 自己写了个递归的算法 ```java class Solution { public List letterCombinations(String digits) { List resList = recursion(digits); return resList; } public L ......
电话号码 字母 leetcode 号码 电话

Leetcode 2352. 相等行列对

### 题目: 给你一个下标从 `0` 开始、大小为 `n x n` 的整数矩阵 `grid` ,返回满足 `R~i~` 行和 `C~j~` 列相等的行列对 `($$R_i$$, C~j~)` 的数目。 如果行和列以相同的顺序包含相同的元素(即相等的数组),则认为二者是相等的。 ### 难度:简单 ......
行列 Leetcode 2352

leetcode 15. 三数之和

## 暴力法 暴力解法总是最直接能想到的解法。 ```java NA ``` ## 双指针法 贴一个评论区看到的解法 ```java class Solution { //定义三个指针,保证遍历数组中的每一个结果 //画图,解答 public List> threeSum(int[] nums) { ......
之和 leetcode 15

Leetcode Hot 100 & 49. Group Anagrams

写在前面: 不知不觉已经研二下了,既然选择以后走AI这条路,不可避免地也得刷一刷leetcode题目,因为招聘的时候笔试总是要用到的。首先刷一刷leetcode的hot 100题,好记性赶不上烂笔头,记录下来在写这些算法题中的收获给自己看。 参考资料: 考点:哈希 & [题干] 这题没做出来,第一次 ......
Leetcode Anagrams Group Hot 100

《深度剖析CPython解释器》19. Python类机制的深度解析(第三部分): 自定义类的底层实现、以及metaclass

https://www.cnblogs.com/traditional/p/13593927.html 楔子 Python除了给我提供了很多的类之外,还支持我们定义属于自己的类,那么Python底层是如何做的呢?我们下面就来看看。 自定义class 老规矩,如果想知道底层是怎么做的,那么就必须要通过 ......
深度 解释器 底层 metaclass 机制

[LeetCode] 2352. Equal Row and Column Pairs

Given a 0-indexed n x n integer matrix grid, return the number of pairs (ri, cj) such that row ri and column cj are equal. A row and column pair is co ......
LeetCode Column Equal Pairs 2352

【安全学习之路】Day19

![](https://img2023.cnblogs.com/blog/3073714/202306/3073714-20230606003442082-1820570140.png) ![](https://img2023.cnblogs.com/blog/3073714/202306/3073 ......
Day 19

[LeetCode] 1347. Minimum Number of Steps to Make Two Strings Anagram 制造字母异位词的最小步骤数

You are given two strings of the same length `s` and `t`. In one step you can choose **any character** of `t` and replace it with **another character* ......
字母 LeetCode 步骤 Anagram Minimum