05 2019 档案
摘要:题目如下: Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffe
        阅读全文
            
摘要:题目如下: Given N, consider a convex N-sided polygon with vertices labelled A[0], A[i], ..., A[N-1] in clockwise order. Suppose you triangulate the polygo
        阅读全文
            
摘要:题目如下: Given an array of scores that are non-negative integers. Player 1 picks one of the numbers from either end of the array followed by the player 2
        阅读全文
            
摘要:题目如下: Given an integer n, count the total number of digit 1 appearing in all non-negative integers less than or equal to n. Example: 解题思路:本题是《编程之美》上的题
        阅读全文
            
摘要:题目如下: Alex and Lee play a game with piles of stones. There are an even number of piles arranged in a row, and each pile has a positive integer number 
        阅读全文
            
摘要:题目如下: In a warehouse, there is a row of barcodes, where the i-th barcode is barcodes[i]. Rearrange the barcodes so that no two adjacent barcodes are e
        阅读全文
            
摘要:题目如下: Students are asked to stand in non-decreasing order of heights for an annual photo. Return the minimum number of students not standing in the ri
        阅读全文
            
摘要:题目如下: Given an array A of positive integers (not necessarily distinct), return the lexicographically largest permutation that is smaller than A, that 
        阅读全文
            
摘要:题目如下: Today, the bookstore owner has a store open for customers.length minutes. Every minute, some number of customers (customers[i]) enter the store,
        阅读全文
            
摘要:题目如下: Given a 2-dimensional grid of integers, each value in the grid represents the color of the grid square at that location. Two squares belong to t
        阅读全文
            
摘要:题目如下: You have N gardens, labelled 1 to N. In each garden, you want to plant one of 4 types of flowers. paths[i] = [x, y] describes the existence of a
        阅读全文
            
摘要:题目如下: We write the integers of A and B (in the order they are given) on two separate horizontal lines. Now, we may draw connecting lines: a straight l
        阅读全文
            
摘要:题目如下: Given a list of words, each word consists of English lowercase letters. Let's say word1 is a predecessor of word2 if and only if we can add exac
        阅读全文
            
摘要:题目如下: Given a string S of lowercase letters, a duplicate removal consists of choosing two adjacent and equal letters, and removing them. We repeatedly
        阅读全文
            
摘要:题目如下: We have a collection of rocks, each rock has a positive integer weight. Each turn, we choose the two heaviest rocks and smash them together. Sup
        阅读全文
            
摘要:先看一段代码: 按照C++的经验,想当然第一行输出是2,第二行是 openssh;可是实际输出却是11和"o"。最终查找资料有如下发现: 1、如果用“.”作为分隔的话,应该是String.split("\\."),不能用String.split("."); 2、如果用“|”作为分隔的话,应该是Str
        阅读全文
            
摘要:题目如下: Three stones are on a number line at positions a, b, and c. Each turn, you pick up a stone at an endpoint (ie., either the lowest or highest pos
        阅读全文
            
摘要:题目如下: On an infinite plane, a robot initially stands at (0, 0) and faces north. The robot can receive one of three instructions: "G": go straight 1 un
        阅读全文
            
摘要:题目如下: A boomerang is a set of 3 points that are all distinct and not in a straight line. Given a list of three points in the plane, return whether the
        阅读全文
            
 
                    
                     
                    
                 
                    
                 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号