Updates May 02 2020


posted on May 2, 2020, 3:13 p.m.

The Changelog

We are back with another notable update. Aside from squashing numerous bugs, these are the new features that have been introduced:

  • Contest administrators can restrict the users from rejoining the live contest if the student leaves contest midway. An alert will be shown for such contest before leaving. So please be sure about the decision.

Comments


  • 0
    Amit_51  commented on Dec. 13, 2023, 12:16 p.m.

    case 3: if (!myStack.empty()) { cout << "Popped element: " << myStack.top() << endl; myStack.pop(); } else { cout << "Stack is empty, nothing to pop.\n"; } break; case 4: printStack(myStack); break; case 5: printVectorDetails(myVector); break; case 6: cout << "Exiting program.\n"; return 0

    void printStack(stack<int>& s) { if (s.empty()) { cout << "Stack is empty.\n"; return; }

    cout << "Stack elements: ";
    stack<int> temp = s;
    while (!temp.empty()) {
        cout << temp.top() << " ";
        temp.pop();
    }
    cout << endl;

    }

    void printVectorDetails(const vector<int>& v) { cout << "Vector capacity: " << v.capacity() << endl; cout << "Vector size: " << v.size() << endl;

    if (v.empty()) {
        cout << "Vector elements: ";
    } else {
        cout << "Vector elements: ";
        for (const auto& element : v) {
            cout << element << " ";
        }
    }
    cout << endl;

    }

    void enterElementsToStack(stack<int>& stk) { int numElements; cout << "Enter the number of elements for the stack: "; cin >> numElements;

    cout << "Enter the elements for the stack:\n";
    for (int i = 0; i < numElements; ++i) {
        int element;
        cin >> element;
        stk.push(element);
    }

    }

    void enterElementsToVector(vector<int>& vec) { int numElements; cout << "Enter the number of elements for the vector: "; cin >> numElements;

    cout << "Enter the elements for the vector:\n";
    for (int i = 0; i < numElements; ++i) {
        int element;
        cin >> element;
        vec.push_back(element);
    }

    }


  • 0
    24kayush  commented on Dec. 8, 2023, 2:50 p.m. edit 4

    ..