杨帆博客

你想开发游戏还是改变世界?


  • 首页

  • 标签

  • 归档

  • 搜索

Maximum-Product-of-Word-Lengths

发表于 2017-12-13 | 更新于: 2018-08-22

LeetCode#318 Maximum Product of Word Lengths

Given a string array words, find the maximum value of length(word[i]) * length(word[j]) where the two words do not share common letters. You may assume that each word will contain only lower case letters. If no such two words exist, return 0.

阅读全文 »

【OpenGL】2-这是一个三角形1

发表于 2017-12-12 | 更新于: 2018-08-22

【OpenGL菜鸟历程】

  上次的一堆代码就显示了个窗口,虽然感觉很麻烦但是还不足以让我放弃。继续继续,跟着教程上的下一篇文章,我开始接触了Shader,而这一次就是要用Shader画一个三角。

阅读全文 »

Maximum-Product-of-Three-Numbers

发表于 2017-12-12 | 更新于: 2018-08-22

LeetCode#628 Maximum Product of Three Numbers

Given an integer array, find three numbers whose product is maximum and output the maximum product.

Example 1:

1
2
Input: [1,2,3]
Output: 6

Example 2:

1
2
Input: [1,2,3,4]
Output: 24

Note:

  1. The length of the given array will be in range [3,10^4] and all elements are in the range [-1000, 1000].
  2. Multiplication of any three numbers in the input won’t exceed the range of 32-bit signed integer.
阅读全文 »

【OpenGL】1-竟然只是画了一个窗口

发表于 2017-12-11 | 更新于: 2018-08-22

【OPENGL菜鸟历程】

  O.O从第一次知道OPENGL这个名字到现在已经有三年了,但是还是第一次真正去学这个东西。虽然在之前也大概看过DX,对这种东西的复杂度略知一二,并且做好了去长期啃这个的打算。但是,还是难啊(:зゝ∠)

  我看的是LearnOpenGL这个教程,光是配置GLEW,GLFW就费了好久的功夫。唉,距离我的引擎梦,还差多久啊。

  言归正传,本文中的代码可用性建立在你正确的配置了GLEW和GLFW的条件下,接下来有时间的话我会写一篇文章来说明如何在MAC OS下配置GLEW , GLFW,并使用Clion进行代码编写。

阅读全文 »

Kth-Smallest-Element-in-a-Sorted-Matrix

发表于 2017-12-11 | 更新于: 2018-08-22

  LeetCode#378 Kth Smallest Element in a Sorted Matrix

  Given a n x n matrix where each of the rows and columns are sorted in ascending order, find the kth smallest element in the matrix.

  Note that it is the kth smallest element in the sorted order, not the kth distinct element.

Example:

1
2
3
4
5
6
7
8
matrix = [
[ 1, 5, 9],
[10, 11, 13],
[12, 13, 15]
],
k = 8,

return 13.

Note:
You may assume k is always valid, 1 ≤ k ≤ n2.

阅读全文 »
1…43444546
KsGin

KsGin

游戏程序员/计算机图形学/Unity/西山居搬砖

226 日志
16 标签
GitHub E-Mail Google Twitter
© 2018 KsGin @ 2018
0%