摘要:
题意 Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. 意思就是说在给定的节点中计算出在同一条直线上的最大节点个数。 思路 这道题,题意很容易理解,但 阅读全文
摘要:
例题 以字符串 ABABACA 为例 a 前缀: 后缀: 结果为0 ab 前缀:a 后缀: b 结果为0 aba 前缀:a ab 后缀: ba a 结果为1,此时 i=2,j=1 abab 前缀:a ab aba 后缀: bab ab b 结果为2,此时 i=3,j=2 ababa 前缀:a ab 阅读全文
摘要:
纹理实现 思想 这个是Cocos2dx的渲染部分的最基本的实现,被我拆分到mac上,但是并不是用的EGLContext,而是搭配glfw,还有soil第三方图形库。 实现 cpp // // main.cpp // Moni // // Created by staff on 17/1/10. // 阅读全文
摘要:
题意 Given an array of n positive integers and a positive integer s, find the minimal length of a subarray of which the sum ≥ s. If there isn't one, ret 阅读全文
摘要:
题意 Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set. get(key) Get th 阅读全文
摘要:
题意 You are given a string, s, and a list of words, words, that are all of the same length. Find all starting indices of substring(s) in s that is a co 阅读全文