Programmers

 Lesson 1

  1. May be I need to read Donald Knuth books about algorithm ... or may be not;
  2. Algorithm is solutions of the task, what isn't perfect each time;
  3. Clear task can provide effective solution, real tasks ins't like mathematics often;
  4. Possible to do some changes in the task if it'll work equal also. Task is important here, have priority over on the execution speed or algorithm;

Lesson 2

  1. Data type is important as base to determine algorithm speed. Example: different between List and Array in the C#. To use Array need allow more conditions but we can get better application speed;
  2. Algorithm difficulty it's how many actions need to do for the result;
  3. Typical difficulty at the graph under the list;
  4. If we are decrease difficult without lose result, it's so good;
  5. It's important each time if I need to do any algorithm;
  6. It's not fully because CPU/GPU have individual methods what impossible to divide and its measure of them speed and named FLOPS;
  7. Better to know how many FLOPS I need to each algorithm for better compare various algorithm;


Lesson 3

  1. " What will I use as language?" ... "What we know!" ... "Ok!" ... Because we shell do what possible on all languages ... 
  2. We are have list of numeric ... 
  3. Need to sort it ...
  4. From the left to the right: do it at minimum numbers of action, what better in the FLOPS measure;
  5. Any sort it's real many searching to do order what equal to the term what we want by single item;
  6. Search is compare item with original;
  7. Completed sort is all equal term what we are need;
  8. Code: ... best sorting is coming ... or possible to do term or rule what I want to get it of one, maybe not full, iteration ... or search in the Google best algorithm ... or ... think that it's unlimited list of numeric what can increase each time ... ;

Lesson 4

  1. Bubble sort is ... more artistic method what public sources not strict determine at first, also not in the Boot Camp ... ; //wiki
  2. It's present as only code on various languages; //wiki
  3. We are watch on the c#;
  4. Code, also experience to search job at sometimes, if I work or not, to increase ability ... ;
  5. To do sort need divide it to many simple search requests what can provide result ... 
  6. Also possible what need to do changes in the memory, because we can't get result of single request or changes  is apply to the base data list or array;
  7. Example:
Console.WriteLine("Set array len: "); int n = Convert.ToInt32(Console.ReadLine());
int[] array = new int[n]; for (int i = 0; i < n; i++) { Console.Write("Input values: "); array[i] = Convert.ToInt32(Console.ReadLine()); }
Console.WriteLine("We are have: [" + string.Join(", ", array) + "]"); Console.WriteLine();
// many simple select requests or searching also, to get result for (int i = 0; i < n; i++) { for (int j = 0; j < n - 1; j++) { if (array[j] > array[j + 1]) { int temp = array[j]; array[j] = array[j + 1]; array[j + 1] = temp; } } Console.WriteLine(i + "[" + string.Join(", ", array) + "]"); }

 

Lesson 5

  1. Dot.Net use quick sort is into the Array.sort();
  2. It works on the recursion;
  3. Code ... 
  4. arr = {1, 0, -6, 2, 5, 3, 2}
    1. pivot = arr[6]  (base element)
    2. Move all what < "pivot" in the left side of "pivot"
    3. Move all what > "pivot" in the right side of "pivot"
    4. Recall it for left and right sub-arrays ... 
    5. Repeat while we can set pivot, divide to sub-arrays and sort it ... 

Lesson 6

  1. How to evaluate any algorithm: memory size to execution, time of execution;
  2. BenchmarkDotNet is solution to calculate how it's works. Show previous variable and some more, after many executions;
  3. On practice measure from the lesson 2 don't work accuracy, because CPU, memory or release (recursion) can change base terms about execution time or memory size. Old terms from mathematics don't work accuracy ... . But balance what they set are saved;
  4. It's sufficient to choose between algorithms, but isn't sufficient to do conclusion if we have strict requirement to execution time in the tasks;