kelvins / algorithms-and-data-structures

:abacus: Algorithms and Data Structures in several Programming Languages
MIT License
1.05k stars 264 forks source link

added iterative linear search in java #316

Closed pluto-tofu closed 12 months ago

pluto-tofu commented 12 months ago

Description

Added iterative linear search in Java, which searches for an element in an array using a for loop and returns the index if element is found, else it returns -1.

pluto-tofu commented 12 months ago

@kelvins Could you please review this code, if this is validated by you I will update the Readme file too.

pluto-tofu commented 12 months ago

could you please approve the workflows, I tried to fix the formatting according to the google java format and have committed the changes.

kelvins commented 12 months ago

Nice, @pluto-tofu could you please add the link to the README file?

pluto-tofu commented 12 months ago

@kelvins I have updated the readme , but I am still getting 2023-10-24 16:13:47 [ERROR] Found errors in [google-java-format] linter! 2023-10-24 16:13:47 [ERROR] Error code: 1. Command output: in the Lint Checker test. Could you please help me to resolve this?

pluto-tofu commented 12 months ago

@kelvins I have tried to fix the formatting again, could you please run the tests.

pluto-tofu commented 12 months ago

@kelvins Sorry but the test is still failing due to the same reason, I have used black to format python files in the past but I'm not able to pinpoint what is wrong in this case even though I have formatted the file correctly.

kelvins commented 12 months ago

@kelvins Sorry but the test is still failing due to the same reason, I have used black to format python files in the past but I'm not able to pinpoint what is wrong in this case even though I have formatted the file correctly.

No worries, I'll try to fix it.