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
/** | |
* Dequeue: | |
* Dequeue is also known as Double Ended Queue. | |
* As the name suggests double ended, | |
* it means that an element can be inserted or removed from both ends of the queue, unlike the other queues | |
* in which it can be done only from one end. Because of this property, it may not obey the First In First Out property. | |
* | |
* implement using doubly linked list | |
* | |
* Operation Description Time Complexity |
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
#include "iostream" | |
#include "memory" | |
struct StackHolder { | |
std::string data; | |
}; | |
class Stack { | |
private: | |
int idx = -1; |
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
/** | |
* Circular Double Linked List | |
* | |
*/ | |
#include "iostream" | |
using namespace std; | |
struct Node { |
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
#include "iostream" | |
using namespace std; | |
struct Node { | |
int id; | |
string name; | |
Node *next; | |
Node(unsigned int id, string name, Node *next = nullptr) : |
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
#include "iostream" | |
using namespace std; | |
struct Node { | |
int id; | |
string name; | |
Node *previous; | |
Node *next; |
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
#include "iostream" | |
using namespace std; | |
struct Node { | |
unsigned int no; | |
string name; | |
Node *next; | |
Node(unsigned int data, string name) : no(data), name(name), next(nullptr) {}; |
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
<script> | |
var isTabActive; | |
window.onfocus = function () { | |
console.log("onfocus"); | |
}; | |
window.onblur = function () { | |
console.log("onblue"); | |
}; |
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
https://picsum.photos/400/300 | |
https://dummyimage.com/250/ffffff/000000 | |
https://dummyimage.com/250x300 | |
https://dummyimage.com/300.png/09f/fff | |
https://dummyimage.com/ |
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
# Set default permissions for directories | |
find /home/me -type d -exec chmod 755 {} \; | |
# Set default permissions for files | |
find /home/me -type f -exec chmod 644 {} \; |
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
docker run --rm -v $(pwd):/app -w /app php php artisan serve | |
docker run --rm -v $(pwd):/app composer install | |
https://docs.docker.com/engine/reference/commandline/container_ls/ | |
docker container ls --all | |
docker rm -vf $(docker ps -aq) | |
docker kill $(docker ps -q) | |
docker kill <container_id> | |
docker rm <container_id_or_name> |
NewerOlder