This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Implement a treeset to retrieve and remove the highest and lowest value |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ ] Create a treeset with names of five vegetables of type string. | |
| [ ] Traverse the elements of treeset in descending order |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.*; | |
| class DequemainClass | |
| { | |
| static class Node | |
| { | |
| int data; | |
| Node prev, next; | |
| static Node getnode(int data) | |
| { | |
| Node newNode = new Node(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Queue Front : 40 | |
| Queue Rear : 50 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ ] Create a linked list named animals | |
| [ ] Add 5 animals namely cow, buffalo, goat, camel and donkey of type String | |
| [ ] Then remove buffalo from the linked list. | |
| [ ] Then remove the animal at index 3. | |
| [ ] After that remove the first animal and the last animal. | |
| [ ] Print the updated linked list |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ ] Size of Numbers ArrayList = 5 | |
| [ ] Add 5 numbers of type Integer | |
| [ ] calculate the size of ArrayList |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ ] Create an ArrayList with name fruits | |
| [ ] Add 5 fruits of type String namely mango, banana, chickoo, grapes and orange | |
| [ ] Instead of chickoo add pineapple to the arraylist | |
| [ ] print the updated list |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ ] Create an ArrayList with name CSLanguages | |
| [ ] Add 5 computer science languages of type String | |
| [ ] Iterate through the languages using for-each loop | |
| [ ] print those languages |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Implement TreeSet. | |
| Enter 10 nodes with values from 1 to 10. | |
| Remove node with value 5 and print the Treeset. | |
| Check whether the node has been removed or not. | |
| Now remove all the elements from the Treeset and again print the Treeset |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ ] Implement $TreeSet$. | |
| [ ] Enter nodes. | |
| [ ] Print Initial set, reverse set, headset, subset and $tailset$. |
NewerOlder