文章目录
使用:安装leetcode插件
如果在插件商店搜索不到,可能是代理配置不对,看看下图
配置leetcode插件
配置leetcode的用户名和密码,以及配置filename和codeTemplate
$!velocityTool.camelCaseName(${question.titleSlug}
${question.content}
public class $!velocityTool.camelCaseName(${question.titleSlug}){
public static void main(String[] args) {
Solution solution = new $!velocityTool.camelCaseName(${question.titleSlug})().new Solution();
System.out.println(solution.toString());
}
${question.code}
}
配置完成后,会在边框会有leetcode的入口,不同idea版本在的位置不一样
使用leetcode插件
打开,但是设置的代码项目路径
然后打开插件
其中按钮左到右依次为:
- 登录:登录到力扣网
- 退出或注销:退出登录的账号
- 刷新问题:即获取题目