@@ -0,0 +1,1297 @@
+package algorithms.sorting;%0D%0A%0D%0Aimport java.util.Scanner;%0D%0A%0D%0A/*%0D%0A * Sample Challenge%0D%0A * This is a simple challenge to get things started. Given a sorted array (ar)%0D%0A * and a number (V), can you print the index location of V in the array?%0D%0A * %0D%0A * Input Format:%0D%0A * There will be three lines of input:%0D%0A * %0D%0A * V - the value that has to be searched.%0D%0A * n - the size of the array.%0D%0A * ar - n numbers that make up the array.%0D%0A * %0D%0A * Output Format:%0D%0A * Output the index of V in the array.%0D%0A * %0D%0A * Constraints:%0D%0A * 1 %3C= n %3C= 1000%0D%0A * -1000 %3C= V %3C= 1000, V is an element of ar%0D%0A * It is guaranteed that V will occur in ar exactly once.%0D%0A * %0D%0A * Sample Input:%0D%0A * 4%0D%0A * 6%0D%0A * 1 4 5 7 9 12%0D%0A * %0D%0A * Sample Output:%0D%0A * 1%0D%0A */%0D%0Apublic class FindIndexIntro %7B%0D%0A%0D%0A    public static void main(String%5B%5D args) %7B%0D%0A        Scanner sc = new Scanner(System.in);%0D%0A        %0D%0A        int target = sc.nextInt();%0D%0A        int arraySize = sc.nextInt();%0D%0A        %0D%0A        int targetIndex = -1;%0D%0A        int arrayIndex = 0;%0D%0A        %0D%0A        while (arrayIndex %3C arraySize) %7B%0D%0A            if (target == sc.nextInt()) %7B%0D%0A                targetIndex = arrayIndex;%0D%0A                break;%0D%0A            %7D%0D%0A            arrayIndex++;%0D%0A        %7D%0D%0A        sc.close();%0D%0A        %0D%0A        System.out.println(targetIndex);%0D%0A    %7D%0D%0A%7D

Add FindIndexIntro