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 data structures in binaru tree

Binary Tree: –>Binary tree is a hierarchical data structure where each node has at most 2 children left child and right child   Tree Terminology:   Node: An element in the tree. It contains data and links   Root: The topmost node in the tree(No parent)   Parent: A Node that has children   Child: […]

Java important practice programs

  TCS Codings – 2 def find_equilibrium_index(arr):     total_sum = sum(arr)     left_sum = 0       for i in range(len(arr)):         # right_sum = total_sum – left_sum – arr[i]         if left_sum == (total_sum – left_sum – arr[i]):             return […]

Java counting number program in queue

Count the number of vowels in the given string by using queue   import java.util.*; class Count { public static void main(String args[]) { String input=”queue”;//4   Queue<Character> q=new LinkedList<>();   int count=0;   for(char ch:input.toCharArray())//e { q.add(ch);//e }   while(!q.isEmpty())//true { char ch=q.remove(); if(“aeiouAEIOU”.indexOf(ch)!=-1)//indexof returns -1 if value is not found { count++; } […]

Java palindrome program in java

//Checking the string is palindrome or not by using stack and queue   class Palindrome { public static void main(String args[]) { String str=”madam”;   Queue<Charcter> q=new LinkedList<>();   Stack<Character> s=new Stack();   for(char ch:str.toCharArray())//ch=m { q.add(ch);//m s.push(ch);//m }   boolean isPalindrome=true;     while(!q.isEmpty())//false { if(q.remove()!=s.pop()) { isPalindrome=false; break; } } if(isPalindrome)//true System.out.println(str +”is […]

Java data structures in reversing element

//reverse a elements of queue by using stack import java.util.*;   class ReverseQueue { public static void main(String args[]) { Queue<Integer> q=new LinkedList<>(); q.add(1); q.add(2); q.add(3);   Stack<Integer> s=new Stack<>(); while(!q.isEmpty()) { s.push(q.remove()); }   while(!s.isEmpty()) { q.add(s.pop()); } System.out.println(“Reverse queue=” +q); } }   output: Reverse queue=[3, 2, 1]

Queue in java data structures

import java.util.*;   class QueueExample { public static void main(String args[]) { //Queue<String> q=new Queue<>();//queue is not a class   Queue<Integer> q=new LinkedList<>();//dynamic binding   q.add(10); q.add(20); q.add(30);           int removed=q.remove(); System.out.println(“removed element is=” +removed);   System.out.println(“Queue elements are=” +q); }}

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);   […]

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