diff --git a/algorithms/C/README.md b/algorithms/C/README.md index 9e241b51..50a7eb55 100644 --- a/algorithms/C/README.md +++ b/algorithms/C/README.md @@ -7,6 +7,7 @@ - [Reverse an array](arrays/reverse-array.c) - [Maximum difference](arrays/maximum-difference.c) - [Largest Element](arrays/largestElement.c) +- [Second Largest Element](arrays/secondLargestElement.c) - [Sieve of Eratosthenes](arrays/sieve-of-eratosthenes.c) ## Bit Manipulation diff --git a/algorithms/C/arrays/secondLargestElement.c b/algorithms/C/arrays/secondLargestElement.c index 04263d26..34b81d12 100644 --- a/algorithms/C/arrays/secondLargestElement.c +++ b/algorithms/C/arrays/secondLargestElement.c @@ -28,3 +28,11 @@ int main() second(arr,size); return 0; } + +/* +----------------Sample Output---------------- +> 88 45 + +Time Compexity: O(n) +Space compexity: O(1) +*/