Write a program to check whether two strings are anagrams of each other.
What is an Anagram ?
Two strings are said to be anagrams of each other if it contains the same characters, only the order of characters in both the strings is different. In other words, both strings must contain the same exact letters in the same exact frequency.
Write an efficient program to generate prime numbers between 1 to N (Where N is 10, 100, 1000 etc). This question can also be asked like this, Generate prime numbers between 1 to 100 or 1 to 10 etc.
Suppose the value of N is 10, So the prime numbers between 1 to 10 is 2, 3, 5, 7. Now let’s learn the most efficient algorithm (Sieve of Eratosthenes) to generate Prime Numbers between 1 to N. Before solving this program, let’s understand what is a prime number.
Write a MySql query to find second highest salary. This question is mostly asked in interviews and it’s also a bit tricky. In this tutorial, You are going to learn three easiest ways to write a MySql query to find second highest salary.
Write a program to print triangle pattern of numbers and stars (*). In this program i’ll show how to create triangle pattern of numbers , stars (*) . These type of questions are very important in terms of interviews as well.
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?
c) Linked List
Find Pair of Elements in Array whose Sum is Equal to given number. This is another very tricky/good question generally asked in technical interview. Given array might be sorted or unsorted it depends on the interviewer.
Write a program to count number of words in a string without using any function. This type of question generally asked by the interviewer to check the logic of a candidate.
MySql is one of the most used open-source database. In this article, i try to cover some of the most asked mysql interview questions.
Program to swap two numbers without temp or third variable are very important in terms of interview. In swapping we exchange the position of two numbers. There are multiple ways in which you can swap two numbers . Some of them are
Write a Program to Swap two numbers using third variable.
Swap two numbers using Bitwise XOR Operator