摘要: Description Given an array A of non negative integers, return an array consisting of all the even elements of A, followed by all the odd elements of A阅读全文
posted @ 2018-10-16 10:04 arcsinW 阅读(11) 评论(0) 编辑
摘要: Description Given a string S of '(' and ')' parentheses, we add the minimum number of parentheses ( '(' or ')', and in any positions ) so that the res阅读全文
posted @ 2018-10-14 23:55 arcsinW 阅读(57) 评论(0) 编辑
摘要: Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number. The function阅读全文
posted @ 2018-09-14 20:17 arcsinW 阅读(19) 评论(0) 编辑
摘要: Given a non empty array of digits representing a non negative integer, plus one to the integer. The digits are stored such that the most significant d阅读全文
posted @ 2018-09-02 17:19 arcsinW 阅读(11) 评论(0) 编辑
摘要: Given an array nums and a value val, remove all instances of that value in place and return the new length. Do not allocate extra space for another ar阅读全文
posted @ 2018-08-25 10:39 arcsinW 阅读(11) 评论(0) 编辑
摘要: Given a 32 bit signed integer, reverse digits of an integer. Example 1: Example 2: Example 3: Note: Assume we are dealing with an environment which co阅读全文
posted @ 2018-08-21 13:25 arcsinW 阅读(17) 评论(0) 编辑
摘要: You are given two non empty linked lists representing two non negative integers. The digits are stored in reverse order and each of their nodes contai阅读全文
posted @ 2018-08-20 10:52 arcsinW 阅读(15) 评论(0) 编辑
摘要: In MATLAB, there is a very useful function called 'reshape', which can reshape a matrix into a new one with different size but keep its original data.阅读全文
posted @ 2018-08-18 21:00 arcsinW 阅读(18) 评论(0) 编辑
摘要: A website domain like "discuss.leetcode.com" consists of various subdomains. At the top level, we have "com", at the next level, we have "leetcode.com阅读全文
posted @ 2018-08-17 12:21 arcsinW 阅读(15) 评论(0) 编辑
摘要: Given a matrix , return the transpose of . The transpose of a matrix is the matrix flipped over it's main diagonal, switching the row and column indic阅读全文
posted @ 2018-08-15 14:36 arcsinW 阅读(51) 评论(0) 编辑
摘要: Write a program that outputs the string representation of numbers from 1 to n. But for multiples of three it should output “Fizz” instead of the numbe阅读全文
posted @ 2018-08-14 12:33 arcsinW 阅读(12) 评论(0) 编辑
摘要: Given an arbitrary ransom note string and another string containing letters from all the magazines, write a function that will return true if the rans阅读全文
posted @ 2018-08-14 11:20 arcsinW 阅读(7) 评论(0) 编辑
摘要: Given a positive integer, output its complement number. The complement strategy is to flip the bits of its binary representation. Note: 1. The given i阅读全文
posted @ 2018-08-14 10:58 arcsinW 阅读(11) 评论(0) 编辑
摘要: Given a List of words, return the words that can be typed using letters of alphabet on only one row's of American keyboard like the image below. Examp阅读全文
posted @ 2018-08-14 10:47 arcsinW 阅读(8) 评论(0) 编辑
摘要: Given a string containing just the characters , , , , and , determine if the input string is valid. An input string is valid if: Open brackets must be阅读全文
posted @ 2018-08-10 15:50 arcsinW 阅读(13) 评论(0) 编辑