Question: I'm working on an iOS app, that should work fine with both iphones and ipads.
As I know we can build the app as universal or convert iphone storyboard into ipad storyboard.What I want to know is, what is the best way from these and, when we launch app to app store, is it a problem to have two storyboards one for iphone and another for ipad.

Answer: 
The approach presented by John Coleman is what the interviewer was hoping for, in all probability.  

If you are willing to go quite a bit more complicated, you can increase expected skip length:  

Call the target value *k*. Start with the first element's value *v* at position *p* and call the difference k-v *dv* with absolute value *av*. To speed negative searches, have a peek at the last element as the other value *u* at position *o*: if dv×du is negative, k is present (if any occurrence of k is acceptable, you may narrow down the index range here the way binary search does). If av+au is greater than the length of the array, k is absent. (If dv×du is zero, v or u equals k.)  

Omitting index validity: Probe the ("next") position where the sequence might return to v with k in the middle: `o = p + 2*av`.  

If dv×du is negative, find k (recursively?) from p+av to o-au;  

if it is zero, u equals k at o.  

If du equals dv and the value in the middle isn't k, or au exceeds av,  

or you *fail* to find k from p+av to o-au,  

let `p=o; dv=du; av=au;` and keep probing.  

(For a full flash-back to '60ies texts, view with Courier. My "1st 2nd thought" was to use `o = p + 2*av - 1`, which precludes *du equals dv*.)
```

const findMeAnElementsFunkyArray = (arr, ele, i) => {
  const elementAtCurrentIndex = arr[i];

  const differenceBetweenEleAndEleAtIndex = Math.abs(
    ele - elementAtCurrentIndex
  );

  const hop = i + differenceBetweenEleAndEleAtIndex;

  if (i >= arr.length) {
    return;
  }
  if (arr[i] === ele) {
    return i;
  }

  const result = findMeAnElementsFunkyArray(arr, ele, hop);

  return result;
};

const array = [4,5,6,5,4,3,2,3,4,5,6,7,8];

const answer = findMeAnElementsFunkyArray(array, 7, 0);

console.log(answer);

```

Wanted to include a recursive solution to the problem. Enjoy