Skip to content

London | 26-SDC-March | Zobeir Rigi | Sprint 1 | Analyse and Refactor Functions - #204

Open
Zobeir-Rigi wants to merge 5 commits into
CodeYourFuture:mainfrom
Zobeir-Rigi:Analyse-and-Refactor-Functions
Open

London | 26-SDC-March | Zobeir Rigi | Sprint 1 | Analyse and Refactor Functions#204
Zobeir-Rigi wants to merge 5 commits into
CodeYourFuture:mainfrom
Zobeir-Rigi:Analyse-and-Refactor-Functions

Conversation

@Zobeir-Rigi

@Zobeir-RigiZobeir-Rigi commented Jul 5, 2026

Copy link
Copy Markdown
  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Analysed and refactored the functions to improve efficiency, added Big-O complexity explanations, and verified that all tests pass.

@github-actions

This comment has been minimized.

@Zobeir-RigiZobeir-Rigi added 📅 Sprint 1 Assigned during Sprint 1 of this module Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Module-Complexity The name of the module. labels Jul 5, 2026
@github-actions

This comment has been minimized.

@github-actionsgithub-actionsBot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jul 5, 2026
@github-actions

This comment has been minimized.

1 similar comment
@github-actions

This comment has been minimized.

@Zobeir-RigiZobeir-Rigi added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jul 5, 2026
@github-actions

This comment has been minimized.

@github-actionsgithub-actionsBot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jul 5, 2026
@github-actions

This comment has been minimized.

@Zobeir-RigiZobeir-Rigi changed the title London | 26-SDC-March | Zobeir Rigi | Module-Complexity | Sprint 1 | Analyse and Refactor FunctionsLondon | 26-SDC-March | Zobeir Rigi | Module-Complexity | Analyse and Refactor FunctionsJul 5, 2026
@github-actions

This comment has been minimized.

@Zobeir-RigiZobeir-Rigi added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jul 5, 2026
@github-actions

This comment has been minimized.

@github-actionsgithub-actionsBot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jul 5, 2026
@Zobeir-RigiZobeir-Rigi changed the title London | 26-SDC-March | Zobeir Rigi | Module-Complexity | Analyse and Refactor FunctionsLondon | 26-SDC-March | Zobeir Rigi | Sprint 1 | Module-Complexity | Analyse and Refactor FunctionsJul 5, 2026
@github-actions

This comment has been minimized.

@Zobeir-RigiZobeir-Rigi changed the title London | 26-SDC-March | Zobeir Rigi | Sprint 1 | Module-Complexity | Analyse and Refactor FunctionsLondon | 26-SDC-March | Zobeir Rigi | Sprint 1 | Analyse and Refactor FunctionsJul 5, 2026
@Zobeir-RigiZobeir-Rigi added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jul 5, 2026

@cjyuancjyuan left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code looks good.

export const findCommonItems = (firstArray, secondArray) => {
const secondSet = new Set(secondArray);

return [...new Set(firstArray.filter((item) => secondSet.has(item)))];

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Could also take advantage of built-in Set operations such as union and intersect for better performance and simpler code.

@cjyuancjyuan added Complete Volunteer to add when work is complete and all review comments have been addressed. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Jul 9, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CompleteVolunteer to add when work is complete and all review comments have been addressed.Module-ComplexityThe name of the module.📅 Sprint 1Assigned during Sprint 1 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@Zobeir-Rigi@cjyuan