Skip to content

Emresav/efficient-algorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

efficient-algorithms

This repository includes some challenging algorithms that I developed as a part of Algorithmic Toolbox module on Coursera.

Problem description:

  1. largest_numberCW.cpp task: Compose the largest number out of a set of integers. input: The first line of the input contains an integer n. The second line contains a set of integers out: Output the largest number that can be composed out of these integers challenge: the task is easy whem the integers are only single digits. this algorithm can handle multi-digit integers too.

  2. different_summandsCW.cpp: task: represent a given positive integer n as a sum of as many pairwise distinct positive integers as possible. That is, to find the maximum k such that n can be written as a1 + a2 + ··· + ak where a1 ,..., ak are positive integers and a i ̸= a j for all 1 ≤ i < j ≤ k. input: integer n out: In the first line, output the maximum number k such that n can be represented as a sum of k pairwise distinct positive integers. In the second line, output k pairwise distinct positive integers that sum up to n (if there are many such representations, output any of them).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages