Java2Blog
  • Home
  • Core Java
  • Tutorials
    • Spring
    • Spring Boot
    • Spring MVC
    • Java 8
    • Hibernate
  • Categories
    • Interview Questions
    • Spring Frameworks
    • Core java
    • Python
    • C++
  • NM
close
import_contacts

Java Tutorials

  • Core Java
  • Java Interview questions
  • Java 8 Stream
  • Java interview programs
import_contacts

Data structure and algorithm

  • Data structure in java
  • Data structure interview questions
import_contacts

Spring tutorials

  • Spring tutorial
  • Spring boot tutorial
  • Spring MVC tutorial
  • Spring interview questions

Interview

  • Algorithm Interview java programs String
    10 May

    How to check if two Strings are Anagrams in Java

    In this post, we will see how to check if two Strings are Anagrams in java. Anagrams mean if two Strings have the same characters but in a different order. For example: Angel and Angle are anagrams There are many ways to check if Strings are anagrams in java. Some of them are: Using String […]

    Read More
  • Algorithm Interview Character java programs String
    08 May

    Java Program to find duplicate Characters in a String

    In this post, we will see how to find duplicate Characters in a String. Approach: Create a HashMap and character of String will be inserted as key and its count as value. If Hashamap already contains char,increase its count by 1, else put char in HashMap If value of Char is more than 1, that means it […]

    Read More
  • Core Java interview Immutable String
    07 May

    Why String is immutable in java

    String class is immutable in java. If you take dictionary meaning of immutable, it means unable to be changed or unchanging over time, so String is unchangeable or unmodifiable in java. Let’s understand with example. [crayon-6833a37bcfad5621961424/] As you can see, value of str1 did not change. It created another String object with value “Hellojava2blog” but […]

    Read More
  • Core Java interview Java Collections
    29 April

    HashMap in java

    HashMap is hash table based implementation of Map interface. It stores entry in key-value pairs. It maps keys to values. It is one of the most used Collection. Java HashMap HashMap implements Map an interface that maps a key to value. It is not synchronized and is not thread-safe. Duplicate keys are not allowed One […]

    Read More
  • Core Java interview Java Collections
    29 April

    TreeMap in java with examples

    TreeMap class implements Map similar to HashMap. Some important points about TreeMap: TreeMap implements Map interface and extends HashMap class. TreeMap is implemented using Red black tree based NavigableMap. TreeMap is ordered collection and store its elements in natural ordering of keys. Key which you would like to put in TreeMap must implement Comaparable interface or you can […]

    Read More
  • Algorithm Interview Binary Search Tree
    15 April

    Binary search tree in java

    If you want to practice data structure and algorithm programs, you can go through 100+ java coding interview questions. Binary search tree is a special type of binary tree which have following properties. Nodes which are smaller than root will be in left subtree. Nodes which are greater than root will be right subtree. It should […]

    Read More
  • Algorithm Interview Binary Search Tree
    15 April

    Find minimum and maximum elements in binary search tree 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 find minimum and maximum elements in binary search tree. Finding minimum element: Minimum element is nothing but leftmost node in binary search tree, so traverse left until you get […]

    Read More
  • Algorithm Interview Binary Search Tree
    14 April

    Lowest Common Ancestor (LCA) of binary search tree 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 find lowest common ancestor(LCA) of two nodes in binary search tree. We have already seen how to find LCA in binary tree. It is much simple than that. Lets […]

    Read More
  • Algorithm Interview Binary Tree
    14 April

    Lowest Common Ancestor (LCA) of binary tree 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 find lowest common ancestor(LCA) of two nodes in binary tree. Lets understand with example. As you can see here, LCA is nothing but lowest common parent of two nodes. […]

    Read More
  • keyboard_arrow_left Previous
  • 1
  • …
  • 15
  • 16
  • 17
  • 18
  • 19
  • …
  • 23
  • Nextkeyboard_arrow_right

Newsletter


Let’s be Friends

  • Facebook
  • Twitter
  • LinkedIn

© 2020-22 Java2Blog Privacy Policy