Thursday, April 23, 2020

Algorithms and Data Structure Designs


Programmers must come up with steps to accomplish a specific task, which is also known as an algorithmTasks such as add, remove, insert, sort, and search are all crucial for a programmer to code using programming languages like Java. Time and space are relative to constructing algorithms to achieve the desired task. Time complexity is a function describing the amount of time required to run an algorithm in terms of the size of the input.   Space complexity is a function describing the amount of memory an algorithm takes in terms of the size of input to the algorithm. An algorithm with lesser run time requires more memory (space) and lesser memory requires longer run time. These two concepts are vital to whether the results of your program will finish in a few hours versus a few weeks.


Some algorithms are better than others.  For example, a binary search is better than a linear, because a linear search searches each element until the element is found.  A binary search sorts the elements, then begins the search from the middle to reduce the search space by half. 


Linear Search Animation


Basic code constructs like loops (do, for, while) and flow-control (if-else) statements are common in writing algorithms for structured programs like calculating sales orders or maintaining databases for a company.

The particular data structure chosen completely depends on the frequency of the operation that needs to be performed on the data structure.  One can use a list, stack, tree, graph, or queue in personal or professional programming tasks.  I would apply algorithmic design and data structure techniques in my role as a junior software developer. The team lead has tasked me with developing a Java program that uses a linked list to insert and remove items.  I will utilize the Java syntax and techniques learned while reviewing the Java – The LinkedList Class tutorial.  You can choose to add anything to a list abstract data type (ADT) including sports players, ingredients for a recipe, car makes/models, etc.  The processes of printing, adding, and removing items to said list are simple which does not require any looping.  The simpler the better. 






Happy Coding!


References:

Lysecky, R., Vahid, F., Lysecky, S., & Givargis, T. (2015). Data structures essentials. Retrieved from https://zybooks.zyante.com/#/zybook/DataStructuresEssentialsR25/chapter/1/section/3
Shaffer, C. A. (2013). Data structures and algorithm analysis (Edition 3.2). Retrieved from http://people.cs.vt.edu/~shaffer/Book/JAVA3elatest.pdf

Tutorials Point. (2016). Data Structures and Algorithms Linear Search. Retrieved from https://www.tutorialspoint.com/data_structures_algorithms/linear_search_algorithm.htm

Tutorials Point. (2020). Data Structures and Algorithms Basic Concepts. Retrieved from https://www.tutorialspoint.com/data_structures_algorithms.htm


Wednesday, March 25, 2020

Java for Beginners


If you ever want to dabble in coding, then knowing the Java programming language and platform is necessary.  Java is an object-oriented programming language that makes software development simple.  The Java links below provides definitions one should familiarize themselves with as a prerequisite to writing a program.


Java                                                                        Java 2


It is very important you are aware of your operating system prior to downloading Java.  It is also very important to type the code exactly as it appears pertaining to capital and lowercase letters.  Once you are ready for hands on experience, follow the link below:
Happy Programming!

References:


Java T Point. (n.d.). Java OOPs concepts. Retrieved from http://www.javatpoint.com/java-oops-concepts

Oracle. (2015). The Java tutorials. Retrieved from http://docs.oracle.com/javase/tutorial/index.html

Oracle. (2015). The Java tutorials. Retrieved from https://docs.oracle.com/javase/tutorial/getStarted/index.html

Algorithms and Data Structure Designs

Programmers must come up with steps to accomplish a specific task, which is also known as an algorithm .  Tasks such as add, remove, insert...