I will be making a milestone for 100 proper developer based algorithm written with no daily goals instead a half yearly or a yearly goal and write about how I approached the problem.
##Logs
-
enemy_generator: It can create enemy ship as the EnemyshipFactory's object is created which has gamers level as argument to creat enemy of his game level. It uses factory pattern to do so and enemy ship is created at runtime. Desired common properties of enemy can be added in the Enemyship abstract class which is inherited to create enemy by passing appropriate parameters.
-
stock_observer: The subject maintains list of dependents who are to be notified about the stock changes by keeping an observer to track the changes in the depentents. There can be multiple dependents who want different stock changes. It uses observer design pattern.
- singleton: It implements singleton design pattern in class to have only one instance.
- atm_machine: It explains the different states the atm machine could be in and instructs user according to his action. User can insert card, insert pin, withdraw cash and eject card. It gives a message if atm is out of money.
- animal_property: It can add common abilities of animals as function with varying implementation and can be useful to refactor the code when there are large no of animals implementing the same function signature but varying implementation.
- letter_count: It can count the no of times a letter is used in the array of strings supplied.
- array_flattener: It converts multi-dimensional array to one-dimensional array by concatination of array returned from recursion in multi-dimensional array.
- two sum: Given an array of integers, return indixes of the two numbers such that they add up to a specific target.You may assume that each input would have exactly one solution, and you may not use the same element twice.
- log processor: prints the number of errors and warnings as per the date in the log.
- common elements: Prints the number of common elements in two given array.