刚做完Splunk的OA。估计是我目前做过的最简单的OA了。和狗家的OA用的是一个平台。在网上直接写code的。一共2道题。共耗时40分钟。基本不需要准备,可以直接打开开始做。每道题估计不需要超过10line的code。有些怀疑这么水的OA是否会给interview。题如下:1. A non-empty array A consisting of N integers is given.
Array A represents a linked list. A list is constructed from this array as follows:
the first node(the head) is located at index 0;
the value of a node is -1 then it is the last node of the list;
if the value of a node is -1 then it is the last node of the list;
otherwise, the successor of a node located at index k is located at index A[K](you can assume that A[k] is a valid index, that is 1<=A[k]<N).
<