2017年9月5日
摘要: 题目描述 设有n个正整数,将他们连接成一排,组成一个最大的多位整数。如:n=3时,3个整数13,312,343,连成的最大整数为34331213。如:n=4时,4个整数7,13,4,246连接成的最大整数为7424613。 输入描述: 有多组测试样例,每组测试样例包含两行,第一行为一个整数N(N<= 阅读全文
posted @ 2017-09-05 14:45 无惧风云 阅读(143) 评论(0) 推荐(0) 编辑
  2017年9月4日
摘要: Given the coordinates of four points in 2D space, return whether the four points could construct a square. The coordinate (x,y) of a point is represen 阅读全文
posted @ 2017-09-04 15:18 无惧风云 阅读(198) 评论(0) 推荐(0) 编辑
  2017年9月3日
摘要: Given an array of numbers nums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find the two elements 阅读全文
posted @ 2017-09-03 19:49 无惧风云 阅读(118) 评论(0) 推荐(0) 编辑
  2017年9月2日
摘要: Given a non-empty integer array, find the minimum number of moves required to make all array elements equal, where a move is incrementing a selected e 阅读全文
posted @ 2017-09-02 20:13 无惧风云 阅读(120) 评论(0) 推荐(0) 编辑
摘要: Given two integers n and k, you need to construct a list which contains n different positive integers ranging from 1 to n and obeys the following requ 阅读全文
posted @ 2017-09-02 14:38 无惧风云 阅读(109) 评论(0) 推荐(0) 编辑
摘要: Given a string, sort it in decreasing order based on the frequency of characters. Example 1: Example 2: Example 3: 阅读全文
posted @ 2017-09-02 10:28 无惧风云 阅读(163) 评论(0) 推荐(0) 编辑
摘要: A zero-indexed array A consisting of N different integers is given. The array contains all integers in the range [0, N - 1]. Sets S[K] for 0 <= K < N 阅读全文
posted @ 2017-09-02 09:41 无惧风云 阅读(185) 评论(0) 推荐(0) 编辑
  2017年9月1日
摘要: Given an 2D board, count how many battleships are in it. The battleships are represented with 'X's, empty slots are represented with'.'s. You may assu 阅读全文
posted @ 2017-09-01 11:32 无惧风云 阅读(142) 评论(0) 推荐(0) 编辑
摘要: Given a list of positive integers, the adjacent integers will perform the float division. For example, [2,3,4] -> 2 / 3 / 4. However, you can add any 阅读全文
posted @ 2017-09-01 09:52 无惧风云 阅读(189) 评论(0) 推荐(0) 编辑
  2017年8月31日
摘要: 题目描述 在4x4的棋盘上摆满了黑白棋子,黑白两色的位置和数目随机其中左上角坐标为(1,1),右下角坐标为(4,4),现在依次有一些翻转操作,要对一些给定支点坐标为中心的上下左右四个棋子的颜色进行翻转,请计算出翻转后的棋盘颜色。 给定两个数组A和f,分别为初始棋盘和翻转位置。其中翻转位置共有3个。请 阅读全文
posted @ 2017-08-31 10:16 无惧风云 阅读(372) 评论(0) 推荐(0) 编辑