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 <bits/stdc++.h> | |
using namespace std; | |
int n; | |
int dx[] = {1, 1, -1, -1, -2, 2, -2, 2}; | |
int dy[] = {-2, 2, -2, 2, 1, 1, -1, -1}; | |
// Function for checking if the move is valid or not ............. |
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 <bits/stdc++.h> | |
using namespace std; | |
int findMaxOnesMatrixSize(vector<vector<int> > &matrix){ | |
int n = matrix.size(); | |
int m = matrix[0].size(); | |
// Initializing dp matrix with 0 ........ | |
vector<vector<int> > dp(n, vector<int>(m,0)); |
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 <bits/stdc++.h> | |
using namespace std; | |
int findMaxOnesMatrixSize(vector<vector<int> > &matrix){ | |
int n = matrix.size(); | |
int m = matrix[0].size(); | |
int maxOnesMatrixSize = 0; |
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
/* | |
Program Name - Edit Distance | |
Author Name - Abhey Rana | |
Date - 5 December 2017 | |
*/ | |
#include <bits/stdc++.h> | |
using namespace std; | |
int solveEditDistance(string str1, string str2){ |
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
/* | |
Program Name - Edit Distance | |
Author Name - Abhey Rana | |
Date - 6 December 2017 | |
*/ | |
#include <bits/stdc++.h> | |
using namespace std; | |
int len1,len2; |
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 <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <fcntl.h> | |
#include <pthread.h> | |
#include <netinet/in.h> | |
#include <sys/socket.h> | |
#include <sys/types.h> | |
int main(){ |
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
It is an simple implementation of simple client server chat system where once client are connected to server, | |
then they can communicate with each other. | |
The client first needs to connect with the server and can then issue two commands - | |
1. GET - This command fetches the list of client's that are currently connected to server. | |
2. SEND (client number) (message) - SEND followed by client number which can be be used to send the meassage | |
to particular to that particular client number. | |
(please issue the complete send command in one go). | |
To run these program first run ChatServer.c and then run multiple instatnces of ChatServer.c . |