Skip to content

feat: modifies lesson11.java to implement code for the leet code challenge prompt provided via url -Joseph Caballero #363

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

Josephcabs
Copy link
Contributor

Made changes to the lesson11.java file to implement code for the leet code challenge prompts given to us.

const num: number[] = [];
for (const word of words) {
const wordArr = word.split('');
const containsX = wordArr.some((char) => x.includes(char));
Copy link
Contributor

Choose a reason for hiding this comment

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

Could have just done wordArr.some(char => x === char) or as I demonstrated in class, word.indexOf(x) > -1.

@Josephcabs Josephcabs deleted the feature/lesson_11 branch November 24, 2024 21:14
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.

2 participants