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
/** | |
* Tree: | |
* - A tree is a hierarchical data structure consisting of nodes connected by edges. | |
* - It consists of a root node, which is the topmost node, and zero or more child nodes. | |
* - Each node can have an arbitrary number of children, unlike a binary tree which restricts each node to have at most two children. | |
* - Trees are used to represent hierarchical relationships such as organizational charts, file systems, and HTML DOM structures. | |
*/ | |
#include "iostream" | |
#include "vector" |
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 {} \; |
NewerOlder