本篇文章小编给大家分享一下IntelliJ IDEA中LeetCode插件配置问题代码解析,文章代码介绍的很详细,小编觉得挺不错的,现在分享给大家供大家参考,有需要的小伙伴们可以来看看。
首先是在IntelliJ上面下载安装好LeetCode插件,
然后配置好登录名和密码,
然后配置模板是:
标题:
P$!{question.frontendQuestionId}_$!velocityTool.camelCaseName(${question.titleSlug})
代码模板:
${question.content}
package leetcode.editor.cn;
//${question.title}
public class P${question.frontendQuestionId}_$!velocityTool.camelCaseName(${question.titleSlug}){
public static void main(String[] args) {
//测试代码
Solution solution = new P$!{question.frontendQuestionId}_$!velocityTool.camelCaseName(${question.titleSlug})().new Solution();
}
//力扣代码
${question.code}
}
效果截图:
这里还有一个问题就是力扣代码也就是question.code这里,本