This file contains 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> | |
using namespace std; | |
int main() | |
{ | |
int n,r,c; | |
cin>>n; | |
//first line |
This file contains 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
//ALI | |
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
int trial=0,n,x; // trial -> no. of trial n -> no. of TA's x -> amount of money |
This file contains 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.h> | |
using namespace std; | |
int numPal(char s[1000]) | |
{ | |
int ans = 0; | |
//odd loop |
This file contains 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> | |
using namespace std; | |
char digToChar(int n) | |
{ | |
return n + 'a' - 1; | |
} | |
void stringCodes(char inp[], int be, char ansSoFar[], int i) |
This file contains 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> | |
using namespace std; | |
class Node{ | |
public: | |
int data; | |
Node* next; | |
Node(int x) |
This file contains 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> | |
using namespace std; | |
//Blueprint for our NODE | |
class Node{ | |
public: | |
int data; | |
Node* next; | |
// ctor1 |
This file contains 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> | |
using namespace std; | |
class Node{ | |
public: | |
long data; | |
Node* next; | |
Node(long x) |
This file contains 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> | |
using namespace std; | |
int main() | |
{ | |
int n; | |
cin>>n; | |
//TOP |
This file contains 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> | |
using namespace std; | |
void makeArray(int* A, int n) | |
{ | |
for(int i = 0 ; i < n ; i++) | |
cin>>A[i]; | |
return; | |
} |
This file contains 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
public int centeredAverage(int[] nums) { | |
int max = nums[0]; | |
int min = nums[0]; | |
int countMax = 0, countMin = 0; | |
for (int i = 0; i < nums.length; i++) { | |
if (nums[i] >= max) { | |
max = nums[i]; |
OlderNewer