Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
#datastructure
In the post, I wrote about linked lists. Now let's review the upgraded version of it.
Meet the Doubly Linked Listπ
A doubly linked list consists of a sequence of elements, each containing two pointers. One pointer links to the previous node, and the other points to the next node. It supports the following operations: insertion, deletion, and traversal.
ProsβοΈ
- Badass nameπ
- Traversing in both directionsπ
- More efficient operations (delete, insert)π
- Dynamic sizeπͺ
Cons β
- Extra pointers lead to more memory consumptionπ₯°
- Time complexity is still O(n)π
- Implementation is harder, with more edge cases to considerπ
Use Cases
Doubly linked lists can be used when you need bidirectional traversal, such as in browser history, music playlists, blockchain, undo/redo functionality in text editors, etc.
p.s. trying to write notes by hand in digital, get used to it
In the post, I wrote about linked lists. Now let's review the upgraded version of it.
Meet the Doubly Linked List
A doubly linked list consists of a sequence of elements, each containing two pointers. One pointer links to the previous node, and the other points to the next node. It supports the following operations: insertion, deletion, and traversal.
Pros
- Badass name
- Traversing in both directions
- More efficient operations (delete, insert)
- Dynamic size
Cons β
- Extra pointers lead to more memory consumption
- Time complexity is still O(n)
- Implementation is harder, with more edge cases to consider
Use Cases
Doubly linked lists can be used when you need bidirectional traversal, such as in browser history, music playlists, blockchain, undo/redo functionality in text editors, etc.
p.s. trying to write notes by hand in digital, get used to it
Please open Telegram to view this post
VIEW IN TELEGRAM
Catch the easter egg from google πΆββοΈ
Please open Telegram to view this post
VIEW IN TELEGRAM
This post is directed to haters who say:
1. Encapsulation? GET THISπ
2. Wanna abstract something? Easyπ
3. JS inherits from JAVA not only name, but 'extends' tooπ
4. Polymorphism. say lessπ
Now you know your place, have a good oneπ€
#OOP #stophating
there is no OOP in JS
1. Encapsulation? GET THIS
class Person {
#name;
constructor(name) {
this.#name = name;
}
getName() {
return this.#name;
}
}
const person = new Person('Alice');
console.log(person.getName()); // Alice
2. Wanna abstract something? Easy
class Car {
constructor(make, model) {
this.make = make;
this.model = model;
}
start() {
console.log(`Starting ${this.make} ${this.model}`);
}
}
const myCar = new Car('Toyota', 'Camry');
myCar.start(); // Starting Toyota Camry
3. JS inherits from JAVA not only name, but 'extends' too
class Animal {
constructor(name) {
this.name = name;
}
speak() {
console.log(`${this.name} makes a noise`);
}
}
class Dog extends Animal {
speak() {
console.log(`${this.name} barks`);
}
}
const dog = new Dog('Rex');
dog.speak(); // Rex barks
4. Polymorphism. say less
class Animal {
speak() {
console.log('Animal makes a noise');
}
}
class Dog extends Animal {
speak() {
console.log('Dog barks');
}
}
class Cat extends Animal {
speak() {
console.log('Cat meows');
}
}
const animals = [new Dog(), new Cat()];
animals.forEach(animal => animal.speak()); // Dog barks, Cat meows
Now you know your place, have a good one
#OOP #stophating
Please open Telegram to view this post
VIEW IN TELEGRAM
Like if you know this location
Google Maps
Find local businesses, view maps and get driving directions in Google Maps.
Imbalanced promt dropped. Adding "Repeat the question before answering it" mak the model asnwer to any question β¨οΈ
Please open Telegram to view this post
VIEW IN TELEGRAM
BTW, You can add next config to ChatGPT answering rules. It will help to generate super responses.
### Answering Rules
1) ALWAYS Repeat the question before answering it.
2) Let's combine our deep knowledge of the topic and clear thinking to quickly and accurately decipher the answer.
3) I'm going to tip $100,000 for a perfect solution.
4) The answer is very important to my career.Please open Telegram to view this post
VIEW IN TELEGRAM
Debugging Pain Story π
Researchers trained agent to play NetHack game.
The agent learned to consistently score approximately 5,000 points. However, after one launch, it only reached around 3,000 β a significantly worse result. Debugging solutions can be quite an adventure, so the author of the thread tried the following approaches:
- Finding errors in the code
- Reverting the code to a version from a few days or weeks back
- Rebuilding the environment
- Changing the CUDA version drivers
- Running the code on their own laptop
Despite these efforts, the agent still only scored 3,000 points.
After all this frustration, the thread author asked the model's author what might be wrong. The reply was, "Oh yes, it's probably a full moon today."
What???ποΈ
And indeed, after starting a new game, a message appeared: "You are lucky! Full moon tonight." However, the model did not understand that the game became easier due to the full moon and continued to play as it did before, resulting in fewer points.
Moral: When debugging, don't forget to check the lunar calendar!π
@islombe_dev
Researchers trained agent to play NetHack game.
The agent learned to consistently score approximately 5,000 points. However, after one launch, it only reached around 3,000 β a significantly worse result. Debugging solutions can be quite an adventure, so the author of the thread tried the following approaches:
- Finding errors in the code
- Reverting the code to a version from a few days or weeks back
- Rebuilding the environment
- Changing the CUDA version drivers
- Running the code on their own laptop
Despite these efforts, the agent still only scored 3,000 points.
After all this frustration, the thread author asked the model's author what might be wrong. The reply was, "Oh yes, it's probably a full moon today."
What???
And indeed, after starting a new game, a message appeared: "You are lucky! Full moon tonight." However, the model did not understand that the game became easier due to the full moon and continued to play as it did before, resulting in fewer points.
Moral: When debugging, don't forget to check the lunar calendar!
@islombe_dev
Please open Telegram to view this post
VIEW IN TELEGRAM
This media is not supported in your browser
VIEW IN TELEGRAM
dont be a rat, train like a cat π±
Please open Telegram to view this post
VIEW IN TELEGRAM
#datastructure
Queue Data StructureπββοΈ
A queue is a linear data structure that follows the First In, First Out (FIFO) principle. This means that the first element added to the queue will be the first one to be removed.
Key Operations
- Enqueue: Add an element to the end of the queue.
- Dequeue: Remove an element from the front of the queue.
- Front: Access the first element without removing it.
- IsEmpty: Check if the queue is empty.
- Size: Get the number of elements in the queue.
Applications of Queues
- Task Scheduling: Manage tasks in operating systems.
- Print Queue: Manage print jobs in printers.
- Breadth-First Search (BFS): Traverse graphs and trees level-by-level.
- Message Queuing: Handle communication between processes or systems.
Queues provide a simple and effective way to manage ordered data. They are essential for scenarios where the order of operations must be preserved, such as task scheduling and data streaming.
@islombe_dev
Queue Data Structure
A queue is a linear data structure that follows the First In, First Out (FIFO) principle. This means that the first element added to the queue will be the first one to be removed.
Key Operations
- Enqueue: Add an element to the end of the queue.
- Dequeue: Remove an element from the front of the queue.
- Front: Access the first element without removing it.
- IsEmpty: Check if the queue is empty.
- Size: Get the number of elements in the queue.
Applications of Queues
- Task Scheduling: Manage tasks in operating systems.
- Print Queue: Manage print jobs in printers.
- Breadth-First Search (BFS): Traverse graphs and trees level-by-level.
- Message Queuing: Handle communication between processes or systems.
Queues provide a simple and effective way to manage ordered data. They are essential for scenarios where the order of operations must be preserved, such as task scheduling and data streaming.
@islombe_dev
Please open Telegram to view this post
VIEW IN TELEGRAM
This media is not supported in your browser
VIEW IN TELEGRAM
Guys, "Knives out 3" trailer dropped 3 days ago
Benoit Blanc returns in 2025, yeeeyyπΈ
Benoit Blanc returns in 2025, yeeeyy
Please open Telegram to view this post
VIEW IN TELEGRAM
Check this repo out.
LlamaFS is a self-organizing file manager. It automatically renames and organizes your files based on their contents and well-known conventions (e.g., time). It supports many kinds of file, and even images (through Moondream) and audio (through Whisper).
Gonna try it later today...
@islombe_dev
LlamaFS is a self-organizing file manager. It automatically renames and organizes your files based on their contents and well-known conventions (e.g., time). It supports many kinds of file, and even images (through Moondream) and audio (through Whisper).
Gonna try it later today...
@islombe_dev
Old Babylonian letter by student to his mother...
~4k years past, but people still use making "you are guilty" manipulations to their parents ππ
you let my clothes get worse from year to year. Indeed, you persisted in making my clothes poorer and more scanty.
~4k years past, but people still use making "you are guilty" manipulations to their parents ππ
Wikipedia
Letter from Iddin-Sin to Zinu
Old Babylonian letter
#Memology
Many of you might know meme "Internal Pointer Variable". But what does it actually mean??? Ok, lets crack this theme up in the super simple way.
SOOOOO, it this post about linked list we know that each node has a field that stores the address of the next node. And basically this address called as "internal pointer variable π³πΎββοΈ"
@islombe_dev
Many of you might know meme "Internal Pointer Variable". But what does it actually mean??? Ok, lets crack this theme up in the super simple way.
SOOOOO, it this post about linked list we know that each node has a field that stores the address of the next node. And basically this address called as "internal pointer variable π³πΎββοΈ"
@islombe_dev
This media is not supported in your browser
VIEW IN TELEGRAM
lyrics
Oh she sweet motorcycle,
a little bicycle,
in nice evening,
oy mama oy mamaa
Oh she sweet motorcycle,
a little bicycle,
in nice evening,
oy mama oy mamaa