mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-02-03 18:46:50 +08:00
chore: use iwyu on others/**.cpp
This commit is contained in:
@@ -4,10 +4,8 @@
|
||||
* to both Lower case and Upper case Roman Numeral
|
||||
*/
|
||||
|
||||
#include <cmath>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <iostream>
|
||||
#include <iostream> // for char_traits, basic_ostream, operator<<, basic_os...
|
||||
#include <string> // for basic_string, operator+, allocator, string, oper...
|
||||
|
||||
/** This functions fills a string with character c, n times and returns it
|
||||
* @note This can probably be replace by `memcpy` function.
|
||||
|
||||
@@ -17,9 +17,8 @@
|
||||
* @author [AlternateWalls](https://github.com/AlternateWalls)
|
||||
*/
|
||||
|
||||
#include <cassert> /// for assert
|
||||
#include <cstdint> /// for integral typedefs
|
||||
#include <iostream> /// for IO operations
|
||||
#include <cassert> // for assert
|
||||
#include <cstdint> // for uint64_t
|
||||
|
||||
/*
|
||||
* @brief Contains information for Easter date
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* @brief Read integers from stdin continuously as they are entered without
|
||||
* waiting for the `\n` character
|
||||
*/
|
||||
#include <iostream>
|
||||
#include <iostream> // for char_traits, basic_ostream, basic_ostream::opera...
|
||||
#include <cstdio> // for getchar
|
||||
|
||||
/** Function to read the number from stdin. The function reads input until a non
|
||||
* numeric character is entered.
|
||||
|
||||
@@ -35,11 +35,12 @@
|
||||
* set of steps until the Stack becomes empty or the current becomes NULL. And
|
||||
* return the result array as the inorder traversal of a tree.
|
||||
*/
|
||||
#include <algorithm> /// for `reverse`
|
||||
#include <cassert> /// for `assert`
|
||||
#include <iostream> /// for I/O operations
|
||||
#include <stack> /// for `stack`
|
||||
#include <vector> /// for `vector`
|
||||
#include <stdint.h> // for int64_t
|
||||
#include <algorithm> // for reverse
|
||||
#include <cassert> // for assert
|
||||
#include <iostream> // for basic_ostream, operator<<, char_traits, cout, endl
|
||||
#include <stack> // for stack
|
||||
#include <vector> // for vector
|
||||
|
||||
/**
|
||||
* @namespace others
|
||||
|
||||
@@ -14,11 +14,13 @@
|
||||
* @author [Abhijeet Tiwari](https://github.com/thisabhijeet)
|
||||
*/
|
||||
|
||||
#include <array> /// for std::array
|
||||
#include <cassert> /// for assert
|
||||
#include <climits> /// for INT_MIN value
|
||||
#include <cstdint> /// for integral typedefs
|
||||
#include <iostream> /// for IO operations
|
||||
#include <array> // for array
|
||||
#include <cassert> // for assert
|
||||
#include <climits> // for INT_MIN
|
||||
#include <cstdint> // for int64_t, uint64_t
|
||||
#include <iostream> // for operator<<, basic_ostream, cout
|
||||
#include <cstddef> // for size_t
|
||||
|
||||
/**
|
||||
* @brief Utility function to check the current maximum number
|
||||
* \param arr input array
|
||||
|
||||
@@ -17,9 +17,10 @@
|
||||
* @author [David Leal](https://github.com/Panquesito7)
|
||||
*/
|
||||
|
||||
#include <cassert> /// for assert
|
||||
#include <cmath> /// for std::abs
|
||||
#include <iostream> /// for IO operations
|
||||
#include <bits/std_abs.h> // for abs
|
||||
#include <cassert> // for assert
|
||||
#include <iostream> // for operator<<, basic_ostream, cout
|
||||
#include <stdexcept> // for invalid_argument
|
||||
|
||||
/**
|
||||
* @namespace
|
||||
|
||||
@@ -22,8 +22,9 @@ Steps for Matrix Expo
|
||||
The first element of this matrix is the required result.
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <stdint.h> // for int64_t
|
||||
#include <iostream> // for basic_istream, char_traits, cin, basic_ostream
|
||||
#include <vector> // for vector
|
||||
|
||||
using std::cin;
|
||||
using std::cout;
|
||||
|
||||
@@ -5,14 +5,14 @@
|
||||
*
|
||||
* This program cheats by using the STL library's std::reverse function.
|
||||
*/
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
#include <algorithm> // for reverse
|
||||
#include <iostream> // for operator<<, basic_ostream, cout, basic_istream:...
|
||||
#include <string> // for basic_string, allocator, operator==, string
|
||||
|
||||
#ifdef _MSC_VER
|
||||
// Required to compile std::toString function using MSVC
|
||||
#include <string>
|
||||
#include <string> // for basic_string, allocator, operator==, string
|
||||
#else
|
||||
#include <cstring>
|
||||
#endif
|
||||
|
||||
/** Main function */
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
* @note Implementation is C-type and does not utilize the C++ constructs
|
||||
* @todo implement as a C++ class
|
||||
*/
|
||||
#include <iostream>
|
||||
#include <iostream> // for operator<<, basic_ostream, cout, basic_istream, cin
|
||||
#include <string> // for basic_string, operator>>, string
|
||||
#ifdef _MSC_VER
|
||||
#include <string> // Visual Studio C requires this include
|
||||
#include <string> // for basic_string, operator>>, string
|
||||
#else
|
||||
#include <cstring>
|
||||
#endif
|
||||
|
||||
/** check number */
|
||||
|
||||
@@ -10,11 +10,13 @@
|
||||
* Evaluate the operator and push the result back to the stack
|
||||
* When the expression is ended, the number in the stack is the final answer
|
||||
*/
|
||||
#include <ctype.h> // for isdigit
|
||||
#include <algorithm> // for all_of
|
||||
#include <array> // for std::array
|
||||
#include <array> // for array
|
||||
#include <cassert> // for assert
|
||||
#include <iostream> // for io operations
|
||||
#include <string> // for stof
|
||||
#include <iostream> // for operator<<, basic_ostream, cout
|
||||
#include <string> // for basic_string, char_traits, string, stof
|
||||
#include <cstddef> // for size_t
|
||||
|
||||
/**
|
||||
* @namespace others
|
||||
|
||||
@@ -7,9 +7,10 @@
|
||||
* @see [other
|
||||
* implementation](https://www.nayuki.io/page/smallest-enclosing-circle)
|
||||
*/
|
||||
#include <cmath>
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <cmath> // for sqrt, INFINITY
|
||||
#include <cstddef> // for size_t
|
||||
#include <iostream> // for basic_ostream, char_traits, cout, endl, operator<<
|
||||
#include <vector> // for vector
|
||||
|
||||
/** Define a point */
|
||||
struct Point {
|
||||
|
||||
Reference in New Issue
Block a user