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
// MultiplyMatrixes.cpp : This file contains the 'main' function. Program execution begins and ends there. | |
// | |
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
int A[10][10], B[10][10], MULTIPLY[10][10], row_1, col_1, row_2, col_2, i, j, k; |
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
// ReverseIntegers.cpp : This file contains the 'main' function. Program execution begins and ends there. | |
// | |
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
int n, num, temp, reversed = 0; |
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
// Maze.cpp : This file contains the 'main' function. Program execution begins and ends there. | |
// | |
#include <fstream> | |
#include <iostream> | |
#include <sstream> | |
#include <string> | |
#include <vector> | |
#include <algorithm> | |
using namespace std; |
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
// LinearSearch.cpp : This file contains the 'main' function. Program execution begins and ends there. | |
// | |
#include <iostream> | |
using namespace std; | |
int linearSearch(int* arr, int size, int key) | |
{ | |
for (int i = 0; i < size; ++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
// RationalNumbers.cpp : This file contains the 'main' function. Program execution begins and ends there. | |
// | |
#include <iostream> | |
using namespace std; | |
class RationalNumber { | |
int numerator; | |
int denominator; |
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
// EmployeeInheritance.cpp : This file contains the 'main' function. Program execution begins and ends there. | |
// | |
#include <iostream> | |
using namespace std; | |
class Employee { | |
static int ID; | |
string name; |
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
// StackWithExceptions.cpp : This file contains the 'main' function. Program execution begins and ends there. | |
// | |
#include <iostream> | |
using namespace std; | |
class StackOverFlow:exception{}; | |
class StackUnderFlow:exception{}; | |
class Stack { |
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
// IOStreams.cpp : This file contains the 'main' function. Program execution begins and ends there. | |
// | |
#include <iostream> | |
#include <fstream> | |
#include <vector> | |
#include <string> | |
using namespace std; |
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
// SmartPointers.cpp : This file contains the 'main' function. Program execution begins and ends there. | |
// | |
#include <iostream> | |
using namespace std; | |
class Rectangle | |
{ | |
int length; |
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; | |
// Time and Space - O(n) | |
int recursiveSum(int n) { | |
if (n == 0) { | |
return 0; | |
} | |
else { |
OlderNewer