Given an integer array nums of length n and an integer target, find three integers at distinct indices in nums such that the sum is closest to target. Return the sum of the three integers. You may assume t…
Given an integer array nums of length n and an integer target, find three integers at distinct indices in nums such that the sum is closest to target. Return the sum of the three integers. You may assume t…
Given an array of n integers nums and an integer target, find the number of index triplets i, j, k with 0 <= i < j < k < n that satisfy the condition nums[i] + nums[j] + nums[k] < targe…
Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. A mapping of digit to letters (just like on the telephone buttons) is given below. Note that 1 does not map to any letters. …
为什么突然想起写这个 很多讲Unity渲染,Shader等等的文章或者书里都会提到相机投影,因为渲染管线里比较重要的一环就是如何把一个object投影到View上。大部分时候这个Matrix都是直接给出来的,或者简单两句解释。我看的似懂非懂,所以找了一些资料想来详细看看如何证明的。 准备工作 准备工作自然是线性代数,最重要的一个知识是线性代数。首先复习下面的两个知识点 关于1,我们先在平面坐标系,也就是二维空间看几个经典变换。 平面缩放矩阵 如果我们想要把一个平面图形缩放,缩放矩阵很容易写出来。 (x′y′)=(s…