找到约 10000 条结果
  • [LeetCode] Lowest Common Ancestor of a Binary Tree系列
    Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST. According to the definition of LCA on Wikipedia: “The lowest common ancestor is defined between two nodes v and w as the lowest node in T. that has both v and w as descendants (where we allow a ...
    2017-05-16
  • [LeetCode] 911. Online Election
    In an election, the i-th vote was cast for persons[i] at time times[i].
    2018-12-05
  • Leetcode 2. Add Two Numbers
    这个比较简单,掌握好循环条件以及进位条件。 {代码...}
    2016-10-04
  • LeetCode[138] Copy List with Random Pointer
    A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null. Return a deep copy of the list
    2016-11-09
  • 寄存器和移位寄存器分析与建模
    ⭐本专栏针对FPGA进行入门学习,从数电中常见的逻辑代数讲起,结合Verilog HDL语言学习与仿真,主要对组合逻辑电路与时序逻辑电路进行分析与设计,对状态机FSM进行剖析与建模。🔥文章和代码已归档至【Github仓库:hardware-tutorial】,需要的朋友们自取。或者关注公众号【AIShareLab】,回复 FPGA 也可获取。
    2023-02-05
  • Leetcode 9. Palindrome Number
    这题好简单 {代码...}
    2016-10-13
  • EC 421经济理算法
    Problem Set 1: OLS ReviewEC 421: Introduction to EconometricsDue before midnight on Sunday, 19 April 2020DUE Upload your answer on Canvas before midnight on Sunday, 19 April 2020.IMPORTANT You must submit two files:
    2023-02-23
  • HTTP 及TCP知识点问答
    Q1:session、token、cookies的区别A1:Q2:http与https的区别,https比http多了几次TPC连接A2:Q3:描述TCP三次握手与四次挥手过程A3:Q4:描述tcpdump+wireshark工具的使用A4:
    2021-03-28
  • Leetcode 11. Container With Most Water
    当左端线段L小于右端线段R时,我们把L右移,这时舍弃的是L与右端其他线段(R-1, R-2, ...)组成的木桶,这些木桶是没必要判断的,因为这些木桶的容积肯定都没有L和R组成的木桶容积大。
    2016-10-17
  • Recursion & Binary Tree
    {代码...}
    2016-02-12
  • 【刷算法】求二叉树深度的递归以及非递归解法
    题目描述 输入一棵二叉树,求该树的深度。从根结点到叶结点依次经过的结点(含根、叶结点)形成树的一条路径,最长路径的长度为树的深度。 递归解法 {代码...} 非递归解法 {代码...}
    2018-06-23
    2
  • Q&A「微搭低代码」小程序相关问题
    注册相关Q1:一个腾讯云账号可以创建几个小程序?A:详情请参见 小程序注册上限和绑定上限。Q2:一个主体账号能注册多少个小程序呢?A:个人主体是5个,企业主体是50个。Q3:可以用企业账户下的微搭发布到个人微信下的小程序吗?A:任意腾讯云账号主体都可以发布,没有要求。授权相关Q1:能否支持服务号跟小程序共用?可...
    2022-02-23
  • Walls and Gates
    看到discussion里面bfs还有一种写法。是把所有gates的点都先放到q里面,然后一起遍历。这种写法的好处是:保证了每个点都只被放进q一次,不会重复遍历。保证了时间复杂是O(MN), M = rooms.length, N = rooms[0].length。
    2017-01-30
  • 贪吃蛇代码(新手)
    制作大体流程如下: 进场界面的绘制,使用定义的gotoxy函数控制光标位置,color函数改变颜色 游戏界面的绘制,使用循环分三次绘制边框和内部,注意横向间距为2,竖向为1 蛇身的绘制,采用链表逐个绘制蛇身部分 食物的产生,采用头文件,使用srand函数改变种子,注意每次产生食物遍历蛇身判断是否与蛇身重合,若重合再次产生食物 采...
    2020-05-07
  • Quasar Select: 可输入选项option,输入的option可清除
    实现效果 UI组件依然是使用Quasar Framework。 先来看一下效果: 实现Select: 可输入选项option,输入的option可清除 在官网的示例找到 Using menu and filtering,在此基础上进行修改,结合Customizing menu options自定义选项,实现选项的清除按钮。 Select: Filtering and adding to menu - Quasar Playground 在此代...
    2020-04-13
  • [LeetCode] 52. N-Queens II
    The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other.
    2016-05-18
  • Leetcode PHP题解--D101 100. Same Tree
    D101 100. Same Tree 题目链接 100. Same Tree 题目分析 判断给定的两颗树是否相等。即对应位置的对应值是否都相等。 思路 同时逐个遍历,一遇到不相等的就直接返回false。 二叉树的遍历就不细说了。 最终代码 {代码...} 若觉得本文章对你有用,欢迎用爱发电资助。
    2019-07-12