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
阅读全文
摘要: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:
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要:Error: nafxcw.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator new[](unsigned int)" (??_U@YAPAXI@Z) already defined in libcpmt.lib(newaop.obj
阅读全文
摘要:Given a sorted array consisting of only integers where every element appears twice except for one element which appears once. Find this single element
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要:You are given a data structure of employee information, which includes the employee's unique id, his importance value and his direct subordinates' id.
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要:博主昨晚正在刷题,突然手机语音大声提示“微信支付收款到账”,把博主吓了一跳,打开一看,居然收到了第一笔打赏,还是博主最喜欢的数字,老开心了~感谢网友对于博主工作的认可与支持,多谢多谢!不管大家是物质打赏(比如扫码发红包,大家打赏时请留下微信号哦,可以跟博主加为好友哈,可以通过在付款方留言中留下你的微
阅读全文
摘要: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
阅读全文
摘要:Given a string containing only three types of characters: '(', ')' and '*', write a function to check whether this string is valid. We define the vali
阅读全文