Skip to content

Instantly share code, notes, and snippets.

View SharkFishDeveloper's full-sized avatar

Shahzeb_Aktr SharkFishDeveloper

View GitHub Profile
@SharkFishDeveloper
SharkFishDeveloper / all_config.txt
Created May 1, 2026 10:33
Resident evil 2 config
re2_config.ini
[Render]
PCTargetAPIFallback=Disable
Capability=DirectX12
TargetPlatform=DirectX12
re2_config_default.ini
[RenderConfig]
PCDXver=DirectX12
PCColorSpace=0
@SharkFishDeveloper
SharkFishDeveloper / topo_sort_both(dfs,bfs).cpp
Created November 4, 2025 17:33
Topo Sort (Both DFS and BFS)
// Same as DFS(stack + vis<vector>)
// DFS approach
class Solution {
public:
void dfs(int i, vector<int> adj[],vector<int> &vis,stack<int> &s){
vis[i] = 1;
for(int x:adj[i]){
if(vis[x] == 0)dfs(x,adj,vis,s);
}
s.push(i); // <- This is the only change that is extra, apart from that it is DFS
@SharkFishDeveloper
SharkFishDeveloper / DFS.cpp
Created August 15, 2025 19:55
DFS of graph
class Solution {
public:
vector<int> dfs(vector<vector<int>>& adj) {
stack<int> s;
vector<int> ans;
vector<int> vis(adj.size(),-1);
s.push(0);
while(!s.empty()){
int node = s.top();
s.pop();

Summary of Financial Statements

1. Income Statement

  • Shows the company’s revenues, expenses, and profit/loss over a specific period (monthly, quarterly, yearly).
  • Key elements:
    • Sales/Revenue – Total earnings from business activities.
    • Cost of Goods Sold (COGS) – Direct costs of producing goods/services.
    • Operating Expenses – Administrative, selling, and marketing costs.
    • Earnings Before Interest and Taxes (EBIT) – Operating profit.
  • Net Profit – Final profit after deducting interest and taxes.
#include<bits/stdc++.h>
using namespace std;
struct Items{
int weight;
int profit;
Items(int w,int p){
this->weight = w;
this->profit = p;
}
#include<bits/stdc++.h>
using namespace std;
bool isSafe(int node, int color, vector<vector<int>> &adjacencyMatrix, vector<int> &vertexColors){
for(int i =0;i < adjacencyMatrix.size();i++){
if(adjacencyMatrix[node][i] == 1 && vertexColors[i] == color){
return false;
}
}
return true;
#include<bits/stdc++.h>
using namespace std;
void subSequence(int nums[], int index, int target, vector<int>& current, vector<vector<int>>& result, vector<vector<int>>& dp) {
if(target == 0){
result.push_back(current);
return;
}
if(index == 0) {
#include<bits/stdc++.h>
using namespace std;
bool subSequence(int nums[],int index,int target,int &count,vector<vector<int>> &dp){
if(target == 0){
count++;
return true;
}
else if(index == 0){
if(nums[index] == target){
#include<bits/stdc++.h>
using namespace std;
bool bfs(vector<vector<int>> &graph,int s,int t,vector<int> &parent){
vector<int> vis(graph.size());
queue<int> q;
vis[s] = 1;
q.push(s);
parent[s] = -1;
while(!q.empty()){