© 2023 Hashnode
#linkedlists
We've all been in one interview or another where they asked us to "find x" and somehow, that didn't work out so well, either because you weren't expecting it or you don't even understand where to sta…
Problem Description Welcome back! Today, we'll be solving the Reverse Linked List problem on LeetCode. Given the head of a singly linked list, reverse the list, and return the reversed list's head. Fo…
Introduction A linked list is a data structure that consists of a sequence of nodes, where each node contains a value and a reference to the next node in the sequence. Unlike arrays, linked lists can …
What's Pharo? Pharo is a purely object-oriented programming language that comes in a powerful environment that focuses on simplicity and immediate feedback. It is a very powerful tool, that creates an immersive environment, where you can ev…
Working with the concepts we've studied can actually be quite enjoyable once we understand them. And there's nothing quite as satisfying as feeling confident in our knowledge. So, why not let our mind…
Problem Link: https://leetcode.com/problems/merge-two-sorted-lists/ In this problem, two input LinkedLists are given which are sorted already. We have to merge these two lists so that the output Linke…
Linked Lists are an important data structure used in computer science to store and manipulate data. Each node in a linked list has a data element and a pointer to the node after it in the collection. …
Approach - Initialize two pointers, slow and fast, to the head of the linked list. we will Traverse the linked list using the slow and fast pointers. we will Move the slow pointer one node at a time and the fast pointer two nodes at a time…
Linked Lists are a cool data structure in computer science that is used to store and manage collections of data. It is a linear data structure that consists of a series of nodes that are linked togeth…
Arrays in JavaScript An array is a unique data structure that holds an ordered collection of elements, which can be of any data type such as numbers, strings, or even other arrays. It allows you to store multiple values in a single variable…