Skip to content

submitting all problems#58

Open
avishwak wants to merge 1 commit intosuper30admin:mainfrom
avishwak:main
Open

submitting all problems#58
avishwak wants to merge 1 commit intosuper30admin:mainfrom
avishwak:main

Conversation

@avishwak
Copy link

@avishwak avishwak commented Jun 7, 2025

No description provided.

@super30admin
Copy link
Owner

The student's solution demonstrates a good understanding of pandas DataFrame operations across different problems. Here's a detailed evaluation:

  1. Correctness:
  • Problem 1: Correctly demonstrates multiple ways to create a DataFrame from 2D lists.
  • Problem 2: Correctly filters countries based on area and population criteria.
  • Problem 3: Correctly identifies products that are both low fat and recyclable.
  • Problem 4: Correctly finds customers who never ordered using a left merge and filtering.
  1. Time Complexity:
  • Problems 2-4 all involve DataFrame filtering operations which are O(n) where n is the number of rows.
  • The merge operation in Problem 4 is O(n + m) where n and m are the sizes of the DataFrames.
  1. Space Complexity:
  • All solutions create new DataFrames, resulting in O(n) space complexity where n is the size of the input.
  1. Code Quality:
  • Good use of comments explaining the code.
  • Consistent formatting and style.
  • Could improve by adding docstrings to functions explaining their purpose and return values.
  • In Problem 4, the comment about 'left_on' and 'right_on' is helpful but could be more detailed.
  1. Efficiency:
  • All solutions are efficient for their respective problems.
  • No major optimizations needed, though in Problem 4, an alternative approach using ~customers['id'].isin(orders['customerId']) might be slightly more readable.

Areas for Improvement:

  • Add docstrings to functions.
  • Consider alternative approaches for Problem 4 that might be more readable.
  • Could add edge case handling (e.g., empty DataFrames) though the current solutions handle them gracefully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants