This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
#include <algorithm> | |
#include <cmath> | |
#define INF 9999999 | |
#define MAX 1000000 | |
typedef long long ll; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <queue> | |
#include <vector> | |
#include <string.h> | |
vector<vector<int> > graph; | |
void bfs(int src){ | |
bool visited[1000]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @Author Mehdi Maick | |
* | |
*/ | |
import java.util.*; | |
import java.io.*; | |
public class TheBestPlayer{ | |
static class Fan implements Comparable<Fan>{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.algorithms; | |
/** | |
* @Author Mehdi Maick | |
* Created on 03/10/2016. | |
*/ | |
import java.util.*; | |
import java.io.*; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.algorithms; | |
/** | |
* @Author Mehdi Maick | |
* Created on 29/09/2016. | |
*/ | |
import java.util.*; | |
import java.io.*; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.problems; | |
/** | |
* @Author Mehdi Maick | |
* | |
*/ | |
import java.io.*; | |
import java.util.Arrays; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
#include <vector> | |
#include <list> | |
#include <map> | |
#include <set> | |
#include <deque> | |
#include <stack> | |
#include <bitset> | |
#include <algorithm> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package problems; | |
/** | |
* @Author Mehdi Maick | |
* Created on 30/10/2016. | |
*/ | |
import java.util.*; | |
import java.io.*; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// LinkedList.cpp.cpp | |
// McpcTraining | |
// | |
// Created by mehdi MAC on 23/09/2016. | |
// Copyright © 2016 mehdi MAC. All rights reserved. | |
// | |
#include <iostream> | |
#include <string> | |
#include <vector> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String a = "MyString"; | |
String b = "MyOtherString"; | |
a = a + b; // a new String has been created here | |
String s = a.substring(1); // the "a" string is not modified a new String Object is created every single time | |
// we do this kind of operations |