vishalmx3

vishal.codes

Posted on May 7, 2024

Day 37/366

šŸš€ Today's Learning:

šŸŒŸ DSA

  • Greedy algorithm to find minimum number of coins
  • Valid Paranthesis Checker

šŸŒŸ Dev

  • Benefits of NodeJS

šŸ” Some Key Highlights:

DSA

The greedy algorithm for finding the minimum number of coins works by iteratively selecting the largest coin denomination that is less than or equal to the remaining amount needed to make change. It continues this process until the remaining amount becomes zero. At each step, it selects the largest possible coin denomination, ensuring the minimum number of coins is used to make the change.

A valid parenthesis checker algorithm works by iterating through each character in the given string representing parentheses. It utilizes a stack data structure to keep track of the opening parentheses encountered. When an opening parenthesis is encountered, it is pushed onto the stack. When a closing parenthesis is encountered, it checks if the stack is empty or if the top of the stack contains the corresponding opening parenthesis. If either condition is not met, the parentheses are not valid. After processing all characters, if the stack is empty, the parentheses are valid; otherwise, they are not.

DEV

Node.js offers several benefits for developers. Firstly, it allows for asynchronous, event-driven programming, which is particularly useful for handling I/O operations efficiently. This means Node.js can handle a large number of concurrent connections without blocking, making it ideal for building real-time applications like chat applications or streaming services. Secondly, Node.js utilizes JavaScript, a language familiar to many developers, both on the front end and the back end. This allows for code reuse and easier collaboration between front-end and back-end teams. Additionally, Node.js has a vast ecosystem of libraries and packages available through npm (Node Package Manager), which speeds up development by providing ready-to-use solutions for common tasks. Finally, Node.js is lightweight and scalable, making it suitable for building microservices architectures and deploying applications to cloud platforms. Overall, Node.js offers flexibility, performance, and a thriving community, making it a popular choice for building modern web applications.

#100daysofcode #1percentplusplus #coding #dsa

šŸ’– šŸ’Ŗ šŸ™… šŸš©
vishalmx3
vishal.codes

Posted on May 7, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Day 42/366
1percentplusplus Day 42/366

May 12, 2024

Day 41/366
1percentplusplus Day 41/366

May 11, 2024

Day 40/366
1percentplusplus Day 40/366

May 10, 2024

Day 39/366
1percentplusplus Day 39/366

May 9, 2024

Day 38/366
1percentplusplus Day 38/366

May 8, 2024