mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-11-27 14:13:30 +08:00
formatting source-code for 153fb7b8a5
This commit is contained in:
@@ -9,8 +9,7 @@ using std::min;
|
||||
using std::vector;
|
||||
|
||||
int minimax(int depth, int node_index, bool is_max, vector<int> scores,
|
||||
int height)
|
||||
{
|
||||
int height) {
|
||||
if (depth == height)
|
||||
return scores[node_index];
|
||||
|
||||
@@ -20,8 +19,7 @@ int minimax(int depth, int node_index, bool is_max, vector<int> scores,
|
||||
return is_max ? max(v1, v2) : min(v1, v2);
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
int main() {
|
||||
vector<int> scores = {90, 23, 6, 33, 21, 65, 123, 34423};
|
||||
int height = log2(scores.size());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user