EduLearn - Online Education Platform

Welcome to EduLearn!

Start learning today with our wide range of courses taught by industry experts. Gain new skills, advance your career, or explore new interests.

Browse Courses

Java linked list simple program for practice

create a linkedlist and add 5 integer elements to that.calculate and print the sum of odd elements of the list   1 2 3 4 5   class Main { public static void main(String[] args) { LinkedList<Integer> list = new LinkedList<>(); for(int i = 1; i<=5; i++){ list.add(i);//1 2 3 4 5 } int sum […]

Java string datastructure in Linked list

import java.util.*;   class Maindsa { public static void main(String args[]) { LinkedList<String> list=new LinkedList<>();   //Add the elements to the list   list.add(“apple”); //add elements to the list list.addFirst(“banana”); //add node to the front list.addLast(“cherry”); //add node at the end   System.out.println(“Adding elements=” +list);   list.remove();//removes the first element(banana) System.out.println(“After remove method=” +list);   […]

java data structures node insertion simple program

Insert the node at middle(value,position)   public void insertAtposition(int pos, int val)//pos=2, val=52 { Node newNode=new Node(val);   Node temp=head;   for(int i=1; i<pos; i++)i=2;2<2 { temp =temp.next; } newNode.next=temp.next; temp.next=newNode; }

Linked list in java data structures

  import java.io.*; import java.util.*;   class Node { int data; Node next;   Node(int d)//50 { data=d;//data=50 next=null; } } class LinkedList { public static void main(String args[]) { Node head=null;   Scanner s=new Scanner(System.in);   Node current=null;   for(int i=1;i<=5;i++)i=5<=5 { System.out.println(“Enter the elements=”);//50 int a=s.nextInt();//a=50   Node n=new Node(a);//create a node inside […]

Linear-Stack ADT                          

Stack ADT – Evaluating arithmetic expressions- other applications- Queue ADT – circular queue implementation – Double ended Queues – applications of queues STACK STACK ADT: TOP pointer It will always point to the last element inserted in the stack. For empty stack, top will be pointing to -1. (TOP = -1) Operations on Stack (Stack […]

EduLearn - Online Education Platform

Welcome to EduLearn!

Start learning today with our wide range of courses taught by industry experts. Gain new skills, advance your career, or explore new interests.

Browse Courses

Popular Courses

[Course Image]

Introduction to Programming

Learn the fundamentals of programming with Python in this beginner-friendly course.

12 Hours Beginner
[Course Image]

Data Science Essentials

Master the basics of data analysis, visualization, and machine learning.

20 Hours Intermediate
[Course Image]

Web Development Bootcamp

Build modern websites with HTML, CSS, JavaScript and popular frameworks.

30 Hours Beginner
[Course Image]

Digital Marketing Fundamentals

Learn SEO, social media marketing, email campaigns and analytics.

15 Hours Beginner
Educational Website Footer