汪小祯

做什么都是因为喜欢

工大助手Tableview优化

寒假的时候写完了iOS端的校园说说部分,因为当时技术有限,很多部分不完善,尤其体现在高速滑动时,界面卡顿很严重。开学大概一个月时,自己技术也有了一定提高,对tableview进行了重构,并在这里写下思路。 老版本因为当时只会使用xib+tableview,所以用了一个很取巧的地方。一个说说模块,..


202. Happy Number

题目Write an algorithm to determine if a number is “happy”. A happy number is a number defined by the following process: Starting with any positive in..


405. Convert a Number to Hexadecimal

题目Given an integer, write an algorithm to convert it to hexadecimal. For negative integer, two’s complement method is used. Note: All letters in hex..


415. Add Strings

题目Given two non-negative integers num1 and num2 represented as string, return the sum of num1 and num2. Note: The length of both num1 and num2 is &l..


268. Missing Number

题目Given an array containing n distinct numbers taken from 0, 1, 2, …, n, find the one that is missing from the array. For example,Given nums = [0, 1..


349. Intersection of Two Arrays

题目Given two arrays, write a function to compute their intersection. Example:Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2]. Note:Each elemen..


383. Ransom Note

题目 Given an arbitrary ransom note string and another string containing letters from all the magazines, write a function that will return true if the..


453. Minimum Moves to Equal Array Elements

题目Given a non-empty integer array of size n, find the minimum number of moves required to make all array elements equal, where a move is incrementin..