Skip to content

Add Solution for Largest element in an array#181

Open
sriram1302 wants to merge 3 commits intoaritrakrbasu:mainfrom
sriram1302:new_test
Open

Add Solution for Largest element in an array#181
sriram1302 wants to merge 3 commits intoaritrakrbasu:mainfrom
sriram1302:new_test

Conversation

@sriram1302
Copy link

This pull request introduces a Python solution to find the largest element in an input array. The modifications are:

  • Added the function largest_element(arr), which returns the maximum value from the input list.
  • Created an equivalent test function test_largest_element() that verifies the correctness of the implementation through a common test case.
  • Applied the Test-Driven Development (TDD) procedure by initially creating a failing test, subsequently coming up with the functional code to pass the test, and finally refactoring the code for readability and maintainability.

This submission meets the requirements outlined in Issue #7 with a simple, tried-and-tested solution that can be integrated within the repository.

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.

1 participant