idea使用leecode插件

一、下载安装
点击File->Setting->Plugins,搜索leetcode再点击install进行下载。

下载完成后重启idea,右下角会有leetcode菜单。

二、配置
1.点击File->Settings->Tools->leetcode plugin,如图:

2.自定义模板配置
下面介绍我使用的配置模板为:

P$!{question.frontendQuestionId}_$!velocityTool.camelCaseName(${question.titleSlug}) 
package leetcode.editor.cn;

${question.content}
/**
 * ${question.title}
 *
 * @author zhaohanqing
 */
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}
}

posted @ 2022-03-24 23:28  经典鸡翅  阅读(1341)  评论(0编辑  收藏  举报