Skip to content

Feat/Adds a getConcatenation and findWordsContaining method in Java and TS #388

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

Dlafferty251
Copy link
Contributor

Hello inside this pull request you will find both Java and TS methods for getConcatenation and findWordsContaining method. You should see them inside Lesson11.java and Lesson11.ts Thank you!

return ans;
}

public static void main(String[] args) {
Copy link
Contributor

Choose a reason for hiding this comment

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

You should not have this here. What purpose does it serve?


// Runs a loop that will iterate through each character in the word.
for (int i = 0; i < words.length; i++) {
if (words[i].indexOf(x) != -1) { // will check to see if 'x' exists inside of the word
Copy link
Contributor

Choose a reason for hiding this comment

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

These comments should be on the line above the code it annotates, not after the line.

export function getConcatenation(nums: number[]): number[] {
return [];
const n = nums.length; //Creates a variable named n that is the length of nums
Copy link
Contributor

Choose a reason for hiding this comment

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

Need to fix code formatting here, looks wrong.

export function findWordsContaining(words: string[], x: string): number[] {
return [];
const elListo: number[] = [] //creates a new array named elListo
Copy link
Contributor

Choose a reason for hiding this comment

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

What is elListo? Fix variable name please to something more clear.

}


//Test Cases
Copy link
Contributor

Choose a reason for hiding this comment

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

Nope, remove this and the stuff below. This code should be in formal test files.

@Dlafferty251
Copy link
Contributor Author

Hello Anthony, I requested review because, I have put all the comments above the code they belong to, removed my useless main methods, and made variables more clear. Thank you!

@Dlafferty251 Dlafferty251 deleted the Homework-11-LeetCode branch April 3, 2025 12:43
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