## Find the Second Largest Number in an Array

Write a program to find the second largest number in an array. Given an unsorted array, we have to write a code to find the second largest number in an array. Also, we need to focus on time complexity. As the time complexity of an algorithm is very important in terms of an interview.

For example – Let’s take an array.

Input – arr[] = { 4, 1, 5, 2, 8, 0, 3, 55}

Output – 8

The second largest element in this array is 8.  Think for a moment, how do you find the second largest number in an array?  There are multiple ways to solve this problem. Which approach you prefer and why?

In this tutorial, we cover following things –

• How to find the second largest number in an array using sorting.
• C program to find the second largest number in an array.
• C++ program to find the second largest number in an array.
• PHP code to find the second largest number in an array.
• Java code to find the second largest number in an array.

## PHP Code – Find First Non-Repeated Character in a String

Given an input string, Write a PHP code to find the first Non-repeated character in a string. Suppose an input string is webrewrite, the first non-repeated character in this string is b.

## Top Five Websites to Learn Programming Online

Top Five Websites to Learn Programming Online. There is no age for learning and when it comes to learn programming. The online resources are best since you get to know the latest stuff and tricks. Another important reason why you would like learning programming online is that you won’t need any teacher as such and you will in turn save money. So basically which websites are best to learn programming online? We assimilated the 5 best websites from which you can easily learn programming/coding and achieve your purpose.

## Multiply Two Numbers without using * (Multiplication Operator)

Write a C program to multiply two numbers without using * multiplication operator.

Given two numbers, both numbers are positive.  Write a program to multiply two numbers without using * multiplication operator.  Think for a moment how to solve this problem .

You can use multiple approaches to find the solution of a problem.

C Program to Multiply Two Numbers without using *

## C Program to Reverse a Linked List using Recursion

Write a c program to reverse a linked list using recursion. Given a singly linked list, we have to write a code to reverse a linked list using recursion. This question is very important in terms of interviews.

In my previous post, I have explained C program to reverse a singly linked list. In this post, We are going to write a code to reverse a linked list using recursion.  If you are not familiar with the concept of recursion then check my previous tutorial on recursion vs iteration.

The time complexity to reverse a linked list using recursion is O(n).

## Find Missing number in Array – Programming Problem

How to find missing number in array of 1 to n. This question is generally asked in technical interviews. The problem statement is something like that. Given an array of numbers from 1 to 100. The array is sorted. One number is missing from an array. You have to find the missing number from an array. Also there is no duplicates in an array.

## Swap Two Numbers using Call by Reference in C

How to swap two numbers using call by reference in C , C++. In the interviews interviewer generally asked the difference between call by reference and call by value. In this post let’s understand what is call by reference and how to swap two numbers using call by reference method.

## MCQ on Recursion

Recursion is the most important concept in computer science. In my previous posts, i have written about binary search implementation using recursion and difference between recursion and iteration.

These MCQ helps you to understand the concept of Recursion.

1) Which Data Structure is used to perform Recursion?

a) Queue
b) Stack