mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-04-09 13:39:17 +08:00
chore: use iwyu on strings/**.cpp
This commit is contained in:
@@ -42,12 +42,13 @@
|
||||
* @author [Stoycho Kyosev](https://github.com/stoychoX)
|
||||
*/
|
||||
|
||||
#include <cassert> /// for assert
|
||||
#include <climits> /// for CHAR_MAX macro
|
||||
#include <cstring> /// for strlen
|
||||
#include <iostream> /// for IO operations
|
||||
#include <string> /// for std::string
|
||||
#include <vector> /// for std::vector
|
||||
#include <cassert> // for assert
|
||||
#include <climits> // for CHAR_MAX
|
||||
#include <cstring> // for size_t, strlen
|
||||
#include <iostream> // for operator<<, basic_ostream, cout
|
||||
#include <string> // for basic_string, string
|
||||
#include <vector> // for vector
|
||||
#include <algorithm> // for max
|
||||
|
||||
#define APLHABET_SIZE CHAR_MAX ///< number of symbols in the alphabet we use
|
||||
|
||||
|
||||
@@ -2,13 +2,14 @@
|
||||
* @file
|
||||
* @brief String pattern search - brute force
|
||||
*/
|
||||
#include <iostream>
|
||||
#include <iostream> // for operator<<, basic_ostream, char_traits, cout
|
||||
#include <string> // for basic_string, operator==, string, to_string
|
||||
#ifdef _MSC_VER
|
||||
#include <string> // use this for MS Visual C++
|
||||
#include <string> // for basic_string, operator==, string, to_string
|
||||
#else
|
||||
#include <cstring>
|
||||
#include <cstring> // for size_t
|
||||
#endif
|
||||
#include <vector>
|
||||
#include <vector> // for vector, allocator
|
||||
|
||||
namespace string_search {
|
||||
/**
|
||||
|
||||
@@ -4,9 +4,10 @@
|
||||
* @author [Harry Kontakis](https://github.com/ckontakis)
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <unordered_map>
|
||||
#include <cassert>
|
||||
#include <unordered_map> // for unordered_map, _Node_iterator_base, operator!=
|
||||
#include <cassert> // for assert
|
||||
#include <string> // for basic_string, string
|
||||
#include <utility> // for pair, make_pair
|
||||
|
||||
/**
|
||||
* @namespace strings
|
||||
|
||||
@@ -13,10 +13,11 @@
|
||||
* @author [Yancey](https://github.com/Yancey2023)
|
||||
*/
|
||||
|
||||
#include <cassert> /// for assert
|
||||
#include <iostream> /// for IO operations
|
||||
#include <string> /// for std::string
|
||||
#include <vector> /// for std::vector
|
||||
#include <cassert> // for assert
|
||||
#include <cstddef> // for size_t
|
||||
#include <iostream> // for operator<<, basic_ostream, cout
|
||||
#include <string> // for basic_string, string
|
||||
#include <vector> // for vector
|
||||
|
||||
/**
|
||||
* @namespace string_search
|
||||
|
||||
@@ -10,14 +10,15 @@
|
||||
* @author [Riti Kumari](https://github.com/riti2409)
|
||||
*/
|
||||
|
||||
#include <cassert> /// for assert
|
||||
#include <cstdint> /// for integral typedefs
|
||||
#include <iostream> /// for IO operations
|
||||
#include <vector> /// for std::vector STL
|
||||
#include <cassert> // for assert
|
||||
#include <cstdint> // for uint64_t
|
||||
#include <iostream> // for char_traits, basic_ostream, operator<<, cout, endl
|
||||
#include <vector> // for allocator, vector
|
||||
#include <algorithm> // for min
|
||||
#include <string> // for basic_string, operator==, operator+, string
|
||||
#ifdef _MSC_VER
|
||||
#include <string> /// for string (required for MS Visual C++)
|
||||
#include <string> // for basic_string, operator==, operator+, string
|
||||
#else
|
||||
#include <cstring> /// for string
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
* Algorithm](https://en.wikipedia.org/wiki/Rabin–Karp_algorithm) for finding a
|
||||
* pattern within a piece of text with complexity O(n + m)
|
||||
*/
|
||||
#include <cassert>
|
||||
#include <cmath>
|
||||
#include <iostream>
|
||||
#include <stdint.h> // for int64_t
|
||||
#include <cassert> // for assert
|
||||
#include <cmath> // for pow
|
||||
#include <string> // for basic_string, string
|
||||
#ifdef _MSC_VER
|
||||
#include <string> // use this for MS Visucal C++
|
||||
#include <string> // for basic_string, string
|
||||
#else
|
||||
#include <cstring>
|
||||
#endif
|
||||
|
||||
#define PRIME 5 ///< Prime modulus for hash functions
|
||||
|
||||
@@ -11,15 +11,15 @@
|
||||
* @author [Ritika Gupta](https://github.com/RitikaGupta8734)
|
||||
*/
|
||||
|
||||
#include <cstdint> /// for integral typedefs
|
||||
#include <iostream> /// for IO operations
|
||||
#include <cstdint> // for uint64_t
|
||||
#include <algorithm> // for min
|
||||
#include <string> // for basic_string, string, operator+, char_traits
|
||||
#ifdef _MSC_VER
|
||||
#include <string> /// for string (use this for MS Visual C++)
|
||||
#include <string> // for basic_string, string, operator+, char_traits
|
||||
#else
|
||||
#include <cstring> /// for string
|
||||
#endif
|
||||
#include <cassert> /// for assert
|
||||
#include <vector> /// for std::vector
|
||||
#include <cassert> // for assert
|
||||
#include <vector> // for vector, allocator, operator==
|
||||
|
||||
/**
|
||||
* @brief Generate the Z-function for the inputted string.
|
||||
|
||||
Reference in New Issue
Block a user