摘要:
Given an array and a value, remove all instances of that value in place and return the new length. Do not allocate extra space for another array, you 阅读全文
摘要:
Reverse digits of an integer. Example1: x = 123, return 321Example2: x = -123, return -321 个人的大体思路: 先判断是整数还是负数,flag记录符号(-1或1),把数字取绝对值然后转换成字符串,字符串逆序,把字 阅读全文
摘要:
Given a binary array, find the maximum number of consecutive 1s in this array. Example 1: Note: The input array will only contain 0 and 1. The length 阅读全文