What do you want to save?
Add Code snippet
New code examples
-
C++ 2022-03-27 12:15:21
find the graph is minimal spanig tree or not
#include <iostream> #include <vector> #include <utility> #include <algorithm> using namespace std; const int MAX = 1e4 + 5; int id[MAX], nodes, edges; pair <long long, pair<int, int> > p[MAX]; void initialize() { ... Add solution -
C++ 2022-03-21 17:45:23
worker class c++
#ifndef EMPLOYEE_H #define EMPLOYEE_H #include <string> using namespace std; class Employee { private: string name; // Employee name string number; ... Add solution -
Other 2022-03-17 17:20:02
longest chain of same elemetns in an array
#include<bits/stdc++.h> using namespace std; #define ll long long int main(){ ll n; cin>>n; ll a[n]; for(ll i=0;i<n;++i){ cin>>a[i]; } ll temp=1,ans=1; for (ll i = 1; i < n; i++) { if (a[i] >= a[i - 1]... Add solution -
Python 2022-03-17 11:15:05
python code to c code converter
#include<iostream> // Defining MAX size to 10 #define MAX 10 using namespace std; typedef struct Edge { int source; int destination; int weight; }Edge; void bellman_ford_algo(int nodevertex,Edge edge[],int source_graph,int nodeedge) { int... Add solution -
C++ 2022-03-16 23:40:31
c++ check if odd or even
#include <iostream> using namespace std; int main() { int n; cout << "Enter an integer: "; cin >> n; (n % 2 == 0) ? cout << n << " is even." : cout << n << " is odd.";... Add solution