problemscpp
A collection of my answers to algorithm problems in c++.
|
#include <leetcode.h>
Public 成员函数 | |
Bank (vector< long long > &balance) | |
Initializes the object with the 0-indexed integer array balance. 更多... | |
bool | deposit (int account, long long money) |
Deposit money dollars into the account numbered account. 更多... | |
bool | transfer (int account1, int account2, long long money) |
Transfers money dollars from the account numbered account1 to the account numbered account2. 更多... | |
bool | withdraw (int account, long long money) |
Withdraw money dollars from the account numbered account. 更多... | |
Private 属性 | |
unordered_map< int, long long > | accounts |
在文件 leetcode.h 第 1781 行定义.
|
explicit |
Initializes the object with the 0-indexed integer array balance.
在文件 leetcode.cpp 第 4645 行定义.
引用了 accounts.
bool leetcode::simple_bank_system::Bank::deposit | ( | int | account, |
long long | money | ||
) |
Deposit money dollars into the account numbered account.
在文件 leetcode.cpp 第 4664 行定义.
引用了 accounts.
bool leetcode::simple_bank_system::Bank::transfer | ( | int | account1, |
int | account2, | ||
long long | money | ||
) |
Transfers money dollars from the account numbered account1 to the account numbered account2.
在文件 leetcode.cpp 第 4652 行定义.
引用了 accounts.
bool leetcode::simple_bank_system::Bank::withdraw | ( | int | account, |
long long | money | ||
) |
Withdraw money dollars from the account numbered account.
在文件 leetcode.cpp 第 4672 行定义.
引用了 accounts.
|
private |
在文件 leetcode.h 第 1782 行定义.
被这些函数引用 Bank(), deposit(), transfer() , 以及 withdraw().