Skip to content
RBurciaPublic

About

Class projects and assignments

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

CS-210-

Class projects and assignments

Assignment #1: Explanation of program using HashMap: The Program using the hashmap has a time complexity of O(n), what this means is that it is taking "n" amount of times to find the target based of the length of the array/ hashmap. This is done in the program by using a single for loop that checks wether the target is in the current index, if not it is mapped onto the hashmap and we move onto the next iteration of the loop. We keep maping and checking until the target is the same as the number on the index.

Assignment #1: Explanation of program using Brute Force: The Program uses a "Brute Force" method that produces a time complexity of O(n^2), what that means is that it uses one for loop to subtract from the target on the index, and uses the second for loop to find a number compares the needed result of the for loop. The reason why its a brute force method is because we are going through the array n^2 to search and compare.

About

Class projects and assignments

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages