Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LeetCode support #50

Closed
mingyEx opened this issue Dec 13, 2021 · 14 comments
Closed

LeetCode support #50

mingyEx opened this issue Dec 13, 2021 · 14 comments

Comments

@mingyEx
Copy link

mingyEx commented Dec 13, 2021

Very much looking forward to

@slycelote
Copy link
Owner

Possibly. Depends on how many people want it.

@slycelote slycelote changed the title Will it support leetcode? LeetCode support Dec 14, 2021
@mingyEx mingyEx closed this as completed Dec 19, 2021
@slycelote slycelote reopened this Dec 19, 2021
@mingyEx
Copy link
Author

mingyEx commented Dec 19, 2021

You reopened it to count how many people would expect leetcode support?

I don't know cf, but as far as I know, only novices like me will copy the code to the local IDE among Leetcode users, and Leetcode only needs to implement a class, so the IDE plug-in may not be very useful.

But I very much hope, if possible, to add support for simulation problems to Leetcode.
Like this
https://leetcode-cn.com/problems/stack-of-plates-lcci/

When the input data represents a function call and the corresponding parameters, the user can simply input the string itself, and then view the result at the i-th position, just like this.
https://github.com/mingy532/Trivial_thing/blob/master/Reflection_in_boost.cpp#L157

Instead of manually writing a lot of things such as

Solution s;
s->func1(...)
s->func2(...)
...

If you plan to add support for leetcode, I hope you can add this feature.

@slycelote
Copy link
Owner

The issue is open to track progress of this feature request, including user comments/plus-ones (although I can't give any ETA). Thanks for detailed explanation of simulation problems. I can't read Chinese, but I assume it's similar to Dinner Plate Stacks.

@mingyEx
Copy link
Author

mingyEx commented Dec 22, 2021

I saw this question in the《crack the coding interview》. The Chinese site LeetCode puts all the questions in this book into one topic, so I don't know its official title number.
They are indeed the same problem, thank you for taking the time to find it.

slycelote added a commit that referenced this issue Jan 23, 2022
slycelote added a commit that referenced this issue Jan 25, 2022
slycelote added a commit that referenced this issue Jan 26, 2022
@slycelote
Copy link
Owner

@KargathEx I added basic support for LeetCode and published a beta release here. I'd appreciate if you could test this out.

Regarding "simulation problems" -- do you have more examples, or maybe there's a general way to search for them?

Note that quite a few LeetCode problems involve custom structures, like TreeNode. Those are not yet supported either.

@mingyEx
Copy link
Author

mingyEx commented Jan 27, 2022

Thanks, I will try it!
By the way, about the construction of custom data structures, you can refer to this
https://github.com/KargathEx/lc_debug/blob/main/lc.h

@mingyEx
Copy link
Author

mingyEx commented Jan 27, 2022

simulation problems:https://leetcode.com/tag/simulation/

@mingyEx
Copy link
Author

mingyEx commented Jan 27, 2022

Asking an unrelated question, how do you guys debug simulation problems while playing at codeforce, I find it too hard to keep track of its state in my head, and too tiring to manually write code that simulates function calls.

@mingyEx
Copy link
Author

mingyEx commented Jan 27, 2022

https://www.boost.org/doc/libs/develop/libs/describe/doc/html/describe.html#example_json_rpc
This one might work too, but I don't know how to handle the case where the input parameter is empty.

@mingyEx
Copy link
Author

mingyEx commented Jan 27, 2022

It works fine.

but Error for this link:
https://leetcode.com/problems/k-highest-ranked-items-within-a-price-range/
aaaaa

slycelote added a commit that referenced this issue Jan 28, 2022
@slycelote
Copy link
Owner

simulation problems:https://leetcode.com/tag/simulation/

Thanks! I found a better tag: https://leetcode.com/tag/design/

how do you guys debug simulation problems while playing at codeforce, I find it too hard to keep track of its state in my head, and too tiring to manually write code that simulates function calls.

I don't really have experience with those, do you have example URLs?

It works fine.

but Error for this link: https://leetcode.com/problems/k-highest-ranked-items-within-a-price-range/

Thanks! The problem is with multi-dimensional vectors. This will be fixed in release version.

@mingyEx
Copy link
Author

mingyEx commented Jan 31, 2022

Thanks, I will try it! By the way, about the construction of custom data structures, you can refer to this https://github.com/KargathEx/lc_debug/blob/main/lc.h

Sorry I just noticed that link is inaccessible , update:
https://github.com/luckystone60/leetcode-helper

slycelote added a commit that referenced this issue Mar 6, 2022
@slycelote
Copy link
Owner

@KargathEx I published another beta release that should support majority of LeetCode problems: https://github.com/slycelote/caide/releases/tag/v2.10.0-beta2

@slycelote
Copy link
Owner

Published 2.10 release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants