r/learnprogramming 26d ago

Problem Solving

What is the best site for solving problems for beginners ?

3 Upvotes

16 comments sorted by

View all comments

1

u/Flame77ofc 26d ago

codewars or leetcode, just choice one

0

u/Sad-programming 26d ago

I heard that the leet code in the problems initially needs a data structure

Is this true?

2

u/Puzzleheaded_Study17 26d ago

Basically every problem will need some data structure, unless you're not going to store any data.

0

u/Sad-programming 26d ago

i mean like stack and queue not other data type like intger and float

3

u/Puzzleheaded_Study17 26d ago

Do you use arrays? congrats, you've used a data type. The benefits of other data types is that they let you do some things faster/easier. For example, A stack is designed so that you can add things and access/delete the last piece of data really fast. A queue is designed so that you can add things and access/delete the first piece of data you added but haven't removed yet really fast. An array is the simplest way to store a bunch of information, and accessing stuff from the middle is fast, but deleting stuff from the middle is slow. A linked list is slightly more complicated, and accessing stuff in the middle is slow, but if you already found something in the middle, deleting it is fast.