1/23
SAS 2,3
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
They frame the organization of information so that machines and humans can better understand it.
Data Structures
They are a step by step instructions that are used to solve the problem of a task
Algorithms
The common ways to organize the data
Lists
Array
Stacks
Queue
This contains elements of one particular data type
List
This is a data structure where the elements are identified by one or more
indices
Array
This way of organizing data follows the last in first out rule
Stack
Primitive data types include
Integer
floating-point (float, double)
Boolean (bool)
Character (char)
Byte
These data types are predefined (already defined) in Java.
Primitive data types
These types are created by the programmer and is not defined by Java (except for String ).
Non-primitive data types
They frame the organization of information so that machines and humans can better understand it.
Data Structures
what 2 methods can you use to convert to string to java
String.valueOf() and integer.toString()
what are the best 2 languages used of learning data structure
C++ and Java
what is the difference between C++ and java
c++ is for level programming whilw java is for high level programming
This is a way of converting data from one data type to another data type. This process of data conversion is also known as type conversion or type coercion.
TypeCasting
Characteristics of algorithm
Algorithm should be Unambiguous
algorithm should have 0 or more inputs
algorithm should have 1 or more outputs
algorithm should be feasible with the available resources
algorithm should be independent
This Math.abs(x) returns what
Returns the absolute (positive) value of x
This Math.random() returns what
Returns a random number between 0.0(inclusive), and 1.0 (exclusive)
This describes the complexity of a code using algebraic terms
Big O notations
This gives us an idea of how complex the algorithm is with respect to the input size
O
This answers the questions of how many resources such as disk space or time
Algorithm analysis
This algorithm means it grows directly proportional to the size of the inputs
Linear time algorithm
These are a block of code that runs only when it is called
Method
These are methods that are used to perform a particular task and action
Function
This way of organizing data follows the first in first out format
Queue