![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
互联网笔试
文章平均质量分 55
llq_667
这个作者很懒,什么都没留下…
展开
-
一道美团笔试题
记录一下自己笔试遇到的东西~ 题目:给定一个数组arr及数组长度len,求满足0 示例:arr[]={10,5} len=2 返回:0public class Solution(){ public static int max_find(int[] list, int len) { if (list == null) { return -1;原创 2015-09-15 09:58:33 · 438 阅读 · 0 评论 -
猿题库:拆分字符串,求最大值
题目:给出一个由‘0’-‘9’数字构成的字符串,重新排列字符串的顺序,并将字符串拆分成两个非负整数a、b,可包含前缀0,求a+b的最大值。数据长度:2 实例:s = '123',cal(s) = '33' s='999999999999991',cal(s) = '100000000000000' 分析:设计字符串、字符、整数的互相转换,以及整型上溢的问题。 pub原创 2015-09-15 15:02:20 · 569 阅读 · 0 评论 -
美图面试问到的一个题:求一个字符串中第一个仅出现一次的字符
题目:求一个字符串中第一个仅出现一次的字符 分析:字符不仅限于字母,还可以是标点、数字等,故ASCII码表共256个字符。以ASCII码值为下标,统计字符串中每个字符出现的个数,然后在遍历字符串,哪个的个数为1,即为所求。 public class Solution(){ public static void main(String[] args){ St原创 2015-09-15 14:52:30 · 340 阅读 · 0 评论 -
leetcode:Valid Palindrome
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. For example, "A man, a plan, a canal: Panama" is a palindrome. "race a car" is not a原创 2015-09-18 16:52:15 · 233 阅读 · 0 评论 -
leetcode:count and say
The count-and-say sequence is the sequence of integers beginning as follows: 1, 11, 21, 1211, 111221, ... 1 is read off as "one 1" or 11. 11 is read off as "two 1s" or 21. 21 is read off as原创 2015-09-18 16:54:02 · 221 阅读 · 0 评论