100 Days of DSA Challenge Overview Welcome to the "100 Days of DSA" challenge! This challenge is designed to help you improve your proficiency in Data Structures and Algorithms through consistent practice. The journey spans 100 days, with each day dedicated to solving problems, implementing algorithms, and refining your coding skills.
Getting Started Daily Tasks: Each day, solve a new algorithmic problem or implement a data structure. Place your code in the corresponding day's directory.
Resources Use online platforms like LeetCode, HackerRank, or CodeSignal for problem-solving. Refer to reputable books and websites for in-depth explanations of data structures and algorithms. Conclusion By the end of this challenge, you'll not only have a solid understanding of various data structures and algorithms but also a habit of consistent coding practice. Best of luck on your "100 Days of DSA" journey!
This project includes a TypeScript script Find_Duplicate_Strings.ts
that finds duplicate strings, words, and characters. Below are the steps to run this file using ts-node
.
Ensure you have the following installed:
- Node.js (Download from Node.js official website)
- TypeScript (Install globally if not already installed)
- ts-node (Used to execute TypeScript files without compiling them first)
Run the following command to install them globally:
npm install -g typescript ts-node
Alternatively, install them locally in the project:
npm install --save-dev typescript ts-node
Check if ts-node
is installed by running:
ts-node -v
Open a terminal or PowerShell and navigate to the folder containing the script:
cd E:\project1\100daysofCode\Day_2
Use the following command to execute the script using ts-node
:
npx ts-node Find_Duplicate_Strings.ts
Or, if you have installed ts-node
globally:
ts-node Find_Duplicate_Strings.ts
If you encounter errors related to module resolution, try running:
npx ts-node ./Find_Duplicate_Strings.ts
Upon successful execution, the script will display duplicate strings, words, and characters from the given input, similar to:
Duplicate Strings: Map(3) { 'apple' => 2, 'banana' => 2, 'orange' => 2 }
Duplicate Words: Map(4) { 'this' => 2, 'is' => 2, 'a' => 2, 'test' => 2 }
Duplicate Characters: Map(3) { 'r' => 2, 'g' => 2, 'm' => 2 }
-
If you see
ts-node: command not found
, ensurets-node
is installed globally or usenpx ts-node
. -
If you get a
Cannot find module
error, check if the file name is correct and exists in the specified directory. -
If necessary, reinstall dependencies using:
rm -rf node_modules package-lock.json npm install
This guide helps you execute TypeScript scripts using ts-node
efficiently. Feel free to modify the script to test different input cases!
Happy coding! 🚀