• 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-6783227e048ae878027308/] 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 […]

  • 16 September

    Check if a binary tree is binary search tree or not in java

    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 check if given binary tree is binary search tree or not. This is one of important interview questions on binary tree. We will see two approaches to check if […]

  • 16 September

    Stack implementation in java

    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 implement Stack using Array in java. Introduction Stack is abstract data type which demonstrates Last in first out (LIFO) behavior. We will implement same behavior using Array. Although java […]

  • 15 September

    Check for balanced parentheses in an expression in java

    If you want to practice data structure and algorithm programs, you can go through Java coding interview questions. In this post, we will see how to check for balanced parentheses in an expression. Lets say, you have expression as a*(b+c)-(d*e) If you notice, above expression have balanced parentheses. Lets take another expression as (a*(b-c)*(d+e) If you observe, […]

  • 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-6783227e051e7874750800/] So Longest common prefix in above String array will be “java” […]

  • 14 September

    Spring Rest + Spring Security example

    In this post , we are going to apply Spring Security on Spring Rest example. Web services tutorial: Introduction to web services Web services interview questions SOAP web service introduction RESTful web service introduction Difference between SOAP and REST web services SOAP web service example in java using eclipse JAX-WS web service eclipse tutorial JAX-WS […]