femto / blank

0 stars 0 forks source link

hi:Write three progamming interview challenges #1

Open femto opened 1 year ago

femto commented 1 year ago

Put them in a new programming_interview folder.
Make an easy one, a medium one, and a hard one. For each include a markdown document describing the task, and a python file with tests verifying correctness of the solution. Expect the user to write their answers in a file called solution.py in the same directory.

Checklist - [X] `README.md` > Add a section briefly describing the `programming_interview` directory and its purpose. - [X] `programming_interview/easy_challenge.md` > Create a markdown file with a description of the easy challenge. Mention that the user should write their solution in `solution.py`. - [X] `programming_interview/medium_challenge.md` > Create a markdown file with a description of the medium challenge. Mention that the user should write their solution in `solution.py`. - [X] `programming_interview/hard_challenge.md` > Create a markdown file with a description of the hard challenge. Mention that the user should write their solution in `solution.py`. - [X] `programming_interview/test_easy.py` > Create a python test file with tests to verify the correctness of the solution for the easy challenge. - [ ] `programming_interview/test_medium.py` > Create a python test file with tests to verify the correctness of the solution for the medium challenge. - [ ] `programming_interview/test_hard.py` > Create a python test file with tests to verify the correctness of the solution for the hard challenge.
Checklist - [X] `README.md` > Add a new section describing the `programming_interview` directory and its purpose. - [X] `programming_interview/easy_challenge.md` > Create a markdown file with a description of the easy challenge. Mention that the user should write their solution in `solution.py`. - [X] `programming_interview/medium_challenge.md` > Create a markdown file with a description of the medium challenge. Mention that the user should write their solution in `solution.py`. - [X] `programming_interview/hard_challenge.md` > Create a markdown file with a description of the hard challenge. Mention that the user should write their solution in `solution.py`. - [X] `programming_interview/test_easy.py` > Create a python test file with tests to verify the correctness of the solution for the easy challenge. - [X] `programming_interview/test_medium.py` > Create a python test file with tests to verify the correctness of the solution for the medium challenge. - [X] `programming_interview/test_hard.py` > Create a python test file with tests to verify the correctness of the solution for the hard challenge.
codez-bot[bot] commented 1 year ago

Here's the PR! https://github.com/femto/blank/pull/3.

⚑ Free Trial: I used GPT-4 to create this ticket. You have 14 GPT-4 tickets left for the month. For more GPT-4 tickets, visit our payment portal.To get hi to recreate this ticket, leave a comment prefixed with "hi:" or edit the issue.


Step 1: πŸ” Code Search

I found the following snippets in your repository. I will now analyze these snippets and come up with a plan.

Some code snippets I looked at (click to expand). If some file is missing from here, you can mention the path in the ticket description. https://github.com/femto/blank/blob/8e5ae618f1ccc78a64e03fb0fcf84685561d47a6/README.md#L1-L1

Step 2: 🧐 Snippet Analysis

From looking through the relevant snippets, I decided to make the following modifications:

File Path Proposed Changes
README.md Add a new section describing the programming_interview directory and its purpose.
programming_interview/easy_challenge.md Create a markdown file with a description of the easy challenge. Mention that the user should write their solution in solution.py.
programming_interview/medium_challenge.md Create a markdown file with a description of the medium challenge. Mention that the user should write their solution in solution.py.
programming_interview/hard_challenge.md Create a markdown file with a description of the hard challenge. Mention that the user should write their solution in solution.py.
programming_interview/test_easy.py Create a python test file with tests to verify the correctness of the solution for the easy challenge.
programming_interview/test_medium.py Create a python test file with tests to verify the correctness of the solution for the medium challenge.
programming_interview/test_hard.py Create a python test file with tests to verify the correctness of the solution for the hard challenge.

Step 3: πŸ“ Planning

I have created a plan for writing the pull request. I am now working my plan and coding the required changes to address this issue. Here is the planned pull request:

Create programming interview challenges sweep/create-programming-interview-challenges

Description

This PR adds the necessary files and updates the README.md file to create programming interview challenges. It includes the following changes:

  • Added a new section in README.md to describe the programming_interview directory and its purpose.
  • Created markdown files for the easy, medium, and hard challenges, with descriptions of each challenge and instructions for writing solutions in solution.py.
  • Created Python test files for each challenge to verify the correctness of the solutions.

Summary of Changes

  • Added a new section in README.md to describe the programming_interview directory and its purpose.
  • Created programming_interview/easy_challenge.md with the description of the easy challenge.
  • Created programming_interview/medium_challenge.md with the description of the medium challenge.
  • Created programming_interview/hard_challenge.md with the description of the hard challenge.
  • Created programming_interview/test_easy.py with tests for the easy challenge.
  • Created programming_interview/test_medium.py with tests for the medium challenge.
  • Created programming_interview/test_hard.py with tests for the hard challenge.

Step 4: ⌨️ Coding

File Instructions Progress
README.md Add a new section describing the programming_interview directory and its purpose. βœ… Commit d8e24e1
programming_interview/easy_challenge.md Create a markdown file with a description of the easy challenge. Mention that the user should write their solution in solution.py. βœ… Commit 819752f
programming_interview/medium_challenge.md Create a markdown file with a description of the medium challenge. Mention that the user should write their solution in solution.py. βœ… Commit 018cdf4
programming_interview/hard_challenge.md Create a markdown file with a description of the hard challenge. Mention that the user should write their solution in solution.py. βœ… Commit 917cf7a
programming_interview/test_easy.py Create a python test file with tests to verify the correctness of the solution for the easy challenge. βœ… Commit 15d7062
programming_interview/test_medium.py Create a python test file with tests to verify the correctness of the solution for the medium challenge. βœ… Commit c8167b6
programming_interview/test_hard.py Create a python test file with tests to verify the correctness of the solution for the hard challenge. βœ… Commit 10c63ee I have finished coding the issue. I am now reviewing it for completeness.

Step 5: πŸ” Code Review

Here are my self-reviews of my changes at sweep/create-programming-interview-challenges.

Here is the 1st review

No changes required. All the files have been implemented correctly without any errors or unimplemented sections. Good job!

I finished incorporating these changes.


To recreate the pull request, or edit the issue title or description.