找到约 10000 条结果
  • LeetCode 240——搜索二维矩阵 II
    1. 题目 2. 解答 2.1. 方法一 从矩阵的左下角开始比较 目标值等于当前元素,返回 true; 目标值大于当前元素,j 增 1,向右查找,排除掉此列上边的数据(都比当前元素更小); 目标值小于当前元素,i 减 1,向上查找,排除掉此行右边的数据(都比当前元素更大)。 {代码...} 2.2. 方法二 我们先沿着对角线的方向,找到第...
    2018-11-24
  • ElasticSearch CURD操作案例(三)
    参考文档[链接] {代码...} 测试运行结果
    2020-06-11
  • 微信小程序基础开发(一)----初步搭建
    小程序的目录结构小程序的配置全局配置(app.js)1、pages:表示当前项目的子页面,并且路径与左侧的pages下的路径完全对应 {代码...} 2、window:定义小程序所有页面的顶部背景颜色、文字颜色等详情参考微信小程序官方文档 {代码...} 3、tabBar:指定tab栏切换,list数组内最少两项详情参考微信小程序官方文档 {代码...} 页...
    2020-12-14
    1
  • leetcode35 Search Insert Position
    题目要求:在一个有序的数组中,找到一个目标值,返回该值得下标。若没有找到该值,则返回该值顺序插入的下标例如,[1,3,5,6], 5 → 2[1,3,5,6], 2 → 1[1,3,5,6], 7 → 4[1,3,5,6], 0 → 0
    2017-03-23
    1
  • Convert Sorted List to Binary Search Tree
    Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.
    2014-11-14
  • Search in Rotated Sorted Array@LeetCode
    其实不太能理解为什么这题能标成hard,因为用很直观的算法便可以解出来。由于数组是被翻转过的,所以被分成两个部分,每个部分又都是有序的。所以先判断先判断一下要查找的数是在前半段还是后半段,然后依次查找即可。
    2015-03-30
  • [leetcode]unique-binary-search-trees
    递归 一共n个,root是1个(可能是1:n中的一个),左边分到比root小的i-1个,右边分到比root大的n-i个,左边的组合数*右边的组合数
    2014-04-16
  • Clustering by fast search and find of density peaks
    聚类是将数据对象的集合分成相似的对象类的过程。使得同一个簇(或类)中的对象之间具有较高的相似性,而不同簇中的对象具有较高的相异性。按照聚类的尺度,聚类方法可被分为以下三种:基于距离的聚类算法、基于密度的聚类方法、基于互连性的聚类算法。其中基于距离的聚类算法是用各式各样的距离来衡量数据对象之间的相...
    2017-09-25
  • Binary Search总结(2)
    再来看比较复杂的几道题未完待续
    2019-03-07
  • binary search总结(1)
    所以当我们要在一个有序的区间内寻找到第一个满足条件的数的时候,可以用binary search来查找。如162题Find Peak Element这一题,需要我们找到一个局部峰值,题目要求的时间复杂度是logN,所以就想到可以用binary search来做,但是binary search怎么写一开始是没有思路的,比较nums[mid]和nums[mid-1],mums[mid+1]的大小...
    2019-03-02
  • PAT A1043 Is It a Binary Search Tree
    A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties:
    2020-03-07
  • 基于jquery的提示框JavaScript 插件,类Bootstrap
    为元素加上onclick="$.fn.msg('msg', { text: '警告消息', type: 'warning', position: ' middle-center' })"事件函数,可以自动为元素添加点击后,可以全局添加提示框功能,可以多次添加。如配置为了手动关闭,提示框会出现×字符,点击会将其从DOM中删除
    2019-12-22
  • PostgreSQL 5.7. Schemas 笔记
    A database contains one or more named schemas, which in turn contain tables. Schemas also contain other kinds of named objects, including data types, functions, and operators. The same object name can be used in different schemas without conflict; for example, both schema1 and myschema can contai...
    2019-03-04
  • httpservlet里单纯分页
    {代码...}   {代码...}  转载于猿2048:➝《httpservlet里单纯分页》
    2019-10-14
  • PHP 多进程处理任务
    PHP 多进程处理任务pcntl 模块(非 Unix 类系统不支持此模块)一个 PHP 多进程简单例子大概是这个样子: {代码...} 当然实际应用中我们不能够这样输出代码,不够健壮,也不够优雅,我所以找了个基于 pcntl 封装的扩展包来使用。spatie/async - 基于 pcntl 封装的扩展包以下是我使用 spatie/async 来优化一个多进程请求的...
    2020-09-24
  • FIT5042 网络开发
    Assignment Background and Description FIT5042 Assignment comprises three deliverables: Design Report, Java EE webapplication, Research Report. These are all individual based deliverables.You are required to build a web-based Java prototype of a Banking Enterprise Applicationwith Java enterprise t...
    2021-10-23
  • 2023年最具威胁的25种安全漏洞(CWE TOP 25)
    最近几年,每年6月CWE发布的版本都成为一年中最重要的版本,因为里面包含了新的CWE TOP 25 视图,也就是我们常说的:CWE最具威胁的25种缺陷。
    2023-07-14