杨帆博客

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


  • 首页

  • 标签

  • 归档

  • 搜索

Minimum-Distance-Between-BST-Nodes

发表于 2018-03-07 | 更新于: 2018-08-22

题目地址

LeetCode#783 Minimum Distance Between BST Nodes

题目描述

  Given a Binary Search Tree (BST) with the root node root, return the minimum difference between the values of any two different nodes in the tree.

阅读全文 »

【OpenGL】14-深度测试与模板测试

发表于 2018-03-06 | 更新于: 2018-08-22

参考教程

【中文版】深度测试 模板测试

【英文版】Depth testing Stencil testing

学习心得

  在我们之前所实现的代码中,总是使用了 3D 图形,包括我们所导入的模型以及之前一直在使用的正立方体。以正方体为例,这是一个对称的结构,总是有一部分内容在一部分之后使得我们不可见。由于计算机屏幕坐标系本身是一个二维的面,我们必须在这上边模拟出 3D 的效果。而遮挡效果也是必须要实现的,在这里需要介绍一个概念:深度缓冲 。

阅读全文 »

Split-Linked-List-in-Parts

发表于 2018-03-06 | 更新于: 2018-08-22

题目地址

LeetCode#725 Split Linked List in Parts

题目描述

  Given a (singly) linked list with head node root, write a function to split the linked list into k consecutive linked list “parts”.

  The length of each part should be as equal as possible: no two parts should have a size differing by more than 1. This may lead to some parts being null.

阅读全文 »

Couples-Holding-Hands

发表于 2018-03-05 | 更新于: 2018-08-22

题目地址

LeetCode#765 Couples Holding Hands

题目描述

  N couples sit in 2N seats arranged in a row and want to hold hands. We want to know the minimum number of swaps so that every couple is sitting side by side. A swap consists of choosing any two people, then they stand up and switch seats.

阅读全文 »

【OpenGL】13-Mesh与Model类

发表于 2018-03-05 | 更新于: 2018-08-22

  在上一篇文章中我们了解了 Assimp 这个库,但是只知道这个库只是作为一个加载的作用,并不清楚如何使用,这这一篇便是介绍 Assimp 的数据结构以及我们自己创建的两个为方便使用它而创建的类。

阅读全文 »
1…293031…46
KsGin

KsGin

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

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