Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Search Element In Array-Recursive
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { int []arr={1,2,3,4,5,6,7}; Console.WriteLine(Search(arr,0,7)); } public static int Search(int []arr, int index, int element) { if(index==arr.Length) { return -1; } else { if(arr[index]==element) { return 1; } else return Search(arr, index+1, element); } } } }
run
|
edit
|
history
|
help
0
filter distinct items from the array without builtin function - Seeni
Class Objects
IEnumeratorExample
First Class
Intuit // C# // listing_4.7 (case // calculator)
smallestof3
unix practice - santhosh
linq jean by Fausto
code1
Table of 3 and 5 using threads