English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Could you give me some simple examples?

2007-03-17 23:35:38 · 3 answers · asked by VIS 1 in Computers & Internet Programming & Design

3 answers

Data structure is a way to handle data by grouping or other way for example array (physical), queue(abstract).
Algorithm is a way to solve a problem (steps to do it), many times Algorithm involves Whit special data structure.
Simple algorithm is given X and Y return the maximum of them:
ask is X >= Y, if so X is the maximum, else Y is the maximum (this is the simples algorithm I can think of)

2007-03-17 23:44:41 · answer #1 · answered by eyal b 4 · 0 0

Data Structure is the type of storage for data to be saved to while algorithms are the methodologies which will determine the way you solve a problem.

2007-03-18 07:21:19 · answer #2 · answered by Coosa 2 · 0 0

data structure is an way data is organized like
struct test
{
int a;
int b;
} assignment
Algorithm is a set of steps to perform a task

2007-03-18 06:50:12 · answer #3 · answered by Anonymous · 0 0

fedest.com, questions and answers