杨帆博客

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


  • 首页

  • 标签

  • 归档

  • 搜索

Burst-Balloons

发表于 2018-01-31 | 更新于: 2018-08-22

题目地址

LeetCode#312 Burst Balloons

题目描述

Given n balloons, indexed from 0 to n-1. Each balloon is painted with a number on it represented by array nums. You are asked to burst all the balloons. If the you burst balloon i you will get nums[left] * nums[i] * nums[right] coins. Here left and rightare adjacent indices of i. After the burst, the left and right then becomes adjacent.

阅读全文 »

Sliding-Puzzle

发表于 2018-01-29 | 更新于: 2018-08-22

题目地址

LeetCode#773 Sliding Puzzle

题目描述

On a 2x3 board, there are 5 tiles represented by the integers 1 through 5, and an empty square represented by 0.

A move consists of choosing 0 and a 4-directionally adjacent number and swapping it.

The state of the board is solved if and only if the board is [[1,2,3],[4,5,0]].

Given a puzzle board, return the least number of moves required so that the state of the board is solved. If it is impossible for the state of the board to be solved, return -1.

阅读全文 »

Convert-Sorted-Array-to-Binary-Search-Tree

发表于 2018-01-28 | 更新于: 2018-08-22

题目地址

LeetCode#108 Convert Sorted Array to Binary Search Tree

题目描述

  Given an array where elements are sorted in ascending order, convert it to a height balanced BST.

阅读全文 »

【OpenGL】6-纹理1

发表于 2018-01-26 | 更新于: 2018-08-22

参考教程

【中文版】第五课:带纹理的立方体

【英文版】Tutorial 5 : A Textured Cube

  感觉自己学的好慢啊。

  纹理(Texture),在计算机图形学中是把存储在内存里的位图包裹到3D渲染物体的表面。 纹理贴图给物体提供了丰富的细节,用简单的方式模拟出了复杂的外观。 一个图像(纹理)被贴(映射)到场景中的一个简单形体上,就像印花贴到一个平面上一样。

​

阅读全文 »

Subsets

发表于 2018-01-26 | 更新于: 2018-08-22

题目地址

LeetCode#78 Subsets

题目描述

Given a set of distinct integers, nums, return all possible subsets (the power set).

Note: The solution set must not contain duplicate subsets.

阅读全文 »
1…353637…46
KsGin

KsGin

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

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