Skip to content

shenzhui007/leetcode-chatgpt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

leetcode-chatgpt

Use ChatGPT to solve coding problems provided by LeetCode. These codes are not written by human. They are generated by ChatGPT of openAI. Let's see if the AI can finish all coding problems on leetcode.

The codes are written in Python3. They all pass the submission.

Most conversations are like

write a python3 code, which if ....
The code should start with ...

In some conditions, the problem from leetcode is hard for ChatGPT to understand. You may need to edit the problem to make AI understand easily.

Example : Problem 25, I use the following conversations

write a python3 code, which if Given the head of a linked list like [1,2,3,4,5], reverse the nodes of the list k at a time, and return the modified list.(if k = 2, then the output should be [2,1,4,3,5])
The code should start with "class Solution:
def reverseKGroup(self, head: Optional[ListNode], k: int) -> Optional[ListNode]:""

Premium problems are not included because I can't get access to them.

About

Use ChatGPT to solve leetcode problems in Python

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published