IDEA's LeetCode plug-in setting and use (super detailed)

Table of contents

1. Download the plug-in

2. Plug-in configuration

Notice

3. Use of plug-ins 


 Welcome everyone to learn and use the LeetCode plug-in! ! !


        In the past few days, I was preparing to solve algorithm problems, and suddenly found a LeetCode plug-in in the IDEA plug-in mall, so I downloaded it and tried to use it, and found that it is very convenient to use, especially for us who often use IDEA programming tools. For this part, it is very time-saving. The specific style of the plug-in is shown in the following figure:

        With a plug-in like this, click on the question you want to solve, and the question requirements and code compiler will automatically pop up on the right. Write the algorithm code directly on the right, no need to search the URL in the browser to write and learn algorithm questions. For example: Let's click on the most basic  sum of two numbers  to make a demonstration, as shown in the figure below:

        How to use a plug-in like this, let's explain in detail:

1. Download the plug-in

        Open the idea compilation software, click Settings--enter the plug-in mall--search for leetcode plug-ins--click to download (click File-->Setting-->Plugins in the upper right corner). As shown below:

2. Plug-in configuration

        After the plugin is installed, continue to click File-->Setting-->Tools->leetcode plugin, as shown in the figure below:

        After opening this window, our next job is to complete the configuration of the plug-in. The specific operations are all shown in the figure below:

Notice 

         If you want to specialize in algorithm questions, my suggestion is: build a new project to store the algorithm source code.

Regarding the definition of some parameters:

  • ${question.title} Question title Example: sum of two numbers
  • ${question.titleSlug} Title Slug Example: two-sum
  • ${question.frontendQuestionId} Question ID
  • ${question.content} Question description
  • ${question.code} question code
  • $!velocityTool.camelCaseName(str) Convert characters to CamelCase style (capitalize the first letter)
  • $!velocityTool.smallCamelCaseName(str) Convert characters to small camel case (starting letters are lowercase)
  • $!velocityTool.snakeCaseName(str) convert character to snake case
  • $!velocityTool.leftPadZeros(str,n) Pads zeros on the left side of the string so that the length of the string is at least n
  • $!velocityTool.date() Get the current time 

3. Use of plug-ins 

        Click leetcode to enter the topic list, and click the login button to log in with your account. As shown below:

        After logging in your own account, you can write and answer the algorithm questions. Click on a topic (such as the sum of two numbers ), then write the code on the right, and click Run to start the code related to retrograde. The specific process is shown in the figure below:

        According to the title prompt, write the corresponding code:

         Click the Run button to run the program:

 

         Finally, the following execution window will display the execution result of the code to judge whether the code is correct:

 


 

At this point, the tutorial of the LeetCode plug-in is over, I hope you will stick to the algorithm questions! !

 

 

Guess you like

Origin blog.csdn.net/m0_56417836/article/details/128274624