10 2017 档案

摘要:Your are given an array of positive integers nums. Count and print the number of (contiguous) subarrays where the product of all the elements in the s 阅读全文
posted @ 2017-10-30 12:32 Grandyang 阅读(8641) 评论(14) 推荐(1) 编辑
摘要:Given two strings s1, s2, find the lowest ASCII sum of deleted characters to make two strings equal. Example 1: Input: s1 = "sea", s2 = "eat" Output: 阅读全文
posted @ 2017-10-29 23:50 Grandyang 阅读(5696) 评论(0) 推荐(1) 编辑
摘要:There are some trees, where each tree is represented by (x,y) coordinate in a two-dimensional garden. Your job is to fence the entire garden using the 阅读全文
posted @ 2017-10-27 23:54 Grandyang 阅读(4579) 评论(2) 推荐(0) 编辑
摘要:3D Slicer Reconstruct CT/MRI 1. Load DCM file of your CT/MRI 2. Go to Volume Rendering, click the eye button to show volume 3. Go to Editor -> Thresho 阅读全文
posted @ 2017-10-26 23:58 Grandyang 阅读(1056) 评论(0) 推荐(0) 编辑
摘要:Given an integer array nums and an integer k, return true if it is possible to divide this array into k non-empty subsets whose sums are all equal. Ex 阅读全文
posted @ 2017-10-25 23:38 Grandyang 阅读(17550) 评论(13) 推荐(1) 编辑
摘要:Given a non-empty array of non-negative integers nums, the degree of this array is defined as the maximum frequency of any one of its elements. Your t 阅读全文
posted @ 2017-10-24 12:39 Grandyang 阅读(8607) 评论(1) 推荐(1) 编辑
摘要:Give a string s, count the number of non-empty (contiguous) substrings that have the same number of 0's and 1's, and all the 0's and all the 1's in th 阅读全文
posted @ 2017-10-23 12:25 Grandyang 阅读(6257) 评论(0) 推荐(0) 编辑
摘要:Given a non-empty 2D array grid of 0's and 1's, an island is a group of 1's (representing land) connected 4-directionally (horizontal or vertical.) Yo 阅读全文
posted @ 2017-10-22 23:51 Grandyang 阅读(9829) 评论(0) 推荐(0) 编辑
摘要:Given a non-empty 2D array grid of 0's and 1's, an island is a group of 1's (representing land) connected 4-directionally (horizontal or vertical.) Yo 阅读全文
posted @ 2017-10-20 11:53 Grandyang 阅读(17311) 评论(0) 推荐(0) 编辑
摘要:Given a positive integer, check whether it has alternating bits: namely, if two adjacent bits will always have different values. Example 1: Input: 5 O 阅读全文
posted @ 2017-10-19 23:51 Grandyang 阅读(4012) 评论(2) 推荐(1) 编辑
摘要:Given a non-empty list of words, return the k most frequent elements. Your answer should be sorted by frequency from highest to lowest. If two words h 阅读全文
posted @ 2017-10-18 23:52 Grandyang 阅读(12806) 评论(8) 推荐(0) 编辑
摘要:Error: nafxcw.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator new[](unsigned int)" (??_U@YAPAXI@Z) already defined in libcpmt.lib(newaop.obj 阅读全文
posted @ 2017-10-17 06:48 Grandyang 阅读(1641) 评论(0) 推荐(1) 编辑
摘要:Given a sorted array consisting of only integers where every element appears twice except for one element which appears once. Find this single element 阅读全文
posted @ 2017-10-16 21:42 Grandyang 阅读(6089) 评论(0) 推荐(0) 编辑
摘要:How would you design a URL shortening service that is similar to TinyURL? Background:TinyURL is a URL shortening service where you enter a URL such as 阅读全文
posted @ 2017-10-15 23:51 Grandyang 阅读(6176) 评论(0) 推荐(0) 编辑
摘要:You are given coins of different denominations and a total amount of money. Write a function to compute the number of combinations that make up that a 阅读全文
posted @ 2017-10-14 23:47 Grandyang 阅读(16225) 评论(4) 推荐(1) 编辑
摘要:There are 1000 buckets, one and only one of them contains poison, the rest are filled with water. They all look the same. If a pig drinks that poison 阅读全文
posted @ 2017-10-13 23:45 Grandyang 阅读(6868) 评论(0) 推荐(0) 编辑
摘要:You are given a circular array nums of positive and negative integers. If a number k at an index is positive, then move forward k steps. Conversely, i 阅读全文
posted @ 2017-10-12 21:09 Grandyang 阅读(10347) 评论(11) 推荐(0) 编辑
摘要:A gene string can be represented by an 8-character long string, with choices from "A", "C", "G", "T". Suppose we need to investigate about a mutation 阅读全文
posted @ 2017-10-11 21:40 Grandyang 阅读(4626) 评论(2) 推荐(0) 编辑
摘要:Given an integer n, return the largest palindromic integer that can be represented as the product of two n-digits integers. Since the answer can be ve 阅读全文
posted @ 2017-10-10 11:32 Grandyang 阅读(4867) 评论(1) 推荐(0) 编辑
摘要:You are given a data structure of employee information, which includes the employee's unique id, his importance value and his direct subordinates' id. 阅读全文
posted @ 2017-10-09 10:06 Grandyang 阅读(3983) 评论(3) 推荐(0) 编辑
摘要:On an NxN chessboard, a knight starts at the r-th row and c-th column and attempts to make exactly K moves. The rows and columns are 0 indexed, so the 阅读全文
posted @ 2017-10-08 23:29 Grandyang 阅读(7572) 评论(2) 推荐(0) 编辑
摘要:Given a binary tree, find the length of the longest path where each node in the path has the same value. This path may or may not pass through the roo 阅读全文
posted @ 2017-10-07 23:51 Grandyang 阅读(10786) 评论(5) 推荐(0) 编辑
摘要:Given two strings A and B, find the minimum number of times A has to be repeated such that B is a substring of it. If no such solution, return -1. For 阅读全文
posted @ 2017-10-06 13:21 Grandyang 阅读(9603) 评论(2) 推荐(0) 编辑
摘要: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 (wi 阅读全文
posted @ 2017-10-05 11:43 Grandyang 阅读(12652) 评论(3) 推荐(1) 编辑
摘要:You're now a baseball game point recorder. Given a list of strings, each string can be one of the 4 following types: Each round's operation is permane 阅读全文
posted @ 2017-10-04 22:17 Grandyang 阅读(3601) 评论(0) 推荐(0) 编辑
摘要:Given a time represented in the format "HH:MM", form the next closest time by reusing the current digits. There is no limit on how many times a digit 阅读全文
posted @ 2017-10-03 13:03 Grandyang 阅读(9224) 评论(2) 推荐(0) 编辑
摘要:博主昨晚正在刷题,突然手机语音大声提示“微信支付收款到账”,把博主吓了一跳,打开一看,居然收到了第一笔打赏,还是博主最喜欢的数字,老开心了~感谢网友对于博主工作的认可与支持,多谢多谢!不管大家是物质打赏(比如扫码发红包,大家打赏时请留下微信号哦,可以跟博主加为好友哈,可以通过在付款方留言中留下你的微 阅读全文
posted @ 2017-10-02 08:21 Grandyang 阅读(7844) 评论(5) 推荐(8) 编辑
摘要:Given a non-empty string s, you may delete at most one character. Judge whether you can make it a palindrome. Example 1: Example 2: Note: 这道题是之前那道Vali 阅读全文
posted @ 2017-10-02 08:17 Grandyang 阅读(10422) 评论(1) 推荐(0) 编辑
摘要:Given a string containing only three types of characters: '(', ')' and '*', write a function to check whether this string is valid. We define the vali 阅读全文
posted @ 2017-10-01 12:40 Grandyang 阅读(10862) 评论(3) 推荐(1) 编辑

Fork me on GitHub