题解:双指针 一个指针一次移动2步,一个指针一次移动一步。如果两个指针相遇证明存在环. /** * Definition for singly-linked list. * class ListNode { * int val; * ListNode next; * ListNode(int x) ...
分类:
其他好文 时间:
2020-07-18 13:44:37
阅读次数:
47
链接:https://leetcode-cn.com/problems/unique-binary-search-trees-ii/ 代码 /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNo ...
分类:
其他好文 时间:
2020-07-18 13:39:30
阅读次数:
56
链接:https://leetcode-cn.com/problems/binary-tree-inorder-traversal/ 代码 /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNo ...
分类:
其他好文 时间:
2020-07-18 11:34:31
阅读次数:
66
题解:hashset(没有达到进阶的要求) /** * Definition for singly-linked list. * class ListNode { * int val; * ListNode next; * ListNode(int x) { * val = x; * next = ...
分类:
其他好文 时间:
2020-07-18 11:31:09
阅读次数:
54
题解:双指针 快指针一次两步,慢指针一次一步,当快指针走到结尾时候慢指针刚好到终点 /** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * ListNode(in ...
分类:
其他好文 时间:
2020-07-18 11:27:15
阅读次数:
49
此题和之前的剑指offer32-I、II.从上到下打印二叉树大致相同在BFS的基础上只是添加了一个重排序的过程。具体代码如下: 1 /** 2 * Definition for a binary tree node. 3 * struct TreeNode { 4 * int val; 5 * st ...
分类:
其他好文 时间:
2020-07-18 11:18:07
阅读次数:
58
#多变量线性回归(Linear Regression with Multiple Variables) ##4.1多维特征 多维特征就是有多个特征,比如房价模型中增加房子的楼层数等等,模型的特征为$\left( {x_{1}},{x_{2}},...,{x_} \right)$ \(n\) 代表特征 ...
分类:
其他好文 时间:
2020-07-17 22:17:36
阅读次数:
80
How to Create Multiple lists from CSV File? We can use the combination of CSV and PowerShell to create multiple lists in bulk in SharePoint Online. He ...
分类:
系统相关 时间:
2020-07-17 14:13:50
阅读次数:
83
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), r ...
分类:
其他好文 时间:
2020-07-17 13:55:38
阅读次数:
71
题目链接:https://leetcode-cn.com/problems/n-ary-tree-postorder-traversal/ 方法一递归法:先访问子节点,然后访问根。LeetCode代码: /* // Definition for a Node. class Node { public ...
分类:
其他好文 时间:
2020-07-16 21:39:10
阅读次数:
79