Skip to content

Mohamad Bader AA#13

Open
noneeeed wants to merge 4 commits intoHackYourAssignment:mainfrom
noneeeed:main
Open

Mohamad Bader AA#13
noneeeed wants to merge 4 commits intoHackYourAssignment:mainfrom
noneeeed:main

Conversation

@noneeeed
Copy link

No description provided.

@sycons sycons self-assigned this Feb 14, 2026
Copy link

@sycons sycons left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done! You seem to have a good grasp on algorithms and using them in problem solving

  • Count values above a threshold ✅
  • Write Unit Tests ✅
  • Debug and Fix the Logic ✅
  • Algorithm performance experiment ✅


test("should return a single number if the array has only one element", () => {
expect(calculateAverage([5])).toBe(5);
});
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another possible test case is null as input.

console.log(countVowels("Hello World")); // Output: 3
console.log(countVowels("JavaScript")); // Output: 3
console.log(countVowels("")); // returns 0
console.log(countVowels("AEIOU")); // Output: 5
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good test. Both the all vowels and uppercase get tested at the same time ⭐


const bigFirstArray = generateBigArray(1000);
const bigSecondArray = generateBigArray(100000);
const bigThirdArray = generateBigArray(10000000);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Array for 1M is missing.

// Example: generateBigArray(1000000) will create an array of 1 million numbers. No newline at end of file
import generateBigArray from "./bigArray.js";

const bigFirstArray = generateBigArray(1000);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A more descriptive name might be better. E.g. bigArray1k

@sycons sycons added Reviewed This assignment has been reivewed by a mentor and a feedback has been provided and removed To review labels Feb 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Reviewed This assignment has been reivewed by a mentor and a feedback has been provided

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants