You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: DIRECTORY.md
+4
Original file line number
Diff line number
Diff line change
@@ -82,6 +82,7 @@
82
82
83
83
## Divide And Conquer
84
84
*[Karatsuba Algorithm For Fast Multiplication](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/divide_and_conquer/karatsuba_algorithm_for_fast_multiplication.cpp)
*[Searching Of Element In Dynamic Array](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/dynamic_programming/searching_of_element_in_dynamic_array.cpp)
112
113
*[Shortest Common Supersequence](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/dynamic_programming/shortest_common_supersequence.cpp)
* @param setOfCitites represents the city in bit form.\
43
45
* @param city is taken to track the current city movement.
44
46
* @param n is the no of citys .
45
-
* @param dp vector is used to keep a record of state to avoid the recomputation.
46
-
* @returns minimum cost of traversing whole nodes/cities from starting point back to starting point
47
+
* @param dp vector is used to keep a record of state to avoid the
48
+
* recomputation.
49
+
* @returns minimum cost of traversing whole nodes/cities from starting point
50
+
* back to starting point
47
51
*/
48
-
std::uint64_ttravelling_salesman_using_bit_manipulation(std::vector<std::vector<uint32_t>> dist, // dist is the adjacency matrix containing the distance.
49
-
// setOfCities as a bit represent the cities/nodes. Ex: if setOfCities = 2 => 0010(in binary)
50
-
// means representing the city/node B if city/nodes are represented as D->C->B->A.
51
-
std::uint64_t setOfCities,
52
-
std::uint64_t city, // city is taken to track our current city/node movement,where we are currently.
53
-
std::uint64_t n, // n is the no of cities we have.
54
-
std::vector<std::vector<uint32_t>> &dp) //dp is taken to memorize the state to avoid recomputition
0 commit comments