10 2017 档案
摘要:The "Hamming distance" between two integers is the number of positions at which the corresponding bits are different. Given two integers and , calcula
阅读全文
摘要:反射允许你在运行时分析任意的对象。如果对象是泛型类的实例,关于泛型类型参数则得不到太多信息,因为它们会被擦除。利用反射可以获得泛型类的信息。
阅读全文
摘要:Given a linked list, swap every two adjacent nodes and return its head. For example, Given , you should return the list as . Your algorithm should use
阅读全文
摘要:The count and say sequence is the sequence of integers with the first five terms as following: is read off as or . is read off as or . is read off as
阅读全文
摘要:Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in or
阅读全文
摘要:Implement strStr(). Returns the index of the first occurrence of needle in haystack, or 1 if needle is not part of haystack. public int strStr(String
阅读全文
摘要: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
阅读全文