Created
December 30, 2016 02:44
-
-
Save dzsquared/02ff8c0742630e1ef630b526815710f1 to your computer and use it in GitHub Desktop.
intro to sorting created by dzsquared - https://repl.it/Ex6a/0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
class Solution { | |
static void Main(String[] args) { | |
/* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution */ | |
int findMe = Convert.ToInt32(Console.ReadLine()); | |
int arraySize = Convert.ToInt32(Console.ReadLine()); | |
int foundHere = 0; | |
string[] findHere = Console.ReadLine().Split(' '); | |
for(int i = 0; i < arraySize; i++) { | |
if(Convert.ToInt32(findHere[i]) == findMe) { | |
foundHere = i; | |
} | |
} | |
Console.WriteLine(foundHere); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment