Eclidean algorithm is used to find gcd of numbers, which is being used in mathematics extensively but how can we find gcd in programming language? we will learn in this article.
Continue reading Euclidean algorithm to find gcd
In this post liested down all data structure and alogithm tutorials. datastructure and algorithm in short you can say ds algo is an important part for any efficiant programmer.
Continue reading Data Structure and Algorithm Tutorials
Well, when I heard first time about sorting of stack, I thought why we required to sort of any stack. Initially I thought , this is rubbish and time pass thing, but later point of time, realize this can be interview question. In-fact, most of the interviewer ask this question, how to sort stack in java. I tried to demonstrate the exercise of writing program of sorting stack in java.
Continue reading Sorting of Stack in Java
This post is about checking a balancing of Symbol (parenthesis) in a mathematical expression using Stack in Java. Let us consider few expression whether its balance or not. In programming interview this can be asked to check whether you know the Stack basic or not.
Continue reading How to Check Balancing of Symbol using Stack in Java
Stack is ADT type of data structure which has different implementation for different purpose for fulfilling of different contextual requirement. In this article tried to implement how to implement by using fixed size array based implementation. If you want to know something basic about Stack, you can visit What is Stack Data structure.
Continue reading How to Implement Fixed Size Stack in Java
Well, so good so far, it’s time to check the basic of java and basic of algorithm to find number of occurrence of all numbers from int array. There are different way to get this done but this is simple and straight forward. This is one of the interview question which generally can asked in any level of Java interview, specially 1 to 5 years of experience in java.
Continue reading How to count occurrence of int in array in java
Well this my second post to reverse of string. In this post I tried to write how to reverse either string array or int array in java. Although, there are different way do this but I choose in place. you can reverse a string by using library ( prefer library in real life day to day activity in real project). there are different ways: iteration, recursive, in place. This is one of the important interview question which is being asked frequently specially in initial career.
Continue reading How to Reverse Array In Java
There are various way to convert from string to int in java. It depends where you have to applied this. if any interview will ask then you can ask him/her , library can be used or not. if he/she says yes, then reply by using
Integer class to convert but if he wanted to check you logic then you have to chose plain way to convert from string to int. Please ask precondition to Interviewer before replying anything .
Continue reading How to Convert String to int in Java
First of all let us understand what is anagram. if two string having same character in same or different order it means those words are anagram. There are different way to find whether two strings are anagram or not. What are those way , let us explain one by one by using program. This is one of the important question which is being asked by Interview frequently to check the logic.
Continue reading How to Check two String are Anagram or not in Java
There a re different way you can reverse a string by using library, iteration and recursive iteration. This is one of the important interview question which is being asked frequently specially in initial career. The answer is simple but if you reply one way perhaps iteration way, you are being asked to reply in another way perhaps recursive approach. There are so many string based question can be asked .
Continue reading How to Reverse String in Java