DEV Community

vishal.codes
vishal.codes

Posted on

Day 17/366

πŸš€ Today's Learning:

🌟 DSA

  • Middle Element of Linked List
  • Append Linked Lists

🌟 Dev

  • Babel vs Metro JS Bundler

πŸ” Some Key Highlights:

DSA

Middle Element of Linked List

In finding the middle element of a linked list, you start by having two pointers, one moving one step at a time (slow) and another moving two steps at a time (fast). As long as the fast pointer can move two steps ahead and the next node for the fast pointer is not null, the slow pointer moves one step forward. When the fast pointer reaches the end, the slow pointer is at the middle element.

Append Linked Lists

For appending linked lists, you iterate through the first list until you reach its end, then you make the last node point to the head of the second list. Essentially, you connect the end of the first list to the beginning of the second list, thus effectively appending the second list to the first.

DEV

Babel is like a language translator for JavaScript. It converts modern JavaScript code, which might not be supported by all browsers or environments, into a version that is widely understood and executable across different platforms. It takes in JavaScript code, processes it through various plugins, and produces equivalent code that is compatible with a specified target environment.

On the other hand, Metro Bundler is like a packaging system for React Native applications. It collects all the JavaScript, assets, and resources required for an app, bundles them together, and optimizes them for efficient delivery to the device. It handles tasks like resolving dependencies, transforming code, and generating the final bundle that can be deployed to a mobile device or emulator. Essentially, it prepares the app for execution on a mobile platform by bundling and optimizing its components.

#100daysofcode #1percentplusplus #coding #dsa

Top comments (0)