2019 Ali Baba Android by interns face

2019 Ali Baba Android by interns face

Before seen a lot of big brothers face was, I have to share my experience it

Written Online

First, after the official website delivery, delivery to be completed, there is an online written test, and your basic job interview does not matter, a total of 10 selected test each select six options, two programming problems, what type of multiple-choice questions are there, mathematics, network, data structures. . . Must participate, not participate, then resume will not be issued.
I choose a will. . . Pairs, one will not, but the whole cast a big problem just write public static void main (String [] args) {}, ah, is so miserable.
The following is written online programming original title:

The first question
Youku currently provides a number of user favorite features, but can not have all the features in a list display, the user may access there is a chain when accessing certain functions. Now the product students want to optimize the access process, the following rules in the process of optimization of:
the user long as each page will have to stay (minutes), if you leave a page of them, so long can not be compared when the page subsequent reservations to stay stay on this page of the length of time (the final arrival except page), analysis based on past data, each removed a page, users follow the first page long residence will increase by 20%, and because the user is not familiar with the new features, each optimized page users will cause the loss of 5%, resulting in loss of customers when optimizing more than 30%, the optimization is not desirable, how to optimize this link, thus ensuring the process used by the user in the longest time and minimal churn?

Input:
The first line of the input positive integer P (Visits page) (2 <P <= 10 )
the second input line P positive integer P1, P2, P3 ---- Pn ( 0 <Pn)
output:
maximum stay time (2 decimal places)
long original travel
length of each page of optimized residence (2 decimal places)
end-users amount of the remaining (2 decimal places)
entry:
. 5
10 58 12 is. 4
sample output:
30.00
58 124
6.00 8.00 12.00 4.00
0.95

The second question
dirty rectangle combined
in a 2D rendering system, the local common improve rendering performance rendering method. If the interface elements have changed, we can use this element occupies a rectangular area marked dirty rectangle, then in the next rendering, we only every dirty rectangle rectangular area once occupied by the local rendering without the need of full-screen rendering.
But the system provides a partial rendering API with the following restrictions:

  1. Single topical render region must be rectangular, can not be polygonal, circular, or other irregular shapes.
  2. Single topical rendering time and cost in addition to the number of pixels to render a positive linear correlation, there are some fixed overhead.
  3. Slicing a single element can not be rendered both non-rectangular original dirty tag rendered segmentation.
    Therefore, in order to render the total cost of the optimal time, we generally do not directly render a partial dirty rectangle are performed for each marker, but first of dirty rectangular overlap or merge close, thereby reducing the number of local rendering.
    Tested on a device, a single topical render the relationship between time and the number of pixels rendered overhead (both rendering area) is f (x) = 10000 + x .
    Now ask you to design an algorithm to algorithm enter a dirty rectangle list, outputs the dirty rectangle merged list the total render time overhead required list of rectangles dirty combined total render time overhead the best on this device.
    Dirty rectangle is combined red rectangle as shown in FIG.
    Here Insert Picture DescriptionInput:
    input data comprising a plurality of lines
    at line 1, the integer N (the number of dirty rectangle, 1 <= N <= 8 )
    , line 2, an integer of L1 (upper left corner of the first rectangle dirty abscissa)
    , line 3, the integer T1 ( a first upper left corner of the rectangle dirty ordinate)
    , line 4, integers W1 (width of the first dirty rectangle, 1 <= W1)
    at line 5, the high integer H1 (first dirty rectangle,. 1 <= H1)
    ...
    of 4 * (N-1) +2 lines, integer LN (N-th upper left corner of the rectangle dirty abscissa)
    of 4 * (N-1) +3 row, the TN integer (N-th upper left corner of the rectangle dirty ordinate)
    of 4 * (N-1) +4 line integer WN (N-th dirty width of the rectangle, 1 <= WN)
    of 4 * (N-1) +5 line integer HN (N-th high dirty rectangle, 1 < = HN)
    output:
    dirty list of rectangles outputting the combined total rendering time overhead
    entry:
    . 5
    232
    66
    111
    41 is
    197
    44 is
    29
    53 is
    154
    208
    42 is
    12 is
    177
    87
    . 9
    102
    75
    168
    79
    41 is
    the output sample:
    45291

I did not even question can not read, and still can not read, then less than 20 minutes, I handed in. At that time, feeling cold, and did not resume delivery status Tell me what network.

one side

Unexpectedly, after about a week. Online at eight, came a phone call, display Hangzhou, then was surprised, and then pick up. Sure enough, the opposite is Alibaba, said to be a WX division, you can not be a simple interview. And then conducted the interview.

1.首先是自我介绍,嗯,当时太紧张了,面试官告诉我说慢点。
2.然后是项目介绍,我介绍的是自己手写的游戏框架实现的五子棋和2048,一个招聘软件,一个蓝牙聊天软件,一个可以写自定义脚本的软件。
面试官对游戏比较感兴趣,问了游戏框架的实现,和通过我的框架都可以做什么游戏。
然后,又问了蓝牙软件的实现,问的比较多。我当时太紧张了,只讲了BluetoothAdapterBluetoothSocket,着重讲了通过流来通信,忘记讲UUID了。
3.接着,面试官问我用没用过Android Studio看过软件运行时所占内存,我说没有,但是我用手机看过(其实没看过),然后面试官就问我内存占了多少,我(编的)说大概40多M(后来我看了是70M)。
4.后来又问我知不知道一个进程给分配多少的空间,我直接说不知道,确实不知道,也没法编。
4.在讲项目中间,我说我内个框架是照着外国的一个作者写的一本书里的Java框架改到Android的,然后面试官就问了我平时看过什么和Android相关的书,我说了好多,然后还谈到了CSDN博客,面试官又问了平时都看那些博主的博客,我又说了很多,然后面试官又问了Android的学习过程,我借机把话题引到了跨进程通信。
5.然后面试官让我讲讲binder,然后我从传统的Linux通信方式和binder做了比较,说了binder的优点,实现了mmap()函数,还有binder的四部分:binder驱动,client,server,serviceManager。binder的注册和请求过程。
6.面试官又问了Android中跨进程通信的方式。我又回答了很多。面试官很满意。
7.接下来,又问了ClassLoader,我直接带着双亲委派模型,BootstrapClassLoader ,AppClassLoader,ExtClassLoader相关的全说了,还说了内部加载代码的逻辑,后面还说了命名空间,初始类加载器,定义类加载器,线程上下文加载器等等。
8.后来又让我谈谈Java的反射,我其实只用过一点,说了个大概,然后举了注解中用到的反射,和注解的实现。
9,接着问了Activity的启动方式,这个太简单了。
10,最后,面试官说问我最后一个,问我一个集合类的。我当时很激动,想着背的HashMap,ConcurrentHashMap,Hashtable,HashSet。终于可以装B了。
然后。。。。。。。。。。。。。。。
面试官问的ArrayList和LinkedList的区别,然后我就回答了一个用在添加删除多的时候,一个用在查找多的时候。

然后就结束了。差一分钟九点,大概面了40多分钟,当时面完感觉凉了,太紧张了,说得很快,很多想说的都忘了。

一面总结

一面给我的感觉是粗略的问问项目,着重考察Java基础和java高级的一些知识,还有Android的一些知识。还有就是面试没有任何通知,直接突然来电话,你也不知道什么时候会来。

**重点:**前一天马云爸爸刚说完阿里不强制996,然后。。真香。[滑稽]

二面

接着,过了三天,正当我都以为自己要凉了的时候,晚上七点多,和上次一样,突击面试。然后进入正题。

1.面试官问项目中五子棋实现的思路和胜负检测,我说了大概一半,面试官就问下一个问题,这回的面试官感觉明显不像第一回的面试官。第一回的面试官会让你不停的说,直到你说不出来,他再问问题,这回的面试官会让你点到为止,除非他问了特别底层的东西,否则就不会让你展示。
2.然后顺着项目问自定义View的原理,当时比较紧张把Measure和Layout过程讲反了,然后讲了ViewRootImpl的performTraversal。
3.然后又问了项目中的招聘软件,为什么要用rxjava+retrofit,然后我回答了是为了异步之类的。讲了讲retrofit的大概原理(实际我背源码了),没敢讲太多。说了retrofit和REST的配合。
4.然后面试官问说一些rxjava中常用的方法,前几天刚看完Android进阶之光,但是就是就是记不起来了,然后说了变换,定时发送,线程切换。
5.然后面试官问rxjava线程切换的原理,哈哈,我背过,虽然忘了点,但是大概还是说出来了。
6.后来面试官又问我学的专业开过什么和软件相关的课,可能是因为我不是软件计算机专业的。然后我回答了一门计算机软件基础,里面讲一些简单的算法和数据结构,操作系统,二分查找,快速排序什么的(这里埋下伏笔)。
7.然后,面试官又问我操作系统中线程和进程的区别,我说了几句,举了个房子和里面的屋子的例子。
8,面试官问操作系统一个进程给分配多少的空间,我心想,这之前不是问过吗,凉了凉了,然后面试官可能看我说不来,又补充了假设是4G的怎么分配,我突然想到了之前的Linux相关的,就回答了Linux下用户空间3G,内核空间1G。
8.我说完又问了Handler的实现机制,哈哈,这个我也背过。然后就讲了Looper,MessageQueue,Handler,ThreadLocal。
9.后来,面试官结合handler问了一个实际的问题,handler通过postDelay(5s)发送log打印A,然后handler通过sendMessage发送log打印B,线程停止5s,handle通过post
Delay(6s)发送log打印C,问打印的顺序
,当时听的一脸懵逼,还不好意思说不会,然后,我就说可能什么顺序都可能,由于指令重排序(我在瞎扯),面试官说是在一个线程。。。然后我就说不知道。。。。,面试官说结合你刚才说的原理。然后我就说了一个我认为对的顺序。
可能是由于这个问题吧,给面试官一种理论丰富,实践不足的感觉,或者是他之前就安排好的,面试官说第二题晚上七点给我安排一个在线笔试,然后我就被安排了。。。。

二面总结

二面问的基本就是纯项目了,所以,不要给自己挖坑。。。。简历好好写,背框架源码,还有一点,之前面试中不会的问题面试之后要学习,可能面试官会通过这个来判断面试者的学习态度和功利心。

二面的在线笔试

好吧,我也不知道到底该叫二面还是三面,谦虚一点,还是叫二面。我就是死在这了。接下俩说说我是怎么死的。我复习的东西就不说了,直接说题。一共两道。

第一题 二分查找
第二题 一队人报数123 123 123 。。。报到3的人离队,剩下的人继续报数,问最后一个人是原来队伍里的几号

第一题,这就是我之前说的伏笔,我说了二分查找,他就考了二分查找,我复习的快速排序。MMP。然后用的是阿里巴巴伯乐平台,你在线输入什么,面试官那里同步就能看见。然后我就慌了。最后按思路写出来了,但是放在eclipse运行,死循环。。。。。
然后也没改,期间,我写的好好的,突然网页就关了,我再进就进不去了,我当时还心想是不是面试官看我太菜了,直接给我结束了。没几分钟,面试官给我打电话,问我怎么退出来了,我才意识到是我不小心点鼠标版给关了。。。尴尬。。。后来面试官又给开了一个连接,原本两个题50min,后来又给我加了5min。

第二题,面试官之前出完提问我题能不能看懂,我说能,实际上他没给我输入输出。我当时真是太紧张了,后来才发现的,当时问一句好了。
我的思路是建了一个类,保存每个人的名字和编号,把人都加到ArrayList里的(其实应该用LinkedList,失误啊),这样每个人自身就保存了编号,然后用一个计数器记录报数的顺序123123,从List中remove,这个题最难的地方是每一轮不一定报道三结束,可能是到2或者1,那么就下来就得接着报数。
后来写完了,面试官给我打电话,让我解释以下第二个代码,实际我第二个代码写了注释,然后我解释完,面试官问我,有没有别的想法,我当时就知道凉了。当时也不能说没有,然后就说有很多但是就这个最好写。然后就结束了。

笔试总结

Now that I think I wrote a very funny feeling, for Ali, the high volume of concurrent users, with very bean consumes memory, 100 people line up can, if one million individuals, it might die, even with an array of bean than strong. Later, I checked this algorithm seems to Josephus.
Also, the interviewer said, and every word must be careful, do not give yourself digging! ! ! ! !

Full Summary

First of all, two people are very good interviewer.
Then, do not give yourself digging.
Then, brush the question ah! ! ! ! ! ! !

I hope my experience to help write the future to interview people.

Published 10 original articles · won praise 5 · Views 591

Guess you like

Origin blog.csdn.net/LeeDuoZuiShuai/article/details/89441088