SlideShare a Scribd company logo
1 of 2
Download to read offline
{public int idata;//data item (key) public double ddata;//data item publis link next;//next link in
list public link int id double dd)//constructor} idata = id; ddata=dd;} public void display link
()//display ourself {system out. Print ("{" + idata + ", " + ddata + "}");}}//end class link
class linklist {private link first;//ref to first link on list public link list ()//constructor {first =
null;//no links on lists yet public void insertfirst (int id, double dd)//make new link link new link
= new link (id, dd); newlink.next = first;//it points to old first link first = newlink;//now first
points to this} public link find (int key)//find link with given key {link current = first;
while(current.idata ! = key)}//(assumes non-empty list){//starts at first'//while no match, if
(current.next == null)//if end of list return null; else}'//didnt find it//not end list//not end of list,
//go to next link//found it return current;}
Solution
public class Link {
public int iData;
public double dData;
public Link next;
/**
* @param iData
* @param dData
*/
public Link(int iData, double dData) {
this.iData = iData;
this.dData = dData;
}
public void displayLink() {
System.out.println("{" + iData + ", " + dData + "} ");
}
}
public class LinkList {
private Link first;
public LinkList() {
// TODO Auto-generated constructor stub
first = null;
}
public void insertFirst(int id, double dd) {
Link newLink = new Link(id, dd);
}
public Link find(int key) {
Link current = first;
while (current.iData != key) {
if (current.next == null)
return null;
else
current = current.next;
}
return current;
}
}

More Related Content

Similar to {public int idata;data item (key) public double ddata;data item p.pdf

C program to insert a node in doubly linked list
C program to insert a node in doubly linked listC program to insert a node in doubly linked list
C program to insert a node in doubly linked listSourav Gayen
 
practice of using and manipulating a doubly linked list and (2) prac.pdf
practice of using and manipulating a doubly linked list and (2) prac.pdfpractice of using and manipulating a doubly linked list and (2) prac.pdf
practice of using and manipulating a doubly linked list and (2) prac.pdfrd1742
 
Problem- Describe an algorithm for concatenating two singly linked lis.pdf
Problem- Describe an algorithm for concatenating two singly linked lis.pdfProblem- Describe an algorithm for concatenating two singly linked lis.pdf
Problem- Describe an algorithm for concatenating two singly linked lis.pdfJamesPXNNewmanp
 
Here is the editable codeSolutionimport java.util.NoSuchEleme.pdf
Here is the editable codeSolutionimport java.util.NoSuchEleme.pdfHere is the editable codeSolutionimport java.util.NoSuchEleme.pdf
Here is the editable codeSolutionimport java.util.NoSuchEleme.pdfarrowmobile
 
Write a program to implement below operations with both singly and d.pdf
Write a program to implement below operations with both singly and d.pdfWrite a program to implement below operations with both singly and d.pdf
Write a program to implement below operations with both singly and d.pdfthangarajarivukadal
 
Hi,I have added the methods and main class as per your requirement.pdf
Hi,I have added the methods and main class as per your requirement.pdfHi,I have added the methods and main class as per your requirement.pdf
Hi,I have added the methods and main class as per your requirement.pdfannaelctronics
 
Solutionclass IntNode { int data; public IntNode next,head;.pdf
Solutionclass IntNode { int data; public IntNode next,head;.pdfSolutionclass IntNode { int data; public IntNode next,head;.pdf
Solutionclass IntNode { int data; public IntNode next,head;.pdfrakeshankur
 
Tree Traversals A tree traversal is the process of visiting.pdf
Tree Traversals A tree traversal is the process of visiting.pdfTree Traversals A tree traversal is the process of visiting.pdf
Tree Traversals A tree traversal is the process of visiting.pdfajayadinathcomputers
 
Lecture 18Dynamic Data Structures and Generics (II).docx
Lecture 18Dynamic Data Structures and Generics (II).docxLecture 18Dynamic Data Structures and Generics (II).docx
Lecture 18Dynamic Data Structures and Generics (II).docxSHIVA101531
 
public class MyLinkedListltE extends ComparableltEgtg.pdf
public class MyLinkedListltE extends ComparableltEgtg.pdfpublic class MyLinkedListltE extends ComparableltEgtg.pdf
public class MyLinkedListltE extends ComparableltEgtg.pdfaccostinternational
 
Program to insert in a sorted list #includestdio.h#include.pdf
 Program to insert in a sorted list #includestdio.h#include.pdf Program to insert in a sorted list #includestdio.h#include.pdf
Program to insert in a sorted list #includestdio.h#include.pdfsudhirchourasia86
 
could you implement this function please, im having issues with it..pdf
could you implement this function please, im having issues with it..pdfcould you implement this function please, im having issues with it..pdf
could you implement this function please, im having issues with it..pdfferoz544
 
How do I fix it in javaLinkedList.java Defines a doubl.pdf
How do I fix it in javaLinkedList.java Defines a doubl.pdfHow do I fix it in javaLinkedList.java Defines a doubl.pdf
How do I fix it in javaLinkedList.java Defines a doubl.pdffmac5
 
This assignment and the next (#5) involve design and development of a.pdf
This assignment and the next (#5) involve design and development of a.pdfThis assignment and the next (#5) involve design and development of a.pdf
This assignment and the next (#5) involve design and development of a.pdfEricvtJFraserr
 
How do I fix it in LinkedList.javaLinkedList.java Define.pdf
How do I fix it in LinkedList.javaLinkedList.java Define.pdfHow do I fix it in LinkedList.javaLinkedList.java Define.pdf
How do I fix it in LinkedList.javaLinkedList.java Define.pdfmail931892
 
I cant find the error in which my double linked list wont display .pdf
I cant find the error in which my double linked list wont display .pdfI cant find the error in which my double linked list wont display .pdf
I cant find the error in which my double linked list wont display .pdfallystraders
 
Given below is the completed implementation of MyLinkedList class. O.pdf
Given below is the completed implementation of MyLinkedList class. O.pdfGiven below is the completed implementation of MyLinkedList class. O.pdf
Given below is the completed implementation of MyLinkedList class. O.pdfinfo430661
 
Circular linked list
Circular linked listCircular linked list
Circular linked listmaamir farooq
 
package com.java2novice.ds.linkedlist;import java.util.NoSuchEleme.pdf
package com.java2novice.ds.linkedlist;import java.util.NoSuchEleme.pdfpackage com.java2novice.ds.linkedlist;import java.util.NoSuchEleme.pdf
package com.java2novice.ds.linkedlist;import java.util.NoSuchEleme.pdfaptind
 

Similar to {public int idata;data item (key) public double ddata;data item p.pdf (20)

C program to insert a node in doubly linked list
C program to insert a node in doubly linked listC program to insert a node in doubly linked list
C program to insert a node in doubly linked list
 
practice of using and manipulating a doubly linked list and (2) prac.pdf
practice of using and manipulating a doubly linked list and (2) prac.pdfpractice of using and manipulating a doubly linked list and (2) prac.pdf
practice of using and manipulating a doubly linked list and (2) prac.pdf
 
Problem- Describe an algorithm for concatenating two singly linked lis.pdf
Problem- Describe an algorithm for concatenating two singly linked lis.pdfProblem- Describe an algorithm for concatenating two singly linked lis.pdf
Problem- Describe an algorithm for concatenating two singly linked lis.pdf
 
Here is the editable codeSolutionimport java.util.NoSuchEleme.pdf
Here is the editable codeSolutionimport java.util.NoSuchEleme.pdfHere is the editable codeSolutionimport java.util.NoSuchEleme.pdf
Here is the editable codeSolutionimport java.util.NoSuchEleme.pdf
 
Linked List
Linked ListLinked List
Linked List
 
Write a program to implement below operations with both singly and d.pdf
Write a program to implement below operations with both singly and d.pdfWrite a program to implement below operations with both singly and d.pdf
Write a program to implement below operations with both singly and d.pdf
 
Hi,I have added the methods and main class as per your requirement.pdf
Hi,I have added the methods and main class as per your requirement.pdfHi,I have added the methods and main class as per your requirement.pdf
Hi,I have added the methods and main class as per your requirement.pdf
 
Solutionclass IntNode { int data; public IntNode next,head;.pdf
Solutionclass IntNode { int data; public IntNode next,head;.pdfSolutionclass IntNode { int data; public IntNode next,head;.pdf
Solutionclass IntNode { int data; public IntNode next,head;.pdf
 
Tree Traversals A tree traversal is the process of visiting.pdf
Tree Traversals A tree traversal is the process of visiting.pdfTree Traversals A tree traversal is the process of visiting.pdf
Tree Traversals A tree traversal is the process of visiting.pdf
 
Lecture 18Dynamic Data Structures and Generics (II).docx
Lecture 18Dynamic Data Structures and Generics (II).docxLecture 18Dynamic Data Structures and Generics (II).docx
Lecture 18Dynamic Data Structures and Generics (II).docx
 
public class MyLinkedListltE extends ComparableltEgtg.pdf
public class MyLinkedListltE extends ComparableltEgtg.pdfpublic class MyLinkedListltE extends ComparableltEgtg.pdf
public class MyLinkedListltE extends ComparableltEgtg.pdf
 
Program to insert in a sorted list #includestdio.h#include.pdf
 Program to insert in a sorted list #includestdio.h#include.pdf Program to insert in a sorted list #includestdio.h#include.pdf
Program to insert in a sorted list #includestdio.h#include.pdf
 
could you implement this function please, im having issues with it..pdf
could you implement this function please, im having issues with it..pdfcould you implement this function please, im having issues with it..pdf
could you implement this function please, im having issues with it..pdf
 
How do I fix it in javaLinkedList.java Defines a doubl.pdf
How do I fix it in javaLinkedList.java Defines a doubl.pdfHow do I fix it in javaLinkedList.java Defines a doubl.pdf
How do I fix it in javaLinkedList.java Defines a doubl.pdf
 
This assignment and the next (#5) involve design and development of a.pdf
This assignment and the next (#5) involve design and development of a.pdfThis assignment and the next (#5) involve design and development of a.pdf
This assignment and the next (#5) involve design and development of a.pdf
 
How do I fix it in LinkedList.javaLinkedList.java Define.pdf
How do I fix it in LinkedList.javaLinkedList.java Define.pdfHow do I fix it in LinkedList.javaLinkedList.java Define.pdf
How do I fix it in LinkedList.javaLinkedList.java Define.pdf
 
I cant find the error in which my double linked list wont display .pdf
I cant find the error in which my double linked list wont display .pdfI cant find the error in which my double linked list wont display .pdf
I cant find the error in which my double linked list wont display .pdf
 
Given below is the completed implementation of MyLinkedList class. O.pdf
Given below is the completed implementation of MyLinkedList class. O.pdfGiven below is the completed implementation of MyLinkedList class. O.pdf
Given below is the completed implementation of MyLinkedList class. O.pdf
 
Circular linked list
Circular linked listCircular linked list
Circular linked list
 
package com.java2novice.ds.linkedlist;import java.util.NoSuchEleme.pdf
package com.java2novice.ds.linkedlist;import java.util.NoSuchEleme.pdfpackage com.java2novice.ds.linkedlist;import java.util.NoSuchEleme.pdf
package com.java2novice.ds.linkedlist;import java.util.NoSuchEleme.pdf
 

More from aroramobiles1

Please help with this JAVA Assignment and show output if you can ple.pdf
Please help with this JAVA Assignment and show output if you can ple.pdfPlease help with this JAVA Assignment and show output if you can ple.pdf
Please help with this JAVA Assignment and show output if you can ple.pdfaroramobiles1
 
ooo T-Mobile LTE 820 PM courses.apexlearning.com Question 34 of 42 M.pdf
ooo T-Mobile LTE 820 PM courses.apexlearning.com Question 34 of 42 M.pdfooo T-Mobile LTE 820 PM courses.apexlearning.com Question 34 of 42 M.pdf
ooo T-Mobile LTE 820 PM courses.apexlearning.com Question 34 of 42 M.pdfaroramobiles1
 
ood evening people. Ive been working on this code that sends a bur.pdf
ood evening people. Ive been working on this code that sends a bur.pdfood evening people. Ive been working on this code that sends a bur.pdf
ood evening people. Ive been working on this code that sends a bur.pdfaroramobiles1
 
Multiply. 0 072(10,000) Multiply. 317.02 middot 0.01 Write the nu.pdf
Multiply.  0 072(10,000)  Multiply.  317.02 middot 0.01  Write the nu.pdfMultiply.  0 072(10,000)  Multiply.  317.02 middot 0.01  Write the nu.pdf
Multiply. 0 072(10,000) Multiply. 317.02 middot 0.01 Write the nu.pdfaroramobiles1
 
Mitochondria and chloroplasts have small genomes becauseQuestion .pdf
Mitochondria and chloroplasts have small genomes becauseQuestion .pdfMitochondria and chloroplasts have small genomes becauseQuestion .pdf
Mitochondria and chloroplasts have small genomes becauseQuestion .pdfaroramobiles1
 
Meta-population theory and island biogeography theory are similar in .pdf
Meta-population theory and island biogeography theory are similar in .pdfMeta-population theory and island biogeography theory are similar in .pdf
Meta-population theory and island biogeography theory are similar in .pdfaroramobiles1
 
Java Programpublic class Fraction {   instance variablesin.pdf
Java Programpublic class Fraction {   instance variablesin.pdfJava Programpublic class Fraction {   instance variablesin.pdf
Java Programpublic class Fraction {   instance variablesin.pdfaroramobiles1
 
Kim’s revenue one week ago were $251 less than three times Janes rev.pdf
Kim’s revenue one week ago were $251 less than three times Janes rev.pdfKim’s revenue one week ago were $251 less than three times Janes rev.pdf
Kim’s revenue one week ago were $251 less than three times Janes rev.pdfaroramobiles1
 
I am having a hard time with this problem, can you help me #5. .pdf
I am having a hard time with this problem, can you help me #5. .pdfI am having a hard time with this problem, can you help me #5. .pdf
I am having a hard time with this problem, can you help me #5. .pdfaroramobiles1
 
How has television influenced the political process, specifically th.pdf
How has television influenced the political process, specifically th.pdfHow has television influenced the political process, specifically th.pdf
How has television influenced the political process, specifically th.pdfaroramobiles1
 
HISTORY Why is it called American revolutionSolutionThe .pdf
HISTORY Why is it called American revolutionSolutionThe .pdfHISTORY Why is it called American revolutionSolutionThe .pdf
HISTORY Why is it called American revolutionSolutionThe .pdfaroramobiles1
 
Explain what #include does in a source codeSolution Th.pdf
Explain what #include  does in a source codeSolution Th.pdfExplain what #include  does in a source codeSolution Th.pdf
Explain what #include does in a source codeSolution Th.pdfaroramobiles1
 
dNdS ratios reflect patterns of genetic divergence that have accumu.pdf
dNdS ratios reflect patterns of genetic divergence that have accumu.pdfdNdS ratios reflect patterns of genetic divergence that have accumu.pdf
dNdS ratios reflect patterns of genetic divergence that have accumu.pdfaroramobiles1
 
Discuss the complexity of problem definition and the importance of a.pdf
Discuss the complexity of problem definition and the importance of a.pdfDiscuss the complexity of problem definition and the importance of a.pdf
Discuss the complexity of problem definition and the importance of a.pdfaroramobiles1
 
Define the following terms i. Hydraulic gradientii. Seepageiii. Cr.pdf
Define the following terms i. Hydraulic gradientii. Seepageiii. Cr.pdfDefine the following terms i. Hydraulic gradientii. Seepageiii. Cr.pdf
Define the following terms i. Hydraulic gradientii. Seepageiii. Cr.pdfaroramobiles1
 
Describe how the principle of consistency can be applied to interfac.pdf
Describe how the principle of consistency can be applied to interfac.pdfDescribe how the principle of consistency can be applied to interfac.pdf
Describe how the principle of consistency can be applied to interfac.pdfaroramobiles1
 
Chapter 8 was tough for me. When determining the lumber needs of the.pdf
Chapter 8 was tough for me. When determining the lumber needs of the.pdfChapter 8 was tough for me. When determining the lumber needs of the.pdf
Chapter 8 was tough for me. When determining the lumber needs of the.pdfaroramobiles1
 
You have been given a file that contains fields relating to CD infor.pdf
You have been given a file that contains fields relating to CD infor.pdfYou have been given a file that contains fields relating to CD infor.pdf
You have been given a file that contains fields relating to CD infor.pdfaroramobiles1
 
Write a java method named flipLines that accepts as its parameter a .pdf
Write a java method named flipLines that accepts as its parameter a .pdfWrite a java method named flipLines that accepts as its parameter a .pdf
Write a java method named flipLines that accepts as its parameter a .pdfaroramobiles1
 
Which of the following isare true regarding router operationA. R.pdf
Which of the following isare true regarding router operationA. R.pdfWhich of the following isare true regarding router operationA. R.pdf
Which of the following isare true regarding router operationA. R.pdfaroramobiles1
 

More from aroramobiles1 (20)

Please help with this JAVA Assignment and show output if you can ple.pdf
Please help with this JAVA Assignment and show output if you can ple.pdfPlease help with this JAVA Assignment and show output if you can ple.pdf
Please help with this JAVA Assignment and show output if you can ple.pdf
 
ooo T-Mobile LTE 820 PM courses.apexlearning.com Question 34 of 42 M.pdf
ooo T-Mobile LTE 820 PM courses.apexlearning.com Question 34 of 42 M.pdfooo T-Mobile LTE 820 PM courses.apexlearning.com Question 34 of 42 M.pdf
ooo T-Mobile LTE 820 PM courses.apexlearning.com Question 34 of 42 M.pdf
 
ood evening people. Ive been working on this code that sends a bur.pdf
ood evening people. Ive been working on this code that sends a bur.pdfood evening people. Ive been working on this code that sends a bur.pdf
ood evening people. Ive been working on this code that sends a bur.pdf
 
Multiply. 0 072(10,000) Multiply. 317.02 middot 0.01 Write the nu.pdf
Multiply.  0 072(10,000)  Multiply.  317.02 middot 0.01  Write the nu.pdfMultiply.  0 072(10,000)  Multiply.  317.02 middot 0.01  Write the nu.pdf
Multiply. 0 072(10,000) Multiply. 317.02 middot 0.01 Write the nu.pdf
 
Mitochondria and chloroplasts have small genomes becauseQuestion .pdf
Mitochondria and chloroplasts have small genomes becauseQuestion .pdfMitochondria and chloroplasts have small genomes becauseQuestion .pdf
Mitochondria and chloroplasts have small genomes becauseQuestion .pdf
 
Meta-population theory and island biogeography theory are similar in .pdf
Meta-population theory and island biogeography theory are similar in .pdfMeta-population theory and island biogeography theory are similar in .pdf
Meta-population theory and island biogeography theory are similar in .pdf
 
Java Programpublic class Fraction {   instance variablesin.pdf
Java Programpublic class Fraction {   instance variablesin.pdfJava Programpublic class Fraction {   instance variablesin.pdf
Java Programpublic class Fraction {   instance variablesin.pdf
 
Kim’s revenue one week ago were $251 less than three times Janes rev.pdf
Kim’s revenue one week ago were $251 less than three times Janes rev.pdfKim’s revenue one week ago were $251 less than three times Janes rev.pdf
Kim’s revenue one week ago were $251 less than three times Janes rev.pdf
 
I am having a hard time with this problem, can you help me #5. .pdf
I am having a hard time with this problem, can you help me #5. .pdfI am having a hard time with this problem, can you help me #5. .pdf
I am having a hard time with this problem, can you help me #5. .pdf
 
How has television influenced the political process, specifically th.pdf
How has television influenced the political process, specifically th.pdfHow has television influenced the political process, specifically th.pdf
How has television influenced the political process, specifically th.pdf
 
HISTORY Why is it called American revolutionSolutionThe .pdf
HISTORY Why is it called American revolutionSolutionThe .pdfHISTORY Why is it called American revolutionSolutionThe .pdf
HISTORY Why is it called American revolutionSolutionThe .pdf
 
Explain what #include does in a source codeSolution Th.pdf
Explain what #include  does in a source codeSolution Th.pdfExplain what #include  does in a source codeSolution Th.pdf
Explain what #include does in a source codeSolution Th.pdf
 
dNdS ratios reflect patterns of genetic divergence that have accumu.pdf
dNdS ratios reflect patterns of genetic divergence that have accumu.pdfdNdS ratios reflect patterns of genetic divergence that have accumu.pdf
dNdS ratios reflect patterns of genetic divergence that have accumu.pdf
 
Discuss the complexity of problem definition and the importance of a.pdf
Discuss the complexity of problem definition and the importance of a.pdfDiscuss the complexity of problem definition and the importance of a.pdf
Discuss the complexity of problem definition and the importance of a.pdf
 
Define the following terms i. Hydraulic gradientii. Seepageiii. Cr.pdf
Define the following terms i. Hydraulic gradientii. Seepageiii. Cr.pdfDefine the following terms i. Hydraulic gradientii. Seepageiii. Cr.pdf
Define the following terms i. Hydraulic gradientii. Seepageiii. Cr.pdf
 
Describe how the principle of consistency can be applied to interfac.pdf
Describe how the principle of consistency can be applied to interfac.pdfDescribe how the principle of consistency can be applied to interfac.pdf
Describe how the principle of consistency can be applied to interfac.pdf
 
Chapter 8 was tough for me. When determining the lumber needs of the.pdf
Chapter 8 was tough for me. When determining the lumber needs of the.pdfChapter 8 was tough for me. When determining the lumber needs of the.pdf
Chapter 8 was tough for me. When determining the lumber needs of the.pdf
 
You have been given a file that contains fields relating to CD infor.pdf
You have been given a file that contains fields relating to CD infor.pdfYou have been given a file that contains fields relating to CD infor.pdf
You have been given a file that contains fields relating to CD infor.pdf
 
Write a java method named flipLines that accepts as its parameter a .pdf
Write a java method named flipLines that accepts as its parameter a .pdfWrite a java method named flipLines that accepts as its parameter a .pdf
Write a java method named flipLines that accepts as its parameter a .pdf
 
Which of the following isare true regarding router operationA. R.pdf
Which of the following isare true regarding router operationA. R.pdfWhich of the following isare true regarding router operationA. R.pdf
Which of the following isare true regarding router operationA. R.pdf
 

Recently uploaded

80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...Nguyen Thanh Tu Collection
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfDr Vijay Vishwakarma
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17Celine George
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Pooja Bhuva
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 

Recently uploaded (20)

80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 

{public int idata;data item (key) public double ddata;data item p.pdf

  • 1. {public int idata;//data item (key) public double ddata;//data item publis link next;//next link in list public link int id double dd)//constructor} idata = id; ddata=dd;} public void display link ()//display ourself {system out. Print ("{" + idata + ", " + ddata + "}");}}//end class link class linklist {private link first;//ref to first link on list public link list ()//constructor {first = null;//no links on lists yet public void insertfirst (int id, double dd)//make new link link new link = new link (id, dd); newlink.next = first;//it points to old first link first = newlink;//now first points to this} public link find (int key)//find link with given key {link current = first; while(current.idata ! = key)}//(assumes non-empty list){//starts at first'//while no match, if (current.next == null)//if end of list return null; else}'//didnt find it//not end list//not end of list, //go to next link//found it return current;} Solution public class Link { public int iData; public double dData; public Link next; /** * @param iData * @param dData */ public Link(int iData, double dData) { this.iData = iData; this.dData = dData; } public void displayLink() { System.out.println("{" + iData + ", " + dData + "} "); } } public class LinkList { private Link first; public LinkList() { // TODO Auto-generated constructor stub first = null; } public void insertFirst(int id, double dd) {
  • 2. Link newLink = new Link(id, dd); } public Link find(int key) { Link current = first; while (current.iData != key) { if (current.next == null) return null; else current = current.next; } return current; } }