LinkedList Implementation In detail.

LinkedList--> LinkedList is a part of the Collection Framework present in java.util package. This class is an implementation of the LinkedList data structure which is a linear data data structure where the elements are not stored in contiguous location and every element is a separate object with a data part and address part. The elements are linked using pointers and addresses. Each element is known as a node.

SOME IMPORTANT POINTS

  • Java LinkedList class can contain duplicate elements.
  • Java LinkedList class maintains insertion order.
  • Java LinkedList class is non synchronized.
  • In Java LinkedList class, manipulation is fast because no shifting needs to occur.
  • Java LinkedList class can be used as a list, stack or queue.

SOME IMPORTANT METHODS OF LINKEDLIST

1. addFirst()

2. addLast()

3. add(data,index)

4. Delete(index)

5. search(data)

6. print()

Page 1
Page 2
Page 3


要查看或添加评论,请登录

Nilu Kumari的更多文章

  • Data Structure #01

    Data Structure #01

    Given an integer array nums, return true if any value appears at least twice in the array, and return false if every…

  • Binary Tree:-

    Binary Tree:-

    Binary:- A binary tree is a recursive data structure where each node can have two children at most. A common type of…

  • Comparable & Comparator in Java

    Comparable & Comparator in Java

    Comparable & Comparator both are interfaces and can be used to sort collection elements. Comparable provides a single…

  • Queue Implementation Using LinkedList

    Queue Implementation Using LinkedList

    Queue:- A queue is defined as a linear data structure that is open at both ends and the operations are performed in…

  • Wrapper Classes

    Wrapper Classes

    Wrapper classes provides the mechanism to convert primitive into object and object into primitive. There are two way to…

  • Doubly Linked List

    Doubly Linked List

    Doubly Linked List:- A doubly linked list is a special type of linked list in which each node contains a pointer to the…

  • Composition in Java

    Composition in Java

    Composition:-composition represents a stronger relationship where one class is composed of one or more other classes…

  • Aggregation in Java

    Aggregation in Java

    Association:- Association is to show the relationship between two or more class. It shows Has-a-relationship.

  • JDBC

    JDBC

    /* * JDBC: Java Database Connectivity * In real word we are seeing that some login page or register page * when a user…

  • Stack Implementation Using LinkedList

    Stack Implementation Using LinkedList

    public class Stack { static class Node{ int data; Node next; Node(int data){ this.data=data; this.

社区洞察

其他会员也浏览了