![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
算法
文章平均质量分 68
Chacojack
中南大学大四学生,现任掌赢科技Android研发工程师实习生
展开
-
LeetCode——Two Sum
题目Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two numbers such that they add up to the target, where原创 2015-09-17 18:59:19 · 494 阅读 · 0 评论 -
LeetCode——Add Two Numbers
题目You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a原创 2015-09-18 12:14:17 · 389 阅读 · 0 评论 -
LeetCode——Longest Substring Without Repeating Characters
题目Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for “abcabcbb” is “abc”, which the length is 3. For原创 2015-09-18 23:49:51 · 356 阅读 · 0 评论 -
LeetCode——Median of Two Sorted Arrays
题目There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).思路这个不会,我就只想到了先把两个排成一个的,然后再选中原创 2015-09-19 10:09:37 · 334 阅读 · 0 评论 -
Android中getWidth()和getMeasureWidth()的区别探究
背景在Android中正确获得View控件的宽和高——使用篇中我们知道了,getWidth和getMeasureWidth都可以获得view的宽,高同理。 那这两个函数究竟有什么区别呢?其实以前我只是知道获取宽高要那样子,也不知道这两个并不知道这两个函数的区别,所以探究了一下。先看个例子。例子我直接贴代码: 使用自定义的View:public class MyView exte原创 2015-09-22 09:17:00 · 2342 阅读 · 1 评论 -
算法——动态规划
该文由网络文章总结加自己实践编码整理而来。参考文章地址: 动态规划算法介绍——概念、意义及应用、例题 五大常用算法之二:动态规划算法 USACO代码解析Subset Sums基本模型原创 2015-09-22 15:36:17 · 842 阅读 · 0 评论 -
两道机试题
今天下午参加了华为的机试,还是蛮简单的。除了出了点小意外,就是前面的职业测评有点烦。问题最后都解决了。这次机试都是初级题目,一共3道题目,可以自己选择语言编写(这里比较坑,上传时要选择语言,表示浪费了两次都上传成了C++,囧rz!!!)。现在凭印象拿来和大家分享一下:第一题:求一个数在内存存储时1的个数,不能使用位运算符;输入:一个整数输出:1的个数如:输入:5输出原创 2015-05-22 21:18:29 · 541 阅读 · 0 评论