C++
What is th ...
Site Language: English
Українська
English
Русский
Programming Tests
Login
Sign Up
Programming Tests
Theory
Snippets
Papers
Landing
Android
Prices
FAQ
Cosmo Story
Terms and Conditions
Privacy Policy
Cookies Policy
Send Feedback
What is the complexity of the iterator erase method (const_iterator position) in associative containers?
amortized constant
constant
average constant
the logarithm of the number of vertices
the logarithm of the number of vertices on average
Explanation
Get an explanation when it's available:
Subscribe
iterator
complexity
containers library
Like
Login in
to like
Comment
Login in
to comment
Share
Tweet
Related Content
Для даных итераторов по vector, будет ли ругаться компилятор на какуе-то из отмеченых строк кода? vector<int> vec(3,1); const std::vector<int>::iterator iter = vec.begin(); *iter = 10; //1 ++iter; //2 std::vector<int>::const_iterator iter2 = vec.begin(); *iter2 = 10;//3 ++iter2; //4
Каким образом лучше хранить массив булевских значений, используя следующие контейнеры из STL для максимального быстродействия?
В каких из перечисленных контейнеров сложность поиска составляет O(n)?
Куда указывает итератор ptr после выполнения следующих двух строк кода? vector<int> vec(100); vector<int>::iterator ptr=vec.end();
Каков будет результат выполнения следующего кода? #include <iostream> #include <map> #include <cstddef> using namespace std; int main() { multimap<size_t, size_t> mm; for(size_t i=1; i!=10; ++i) mm[i]=i*i; for(map<size_t, size_t>::reverse_iterator rit=mm.rbegin(); rit != mm.rend(); ++rit) cout << rit->second << ' '; }
C
++
Quiz
Login to learn C++
or
Read more about
C++ Quizzes
Follow CodeGalaxy
Mobile Beta
Send Feedback
Keep exploring
C++ quizzes
int main() { const int* i = int(); // 1 int const* j = int(); //2 int* const k = int(); //3 int* l(); //4 ++i; //5 ++j; //6 ++k; //7 ++*k; //8 ++l; //9 } Откомпилируется ли такой код? Если нет, то в каких строчках будут ошибки компиляции? После стандарта C++14.
Какой результат работы программы? #include <iostream> using namespace std; void f(double) { cout<<"f1"<<endl; } void f(const int ) { cout<<"f2"<<endl; } void f( int & ) { cout<<"f3"<<endl; } void main(void) { int n = 1; double b = 2; f(n); f(b); }
#include <iostream> using namespace std; int &test() { static int a = 3; return a; } int main() { ++++++test(); cout << test() << endl; return 0; } Что выведет cout?
При истинности какого из приведенных высказываний имеет смысл вычитание указателей?
Какое ключевое слово используется для описания пространства имен?
В чем разница между X x; и X x(); ?
Sign Up Now
or
Subscribe for future quizzes
Login in to like
Login in to comment