• 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-662291cf02f11356207066/] 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 […]

  • 15 September

    Longest Common Prefix in an array of Strings 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 are going to see longest common prefix in array of Strings. So lets say you have string array as below: [crayon-662291cf04289009768013/] So Longest common prefix in above String array will be “java” […]

  • 08 July

    Binary search 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 perform binary search in java using divide and conquer method.When you want to find a value in sorted array, we use binary search and we will also see […]