Skip to content

Instantly share code, notes, and snippets.

View Iduoad's full-sized avatar
🫖
Reform

Mohammed Daoudi Iduoad

🫖
Reform
View GitHub Profile
while(watch_onepiece==false)
{
close();
goWatch(onepiece);
comeBack();
}
#include <iostream>
#include <string>
void pay(int employeeId, string employeename, int salary){
//payment function instructions
}
void fire(int employeeId, string employeename){
//firing function instructions
}
void promote(int employeeId, string employeename, int salary){
//hiring function instructions
@Iduoad
Iduoad / CF236A.cpp
Last active November 15, 2017 18:54
//A Better solution thanks to the pre-sorting (Transform & Conquer)
//Time complexity depends on the sorting algorithm complexity: in this case O(nlog(n))
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main(int argc, char const *argv[]) {
string a;
int counter=1;
//inefficient Brute force solution O(n²)
#include <iostream>
#include <string>
using namespace std;
int main(int argc, char const *argv[]) {
string a;
cin >> a;
int counter=a.length(); //set the counter to the length of the the string
for (size_t i = 0; i < a.length(); i++) {
//This a Representation change Solution .. Using the Set Data structure instead of Strings
//the complexity of .insert() method is O(nlog(n)) which equivalent to the previous solution
//but the code is much more elegant and utilize less resources.
#include <iostream>
#include <set>
using namespace std;
int main(int argc, char const *argv[]) {
string a;
set<char> s; //We create our Set
//Problem solution using the stack data structure
#include <iostream>
#include <string>
#include <stack>
using namespace std;
bool match(char o, char c){ //match function it verifies if the open (o) match the closing (c)
if((o=='(' && c==')') ||
(o=='[' && c==']') ||
(o=='{' && c=='}')){
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main(){
int n,a;
vector<int> v;
cin >> n;
for (size_t i = 0; i < n; i++) {
@Iduoad
Iduoad / Ensa_GI_S5.md
Last active December 31, 2018 12:47
Premiere annee Genie Informatique Ensa Kenitra.

Les Modules li ghadi te9raw :

1. Technologies web

Element1: HTML5/CSS3 (Frontend)

  • Chno ghadi tet3ellem:

      - Ghadi tet3elem tssayeb des pages web statique.
    
@Iduoad
Iduoad / ENSA_GM_S5.md
Last active September 13, 2018 01:01
ENSA_GM_S5

Les Modules li ghadi te9raw :

1. Probabilites et statistique

  • Chno ghadi tet3ellem:

      - Ghadi tet3elem tdir des statisques b une variable, deux variables et plusieurs variables.
      - Ghadi tet3elem tdir des calculs de faisabilite (e.g. faisabilite des pieces electroniques)
      - Ghadi t3ref les lois de probabilites o w9tach atsta3mel kol we7da.
    
@Iduoad
Iduoad / S1.md
Last active September 13, 2018 00:48

Les modules li ghat9raw

1. Mecanique du point

  • fin te9ra:

    • le cours dyal M Benbrahim
    • bach tfhm mzn dir la chaine youtube dyal issam
  • Astuces de validation: