Skip to content

maraPislar/Algorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 

Repository files navigation

Basics in C++

You can find here basic algorithms in C++.

Backtracking

This method is recursive and it is based on 5 functions:

  • int first(int k) - it initialises the new number "k" with 0 ;
  • int next(int k) - increases k and is verified by turn ;
  • int valid(int k) - k is valid <=> conditions ;
  • int is_solution(int k) - final step -> k should be equal to n or less ;
  • void out() - if k meets all of the above, a {1, 2, .., k} string will be printed ;

Graphs

Dynamic programming

Lists

Others

Here I'll put some of my solutions from www.pbinfo.ro. The numebr of the problem will pe specified in the title.

Releases

No releases published

Packages

No packages published

Languages