Skip to content

Instantly share code, notes, and snippets.

View Kanav-Arora's full-sized avatar
🏠
Working from home

Kanav Arora Kanav-Arora

🏠
Working from home
View GitHub Profile
@Kanav-Arora
Kanav-Arora / Financify.dbml
Created October 5, 2021 14:27
Code snippet of database structure of Financify.
table stock{
item_id varchar(10)
item_name varchar(25)
gst_slab int
quantity mediumtexttext
@Kanav-Arora
Kanav-Arora / rotate_array.cpp
Created January 11, 2022 17:46
Rotate Array K Times
/*
Space complexity - O(1) in-place
Time Complexity - O(N)
*/
class Solution {
public:
void rotate(vector<int>& nums, int k) {
k = k - (k/nums.size())*nums.size();
reverse(nums, 0,nums.size()-k-1);
@Kanav-Arora
Kanav-Arora / appendKNodes.cpp
Created January 17, 2022 17:12
Append last k nodes of a given linked list in start of list.
/*
Initial list: 1->2->3->4->5->6->null
Append 3 nodes
4->5->6->1->2->3->null
*/
void appendKNodes(Node* &head, int k)
{
Node* temp = head;
for(int i=0; i<length(head)-k-1; i++)
@Kanav-Arora
Kanav-Arora / cp_io.cpp
Created December 31, 2022 10:24
This file contains a template for Competitive Programming with Faster Inputs and Outputs.
#include <bits/stdc++.h>
using namespace std;
void solve()
{
}
int main()
{
@Kanav-Arora
Kanav-Arora / Matplotlib.ipynb
Created July 13, 2023 17:02
Codebank for Matplotlib
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Kanav-Arora
Kanav-Arora / Pandas.ipynb
Created July 13, 2023 17:03
Codebank for Pandas Lib
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Kanav-Arora
Kanav-Arora / Numpy.ipynb
Created July 13, 2023 17:04
Codebank for Numpy
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.