08 2017 档案

摘要:Imagine you have a special keyboard with the following keys: Key 1: (A): Print one 'A' on screen. Key 2: (Ctrl-A): Select the whole screen. Key 3: (Ct 阅读全文
posted @ 2017-08-29 15:18 Grandyang 阅读(7812) 评论(0) 推荐(0) 编辑
摘要:Initially on a notepad only one character 'A' is present. You can perform two operations on this notepad for each step: Copy All: You can copy all the 阅读全文
posted @ 2017-08-27 09:27 Grandyang 阅读(8513) 评论(8) 推荐(1) 编辑
摘要:In the world of Dota2, there are two parties: the Radiant and the Dire. The Dota2 senate consists of senators coming from two parties. Now the senate 阅读全文
posted @ 2017-08-27 07:17 Grandyang 阅读(4581) 评论(0) 推荐(0) 编辑
摘要:In English, we have a concept called root, which can be followed by some other words to form another longer word - let's call this word successor. For 阅读全文
posted @ 2017-08-24 15:39 Grandyang 阅读(6607) 评论(0) 推荐(0) 编辑
摘要:Given a string, your task is to count how many palindromic substrings in this string. The substrings with different start indexes or end indexes are c 阅读全文
posted @ 2017-08-21 15:44 Grandyang 阅读(18038) 评论(9) 推荐(0) 编辑
摘要:You are given n pairs of numbers. In every pair, the first number is always smaller than the second number. Now, we define a pair (c, d) can follow an 阅读全文
posted @ 2017-08-17 14:51 Grandyang 阅读(5670) 评论(4) 推荐(0) 编辑
摘要:Solve a given equation and return the value of x in the form of string "x=#value". The equation contains only '+', '-' operation, the variable x and i 阅读全文
posted @ 2017-08-12 16:02 Grandyang 阅读(7041) 评论(1) 推荐(0) 编辑
摘要:The set S originally contains numbers from 1 to n. But unfortunately, due to the data error, one of the numbers in the set got duplicated to another n 阅读全文
posted @ 2017-08-09 11:17 Grandyang 阅读(5241) 评论(0) 推荐(1) 编辑
摘要:Given an array consisting of n integers, find the contiguous subarray of given length k that has the maximum average value. And you need to output the 阅读全文
posted @ 2017-08-06 13:54 Grandyang 阅读(7698) 评论(0) 推荐(0) 编辑
摘要:A message containing letters from A-Z is being encoded to numbers using the following mapping way: Beyond that, now the encoded string can also contai 阅读全文
posted @ 2017-08-03 13:07 Grandyang 阅读(8215) 评论(4) 推荐(1) 编辑

Fork me on GitHub