GL Self-Education Tasks | GlobalLogic Ukraine

GL Self-Education Tasks

share

Головна  /  GlobalLogic Education  /  Self-Education  /  GL Self-Education Tasks

Task #1 for algorithmization

Create stack based 0on array/linked list and implement next functions:

  • create – create stack with number of elements;
  • push – add element to stack;
  • pop – get element from stack;
  • capacity – get amount of elements in stack;
  • size – maximum amount of elements.
  • Resize – increase/decrease size of stack.

In case of C++ stack must be implemented as class. In case C stack should be implemented as structure.

Literature: https://en.wikibooks.org/wiki/Data_Structures/Stacks_and_Queues 


Task #2 for language knowledge

Create recursive function which calculates sum of first n element of Fibonacci number.

Literature:

https://en.wikipedia.org/wiki/Fibonacci_number

https://en.wikipedia.org/wiki/Recursion_(computer_science) 


Task #3 for Linux knowledge

Create program which count and print file names is some folder. 

Name of folder should be received as command line argument

Program should start two threads. The first one should only calculate element, the second one should print full path of element.

Literature: http://www.yolinux.com/TUTORIALS/LinuxTutorialPosixThreads.html 


Every program should have a simple command-line interface and help.

Makefile and test data should be provided to every program.

All needed sources, make file and test result should be provided into GIT repo.

Please perform multiple commits to view the process of work.