Skip to content

This is an implementation of the Sub Set Sum Backtracking algorithm in C. The algorithm is used to find a subset of a given set of numbers that adds up to a given sum. The algorithm is implemented using backtracking.

License

Notifications You must be signed in to change notification settings

BaseMax/SubSetSumBacktracking

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sub Set Sum Backtracking

This is an implementation of the Sub Set Sum Backtracking algorithm in C. The algorithm is used to find a subset of a given set of numbers that adds up to a given sum. The algorithm is implemented using backtracking.

Usage

To compile the program, run the following command:

gcc -o subsetsum subsetsum.c

To run the program, run the following command:

./subsetsum

Example

Enter the number of elements: 5
Enter the elements: 1 2 3 4 5
Enter the sum: 10
The subset is: 1 2 3 4

The program will print the subset of numbers that add up to the given sum.

License

This project is licensed under the GPL-3 License - see the LICENSE file for details

© Copyright (c) 2022 Max Base

About

This is an implementation of the Sub Set Sum Backtracking algorithm in C. The algorithm is used to find a subset of a given set of numbers that adds up to a given sum. The algorithm is implemented using backtracking.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published