找出两个有序数组的中值

Problem

There are two sorted arrays nums1 and nums2 of size m and n respectively.

Find the median of the two sorted arrays. The overall run time complexity
should be O(log (m+n)).

You may assume nums1 and nums2 cannot be both empty.

Example 1:
nums1 = [1, 3]
nums2 = [2]
The median is 2.0

Example 2:
nums1 = [1, 2]
nums2 = [3, 4]

The median is (2 + 3)/2 = 2.5

阅读全文

HTTP 服务器

一、HTTP 服务是什么

1、一个网页请求包含两次 HTTP 包交换

(1) 浏览器向 HTTP 服务器发送请求 HTTP 包

阅读全文

Two Sum

Problem

Given an array of integers, return indices of the 
two numbers such that they add up to a specific
target.

You may assume that each input would have exactly
one solution, and you may not use the same element
twice.

Example:
Given nums = [2, 7, 11, 15], target = 9,

Because nums[0] + nums[1] = 2 + 7 = 9,

return [0, 1].

阅读全文

小程序 Tabs-Sticky

小程序 sticky 的正确使用姿势

阅读全文

自定义 Github 动态

自定义 github 动态

阅读全文

6 个常见的网站可用性问题及其修正方法

6 个常见的网站可用性问题及其修正方法

阅读全文

好玩的 Console

一切要从昨天打开知乎控制台说起,昨天打开知乎控制台看到了 acii 图形的打印,比较好奇怎么画出来的,首先想肯定要用 console 吧,那么到底使用什么姿势 console 出来的呢?emmm,然后就有了这个

阅读全文

常用图片格式比较

日常开发中会用到各种图片,这些图片到底有何异同,我也只是知道些大概,于是有了这篇文章

阅读全文

幽灵空白节点

幽灵空白节点并不是一个专业术语,而是由前端大佬张鑫旭提出的一个概念,以下是我个人的一些理解

阅读全文

级联

《CSS 重构:样式表性能调优》第二章笔记

阅读全文