This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Copy Text 2 Clipboard</title> | |
</head> | |
<body> |
This file contains 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
class Queue { | |
/* | |
Initialization | |
@parmas - size - Queue Size | |
storage - an array to store the items of the queue DS | |
currentQueueSize - to track the size of the queue | |
queueSize - application users can set the predefined size for the queue | |
*/ | |
constructor(size) { |
This file contains 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
class Stack { | |
/* Initialization */ | |
constructor() { | |
this.storage = {}; | |
this.stackLength = 0; | |
} | |
/* To get the stack size */ | |
getStackSize() { | |
return this.stackLength; |