LetsGrowMoreCommunity / DSA-Playyard

Explore the world of Data Structures and Algorithm
18 stars 51 forks source link

2. Reorder List(STACK) #99

Open SnehaAgarwal361 opened 3 years ago

SnehaAgarwal361 commented 3 years ago

Contribution Guidelines for this question-

-Languages available: C++, Java, Python -Well Commented Code -In the starting, add a brief explanation of the algorithm -if possible, add time and space complexity -kindly upload your code in STACK -> Language (C++, Java, Python) Folder -NO PLAGIARISM

Also, watch this video and the README section before contributing to the project. https://youtu.be/qXeaN_ZVVIc

AtrikGit6174 commented 3 years ago

I have implemented a C++ solution for this problem, but it effectively works on a deque-type vector operation. Stats for my submission are Runtime: 36 ms, faster than 84.22% of C++ online submissions for Reorder List. Memory Usage: 19.2 MB, less than 7.23% of C++ online submissions for Reorder List. Will it be right to submit it for this problem under STACKS?

SnehaAgarwal361 commented 3 years ago

Hey, @AtrikGit6174 that's great you were able to figure out a better solution as well but try finding a way to solve it through stacks since we have posted this question under the stacks section. To maintain project structure it's important , you can however optimize it using the stack as well! Keep learning :)

AtrikGit6174 commented 3 years ago

@SnehaAgarwal361 I also found the solution using a stack... May I be assigned the issue? Stats for my new submission are Runtime: 36 ms, faster than 84.04% of C++ online submissions for Reorder List. Memory Usage: 18.3 MB, less than 37.76% of C++ online submissions for Reorder List.

2000shivam659 commented 3 years ago

Please allow me to do this in java language.

SnehaAgarwal361 commented 3 years ago

You can start working on this issue, please take care of the guidelines.