• 29 September

    find transpose of a matrix in java

    If you want to practice data structure and algorithm programs, you can go through data structure and algorithm interview questions. In this post, we will see how to find transpose of matrix in java. Transpose of matrix? A matrix which is created by converting all the rows of a given matrix into columns and vice-versa. Below […]

  • 28 September

    Minimum Number of Platforms Required for A Railway Station

    If you want to practice data structure and algorithm programs, you can go through data structure and algorithm interview questions. 1. Introduction to Problem You are given arrival and departure time of trains reaching to a particular station. You need to find minimum number of platforms required to accommodate the trains at any point of time. […]

  • 26 September

    Find the number occurring odd number of times in an array

    If you want to practice data structure and algorithm programs, you can go through data structure and algorithm interview questions. In this post, we will see how to find number occurring odd number of times in the array. Problem: You are given a array of integer. All numbers occur even number of times except one. You […]

  • 24 September

    Java Program to Find Second Largest Number in An Array

    If you want to practice data structure and algorithm programs, you can go through data structure and algorithm interview questions. 1. Overview In this post, we will see how to find the second largest number in an array. This is a one of common interview questions on array data structure. 2. Introduction to Problem Statement Given […]

  • 23 September

    Sort a Stack using another stack

    If you want to practice data structure and algorithm programs, you can go through 100+ java coding interview questions. In this post,  we will see how to sort a stack using another stack. Problem Given a Stack,  you need to sort it with the help of temporary stack. Solution : Let’s say,  you have two stacks, […]

  • 20 September

    Find length of Linked List in java

    If you want to practice data structure and algorithm programs, you can go through data structure and algorithm programs. In this post, we will see how to find length of Linked List in java. You can obviously use size() method of java Linked List class but here we are going to see how to find length […]

  • 20 September

    Implement singly linked list in java

    In this post, we will see how to implement singly linked list in java. It is one of the most used data structure. In singly linked list, Node has data and pointer to next node. It does not have pointer to the previous node. Last node ‘s next points to null, so you can iterate […]

  • 18 September

    Search an Element in A Sorted and Rotated Array in Java

    If you want to practice data structure and algorithm programs, you can go through data structure and algorithm interview questions. 1. Overview In this post, we will see how to search an element in sorted and rotated array. 2. Introduction to Problem Statement We are given an sorted and rotated array as below: [crayon-65f90734e0925259155853/] Our goal […]

  • 16 September

    Java Program to Find Missing Number in An Array

    If you want to practice data structure and algorithm programs, you can go through data structure and algorithm interview questions. 1. Overview In this article, we will see how to find missing number in Array of 1 to n. This is one of basic coding interview question asked in my interviews. 2. Introduction to Problem Statement […]