M

@MrRogueKnight

floyd_warshall_algorithm

C++
3 months ago
#include <iostream> #include <iomanip> using namespace std; #define V 5 #define INF 99999 // Function to print matrix void printMatrix(int matrix[V][V]) { for (int i = 0; i < V; i++) {

SQL_Lab_10_Transactions_ACID

MySQL
3 months ago
-- ============================================================ -- SQL Lab 10: Advanced Transactions (ACID Properties) -- ============================================================ -- Setup DROP TABLE IF EXISTS students; CREATE TABLE students (

Coin Change Problem (Minimum Coins)

C++
4 months ago
/* Ques.2: Given n values of coin denominations denoted as d = {d1, d2, d3, ..., dn} and an amount A that needs to be covered by selecting the minimum number of coins, considering the coin denominations given in set d. In order to cover the amount

0/1 Knapsack Problem

C++
4 months ago
/* Ques.1: Given n objects of different weights, denoted by the set w = {w1, w2, w3, ..., wn} and respective profit values denoted by the set p = {p1, p2, p3, ..., pn}. Implement an efficient algorithm to select the objects from set 'w' for fillin

SQL Lab - 9: SAVEPOINT & Partial Rollback

MySQL
4 months ago
-- ============================================ -- SQL Lab - 9: SAVEPOINT & Partial Rollback -- Student: Prashant Ranjan -- Roll Number: 24MC3035 -- Platform: mycompiler.io (MySQL) -- Topic: SAVEPOINT, ROLLBACK TO SAVEPOINT, Partial Rollback -- ====

SQL Lab - 8: Basic Transactions

MySQL
4 months ago
-- ============================================ -- SQL Lab - 8: Basic Transactions -- Student: Prashant Ranjan -- Roll Number: 24MC3035 -- Platform: mycompiler.io (MySQL) -- ============================================ -- ==========================

SQL Lab - 7: Constraints, Views, NULL, CASE, Set Operations

MySQL
4 months ago
-- ============================================ -- SQL Lab - 7: Constraints, Views, NULL, CASE, Set Operations -- Student: Prashant Ranjan -- Roll Number: 24MC3035 -- Platform: mycompiler.io (MySQL) -- ============================================ -

SQL Lab - 6: Subqueries and Relational Division

MySQL
4 months ago
-- ============================================ -- SQL Lab - 6: Subqueries and Relational Division -- Student: Prashant Ranjan -- Roll Number: 24MC3035 -- Platform: mycompiler.io (MySQL) -- Concepts: IN, NOT IN, EXISTS, NOT EXISTS, Relational Divisi

SQL Lab - 5: JOIN Operations

MySQL
4 months ago
-- ============================================ -- SQL Lab - 5: JOIN Operations -- Student: Prashant Ranjan -- Roll Number: 24MC3035 -- Platform: mycompiler.io (MySQL) -- ============================================ -- =============================

SQL Practice Lab (1 - 4): Subqueries with Aggregate Functions

MySQL
4 months ago
-- ============================================ -- SQL Practice Lab: Subqueries -- Student: Prashant Ranjan -- Roll Number: 24MC3035 -- Platform: mycompiler.io (MySQL) -- Topic: Subqueries with Aggregate Functions -- ================================

SQL Lab - 4: ALTER, GROUP BY, and HAVING

MySQL
4 months ago
-- ============================================ -- SQL Lab - 4: ALTER, GROUP BY, and HAVING -- Student: Prashant Ranjan -- Roll Number: 24MC3035 -- Platform: mycompiler.io (MySQL) -- ============================================ -- =================

SQL Lab - 3: Data Manipulation Language (DML)

MySQL
4 months ago
-- ============================================ -- SQL Lab - 3: Data Manipulation Language (DML) -- Student: Prashant Ranjan -- Roll Number: 24MC3035 -- Platform: mycompiler.io (MySQL) -- ============================================ -- ============

SQL Lab - 2: DDL and Basic DQL

MySQL
4 months ago
-- ============================================ -- SQL Lab - 2: DDL and Basic DQL -- Student: Prashant Ranjan -- Roll Number: 24MC3035 -- Platform: mycompiler.io (MySQL) -- ============================================ -- ===========================

Dynamic Programming – Longest Common Subsequence

C++
4 months ago
/* To implement an efficient Dynamic Programming algorithm to find the Longest Common Subsequence (LCS) of two given strings. Given two strings: X = "abade" Y = "bade" Find the Longest Common Subsequence (LCS) and its length. Algorithm Create a DP

Questions MATLAB

Octave
1 year ago
%%-----------------Problem 1: True/False Questions----------------- % 1. State whether the following statements are True or False: % (a) Indentation is required in MATLAB to define code blocks. disp('1(a) False - Indentation is optional but recommen

Assignment 7 : MATLAB

Octave
1 year ago
% Problem 1: Single ODE using Euler Method % Question: % Consider the initial value problem: % dy/dt = −2*t*y^2, y(t=0)=1 % dt/dy = −2*t*y^2, y(t=0)=1 % Write MATLAB code to compute y(10) using Euler method with Δt=0.2 % Problem 1: Solve dy/dt =

Assignment 8 : MATLAB

Octave
1 year ago
%% % Problem 1: Linear Regression clc; clear; % (i) Data input and linear regression x = [1 2 3 4 5]'; y = [2.1 2.9 3.7 4.1 5.0]'; % Construct design matrix X = [ones(size(x)), x];

Assignment 6 : MATLAB

Octave
1 year ago
%% Q1. A factorial is the product of all the integers from 1 to N. In Matlab, find the Factorial for N = 5. N = 5; fact = 1; for k = 1:N fact = fact * k; end disp(fact); % Output: 120 %% Q2. Use a for loop to create a vector containing the fir

Assignment 5: MATLAB

Octave
1 year ago
%---------------------------------------------------------------------------------------------------------------------- %% Question 1 % Given two vectors x and y % x: 0 to 15π with spacing π/100 % y: 0 to 12 with spacing π/10 diary question1; disp(

Assignment 4: MATLAB

Octave
1 year ago
%---------------------------------------------------------------------------------------------------------------------- %% Question 1: Plot y = sin(x) with labels x = 0:0.1*pi:2*pi; y = sin(x); figure; plot(x, y); title('Plot of y = sin(x)'); xlabel