个人博客:https://luxialan.com

摘要: 深度学习的前世今生。 <! more 前言 概念 AI深度学习:层次化的概念让计算机构建较简单的概念来学习复杂概念。如果绘制出这些概念如何建立在彼此之上的图,我们将得到一张“深”(层次很多)的图。出于这个原因,我们称这种方法为AI深度学习。 知识图谱(knowledge base)方法: 计算机可以 阅读全文
posted @ 2017-02-09 21:14 luxialan 阅读(393) 评论(0) 推荐(0) 编辑
摘要: 1. 题目Write an algorithm to determine if a number is “happy”.A happy number is a number defined by the following process: Starting with any positive in... 阅读全文
posted @ 2015-07-17 10:00 luxialan 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 1.给定整数N,那么N的阶乘N!末尾有多少个0?这个问题经过质因子分解转换为求5的指数ret = 0;for(i = 1; i N k*n >= 1; Ret += N; } return Ret;} 版权... 阅读全文
posted @ 2015-04-26 13:52 luxialan 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 这道题我一开始能想到的就只有位运算+右移,最直观。二进制最后一位 对应于mod2,右移一位对应于/2int count(int v) { int num = 0; while(v) { if(v % 2 == 1) { num++; } ... 阅读全文
posted @ 2015-04-24 19:25 luxialan 阅读(158) 评论(0) 推荐(0) 编辑
摘要: Surrounded RegionsGiven a 2D board containing'X'and'O', capture all regions surrounded by'X'.A region is captured by flipping all'O's into'X's in that... 阅读全文
posted @ 2015-04-23 11:01 luxialan 阅读(119) 评论(0) 推荐(0) 编辑
摘要: Word LadderGiven two words (beginWordandendWord), and a dictionary, find the length of shortest transformation sequence frombeginWordtoendWord, such t... 阅读全文
posted @ 2015-04-22 09:49 luxialan 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 描述需要在一个N × M的网格中建立一个通讯基站,通讯基站仅必须建立在格点上。网格中有A个用户,每个用户的通讯代价是用户到基站欧几里得距离的平方。网格中还有B个通讯公司,维护基站的代价是基站到最近的一个通讯公司的路程(路程定义为曼哈顿距离)。在网格中建立基站的总代价是用户通讯代价的总和加上维护基站的... 阅读全文
posted @ 2015-04-21 15:15 luxialan 阅读(324) 评论(0) 推荐(0) 编辑
摘要: 描述给定字符串,求它的回文子序列个数。回文子序列反转字符顺序后仍然与原序列相同。例如字符串aba中,回文子序列为"a", "a", "aa", "b", "aba",共5个。内容相同位置不同的子序列算不同的子序列。输入第一行一个整数T,表示数据组数。之后是T组数据,每组数据为一行字符串。输出对于每组... 阅读全文
posted @ 2015-04-21 11:40 luxialan 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 描述给定两个日期,计算这两个日期之间有多少个2月29日(包括起始日期)。只有闰年有2月29日,满足以下一个条件的年份为闰年:1. 年份能被4整除但不能被100整除2. 年份能被400整除输入第一行为一个整数T,表示数据组数。之后每组数据包含两行。每一行格式为"month day, year",表示一... 阅读全文
posted @ 2015-04-21 11:28 luxialan 阅读(158) 评论(0) 推荐(0) 编辑
摘要: Palindrome Partitioning IIGiven a string s, partition s such that every substring of the partition is a palindrome.Return the minimum cuts needed for ... 阅读全文
posted @ 2015-04-14 11:01 luxialan 阅读(144) 评论(0) 推荐(0) 编辑