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: 
A variation of the conventional linear search could be a good way to go. Let us pick an element say `array[i] = 2`. Now, `array[i + 1]` will either be 1 or 3 (odd), `array[i + 2]` will be (positive integers only) 2 or 4 (even number). 

On continuing like this, a pattern is observable - `array[i + 2*n]` will hold even numbers and so all these indices can be ignored.

Also, we can see that

```
array[i + 3] = 1 or 3 or 5
array[i + 5] = 1 or 3 or 5 or 7

```

so, index `i + 5` should be checked next and a while loop can be used to determine the next index to check, depending on the value found at index `i + 5`.

While, this has complexity `O(n)` (linear time in terms of asymptotic complexity), it is better than a normal linear search in practical terms as all the indices are not visited.

Obviously, all this will be reversed if `array[i]` (our starting point) was odd.
```

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