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: 
Your approach is too complicated. You don't need to examine every array element. The first value is `4`, so `7` is *at least* `7-4` elements away, and you can skip those.

```
#include <stdio.h>
#include <stdlib.h>

int main (void)
{
    int array[] = {4,5,6,5,4,3,2,3,4,5,6,7,8};
    int len = sizeof array / sizeof array[0];
    int i = 0;
    int steps = 0;
    while (i < len && array[i] != 7) {
        i += abs(7 - array[i]);
        steps++;
    }

    printf("Steps %d, index %d\n", steps, i);
    return 0;
}

```

Program output:

```
Steps 4, index 11

```

Edit: improved after comments from @Martin Zabel.
```

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