LeetCode-OpenSource / vscode-leetcode

Solve LeetCode problems in VS Code
https://marketplace.visualstudio.com/items?itemName=shengchen.vscode-leetcode
MIT License
8.16k stars 646 forks source link

每道题有很多种解法,能不能保留自己之前通过的解答,而不是覆盖文件。 #620

Open QJieWang opened 4 years ago

QJieWang commented 4 years ago

Before you submit an question we recommend you to check out the DOCUMENT first.

You can also find more information in:

💬 Questions and Help

Please outline the questions.

cfcfzzzz commented 4 years ago

在原文件上注释掉原来的代码即可

KennyNg-19 commented 4 years ago

新点开问题,新solution,保存为副本即可?

QJieWang commented 3 years ago

新点开问题,新solution,保存为副本即可?

谢谢了

QJieWang commented 3 years ago

在原文件上注释掉原来的代码即可

确实是一个方法,但是如果官方能给出更好的模式就好了,谢谢了。

swithun-liu commented 3 years ago

Maybe you can try to change the file name by such as adding something like _solution_1.cpp, _solution_2.cpp, when you open that question again with vscode-leetcode, there will be a new file created.

nonmean commented 1 year ago

你可以试试看每个解法创建创建一个新方法 leetcode主函数里面调用你实际想提交的那个方法就好

pheotry commented 8 months ago

直接复制粘贴一下文件