---
title: "#dailydoseofdsa articles | Hashnode"
description: "Explore 10 articles tagged #dailydoseofdsa on Hashnode. Tutorials, guides, and how-tos from the community."
url: "https://hashnode.com/tag/dailydoseofdsa"
---

Tag

# #dailydoseofdsa

10 posts · 0 followers

[Vadish Chhatwal](https://hashnode.com/@DukeX) · [Jul 19, 2024](https://hashnode.com/posts/dsa-journey-from-newbie-to-ace-1-1-1-1/669aa49da3a2be821649e36c)

### [DSA Journey: From Newbie to Ace](https://dukex.hashnode.dev/dsa-journey-from-newbie-to-ace-1-1-1-1?utm_source=hashnode&utm_medium=feed)

From DSA newbie to expert, mastering recursion, stacks, and queues while managing college assignments and surprise classes

1 min read · [dukex.hashnode.dev](https://dukex.hashnode.dev/dsa-journey-from-newbie-to-ace-1-1-1-1?utm_source=hashnode&utm_medium=feed)

[Ujjwal Sharma](https://hashnode.com/@ujjwalsharma) · [Jul 12, 2024](https://hashnode.com/posts/maximum-score-from-removing-substrings/66913659ee8a95de227dac26)

### [Maximum Score From Removing Substrings](https://ujjwalsharma.hashnode.dev/maximum-score-from-removing-substrings?utm_source=hashnode&utm_medium=feed)

Problem Link https://leetcode.com/problems/maximum-score-from-removing-substrings/description/ Approach If x > y we have to focus on making the "ab" pairs more than any other pair, so we will do the same in the first pass Once all the pairs are don...

2 min read · [ujjwalsharma.hashnode.dev](https://ujjwalsharma.hashnode.dev/maximum-score-from-removing-substrings?utm_source=hashnode&utm_medium=feed)

[Ujjwal Sharma](https://hashnode.com/@ujjwalsharma) · [Jul 11, 2024](https://hashnode.com/posts/reverse-substrings-between-each-pair-of-parentheses/6690129235c9cc1ced4a77eb)

### [Reverse Substrings Between Each Pair of Parentheses](https://ujjwalsharma.hashnode.dev/reverse-substrings-between-each-pair-of-parentheses?utm_source=hashnode&utm_medium=feed)

Problem Link Click Here Approach First we will store the characters other than parenthesis because we don't want parenthesis in our answer. As soon as we encounter an opening bracket we will store it's index In the vector As all the parenthesis ar...

1 min read · [ujjwalsharma.hashnode.dev](https://ujjwalsharma.hashnode.dev/reverse-substrings-between-each-pair-of-parentheses?utm_source=hashnode&utm_medium=feed)

[Ujjwal Sharma](https://hashnode.com/@ujjwalsharma) · [Jul 10, 2024](https://hashnode.com/posts/crawler-log-folder-leetcode/668e61686546b23cb8b45966)

### [Crawler Log Folder (LeetCode)](https://ujjwalsharma.hashnode.dev/crawler-log-folder-leetcode?utm_source=hashnode&utm_medium=feed)

Problem Link Click Here Intuition see whenever we write the commandcd /foldernameand suppose you are in the root directory so once this command is executed, how many steps you need to go back to root directory? 1 step right you will just peform cd .....

2 min read · [ujjwalsharma.hashnode.dev](https://ujjwalsharma.hashnode.dev/crawler-log-folder-leetcode?utm_source=hashnode&utm_medium=feed)

[Ujjwal Sharma](https://hashnode.com/@ujjwalsharma) · [Jul 9, 2024](https://hashnode.com/posts/average-waiting-time-simulation-based-question/668d6383bbd287b6ea566f0d)

### [Average Waiting time (Simulation based question)](https://ujjwalsharma.hashnode.dev/average-waiting-time-simulation-based-question?utm_source=hashnode&utm_medium=feed)

Problem link Click here Approach Initially, when the chef is not doing anything and a customer arrives, the waiting time for the customer to get a particular dish ordered is nothing but just the preparation time. Now, let's suppose the chef is prep...

2 min read · [ujjwalsharma.hashnode.dev](https://ujjwalsharma.hashnode.dev/average-waiting-time-simulation-based-question?utm_source=hashnode&utm_medium=feed)

[Ujjwal Sharma](https://hashnode.com/@ujjwalsharma) · [Jul 8, 2024](https://hashnode.com/posts/josephus-algorithm/668be19b432a602f0896a619)

### [Josephus Algorithm](https://ujjwalsharma.hashnode.dev/josephus-algorithm?utm_source=hashnode&utm_medium=feed)

Problem Link Click Here Approaches Approach 1 (Brute force) we will create one array/vector to store the values from 1 to n, representing the sequence of each person As given in the question we will remove one person from the array and move forward...

1 min read · [ujjwalsharma.hashnode.dev](https://ujjwalsharma.hashnode.dev/josephus-algorithm?utm_source=hashnode&utm_medium=feed)

[Ujjwal Sharma](https://hashnode.com/@ujjwalsharma) · [Jul 7, 2024](https://hashnode.com/posts/water-bottle-problem-leetcode-potd/668ab8b4055c4ba396f4c8ec)

### [Water bottle Problem (Leetcode POTD)](https://ujjwalsharma.hashnode.dev/water-bottle-problem-leetcode-potd?utm_source=hashnode&utm_medium=feed)

Problem Link Click Here Approach We need to calculate the maximum number of full water bottles we can consume right so let's consider one test case Total filled bottled = 15, Exchange Rate = 4 So initially we will consume 15 bottles now these bott...

1 min read · [ujjwalsharma.hashnode.dev](https://ujjwalsharma.hashnode.dev/water-bottle-problem-leetcode-potd?utm_source=hashnode&utm_medium=feed)

[Ujjwal Sharma](https://hashnode.com/@ujjwalsharma) · [Jul 6, 2024](https://hashnode.com/posts/two-sum-problem-the-foundation/66893cf21247314870caf679)

### [Two sum problem (The foundation)](https://ujjwalsharma.hashnode.dev/two-sum-problem-the-foundation?utm_source=hashnode&utm_medium=feed)

NOTE - please read this article properly and solve the question twice once on paper and then on leetcode because this question serves as the foundation for the upcoming question In this category that is, 3 sum and 4 sum Question Click Here Approaches...

2 min read · [ujjwalsharma.hashnode.dev](https://ujjwalsharma.hashnode.dev/two-sum-problem-the-foundation?utm_source=hashnode&utm_medium=feed)

[Ujjwal Sharma](https://hashnode.com/@ujjwalsharma) · [Jul 4, 2024](https://hashnode.com/posts/moores-voting-algorithm/6686cad65949ae557f646b38)

### [Moore's Voting Algorithm](https://ujjwalsharma.hashnode.dev/moores-voting-algorithm?utm_source=hashnode&utm_medium=feed)

Working Let the initial length be 1, because we are considering the first element as the initial element in our count. Move forward in the array and if the same element appears again, then increase the count by 1; if not, then decrease the count by...

2 min read · [ujjwalsharma.hashnode.dev](https://ujjwalsharma.hashnode.dev/moores-voting-algorithm?utm_source=hashnode&utm_medium=feed)

[Ujjwal Sharma](https://hashnode.com/@ujjwalsharma) · [Jul 3, 2024](https://hashnode.com/posts/rotate-the-array-by-k-places/66855391b83c836124b2a097)

### [Rotate the array by K places](https://ujjwalsharma.hashnode.dev/rotate-the-array-by-k-places?utm_source=hashnode&utm_medium=feed)

Learn how to rotate an array by K places using brute force and optimal approaches with code examples and dry run illustrations

2 min read · [ujjwalsharma.hashnode.dev](https://ujjwalsharma.hashnode.dev/rotate-the-array-by-k-places?utm_source=hashnode&utm_medium=feed)
