Write a program to find common elements in two sorted array. In this program you have to find the intersection of two arrays.
Let’s say you have given two sorted arrays arr1 and arr2.
So the common elements in these two arrays is 4 and 6.
The concept of Stack and Queue is very important in computer science. In previous post i already discussed stack and queue implementation. The purpose of this objective questions is to test how well you understand the concept of stack and queue.
Write a program to check whether the entered number is palindrome or not. How to solve this problem.
Vi and Vim is very powerful editor in Linux operating system. I already discussed vi, vim commands in my previous tutorial.
How to reverse number is PHP. This question is asked by one of our forum user recently. Suppose someone enter 764 how do i reverse this number.
Write a program to find index of an element in a sorted array. How do you solve this problem. There are multiple approaches to solve this problem. But try to solve this problem in minimum time complexity.
In this article i’ll cover basic Linux commands with examples which is helpful for both beginners and experienced professionals.
Linux Commands with Examples
Write a Program to find second largest element in an unsorted array. You can solve this problem by using sorting algorithm or you can do without sorting in single traversal O(n) time complexity.
Sorting algorithm such as Selection Sort, Insertion Sort, Bubble Sort is not suitable for large data elements as their time complexity is O(n2) . For sorting you can use Merge Sort or Quick Sort.
Write an efficient program to generate Prime numbers between 1 to n. Or How to print prime number from 1 to n. It is one of the most asked interview questions.
In this post, I will discuss most efficient algorithm to generate Prime Numbers. Before this let’s understand what is prime number.