杨帆博客

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


  • 首页

  • 标签

  • 归档

  • 搜索

Shortest-Completing-Word

发表于 2018-02-16 | 更新于: 2018-08-22

题目地址

LeetCode#748 Shortest Completing Word

题目描述

  Find the minimum length word from a given dictionary words, which has all the letters from the string licensePlate. Such a word is said to complete the given string licensePlate

  Here, for letters we ignore case. For example, "P" on the licensePlate still matches "p" on the word.

  It is guaranteed an answer exists. If there are multiple answers, return the one that occurs first in the array.

  The license plate might have the same letter occurring multiple times. For example, given a licensePlate of "PP", the word "pair" does not complete the licensePlate, but the word "supper" does.

阅读全文 »

Toeplitz-Matrix

发表于 2018-02-15 | 更新于: 2018-08-22

题目地址

LeetCode#766 Toeplitz Matrix

题目描述

A matrix is Toeplitz if every diagonal from top-left to bottom-right has the same element.

Now given an M x N matrix, return True if and only if the matrix is Toeplitz.

阅读全文 »

【OpenGL】7-纹理2

发表于 2018-02-14 | 更新于: 2018-08-22

参考教程

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

【英文版】Tutorial 5 : A Textured Cube

学习目录

  1. 调整上一篇文章的代码,进行坐标的翻转使得正方体正确的显示
  2. 纹理的解析
阅读全文 »

Jewels-and-Stones

发表于 2018-02-14 | 更新于: 2018-08-22

题目地址

LeetCode#771 Jewels and Stones

题目描述

You’re given strings J representing the types of stones that are jewels, and S representing the stones you have. Each character in Sis a type of stone you have. You want to know how many of the stones you have are also jewels.

The letters in J are guaranteed distinct, and all characters in J and S are letters. Letters are case sensitive, so "a" is considered a different type of stone from "A".

阅读全文 »

Redundant-Connection

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

题目地址

LeetCode#684 Redundant Connection

题目描述

In this problem, a tree is an undirected graph that is connected and has no cycles.

The given input is a graph that started as a tree with N nodes (with distinct values 1, 2, …, N), with one additional edge added. The added edge has two different vertices chosen from 1 to N, and was not an edge that already existed.

阅读全文 »
1…333435…46
KsGin

KsGin

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

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