Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Summary

Summary Java Tutorial

Rating
-
Sold
-
Pages
1
Uploaded on
21-04-2023
Written in
2022/2023

This document is a summary of java deque interface in java

Institution
Course

Content preview

Java Deque Interface Tutorial
Deck is an acronym for Double Ended Queue, meaning it supports the insertion and deletion of elements
from both ends. Deck is an interface that can be implemented by an Array Deck or a Linked List. Deck can
be used as a Queue, a Stack, or a FIFO data structure.


To create an object, we need to use an Array Deck or a Linked List with the "new" keyword. Linked List is a
dynamic array that initially allocates some size and resizes itself whenever it reaches up to 70 or 80
percent.


To add an element in a Deck, we can use "add" which adds the element at the end of a queue or "offer
first". A Deck is a FIFO data structure, so it can be used as a Queue. Therefore, this is an interface and can
be implemented using different data structures such as Array Deck or Linked List.


The topmost interface is the iterator, which allows us to iterate over a collection. We can use the for-each
statement to insert three elements, and by using either an iterator or for-each, we can print the elements
present in this data structure.


An effi cient way to check whether a collection is a palindrome or not is to take two pointers.

Written for

Course

Document information

Uploaded on
April 21, 2023
Number of pages
1
Written in
2022/2023
Type
SUMMARY

Subjects

$3.99
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
craftzcorner

Get to know the seller

Seller avatar
craftzcorner V
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
3 year
Number of followers
0
Documents
1
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions