Skip to content

Instantly share code, notes, and snippets.

View singaltanmay's full-sized avatar
🧁

Tanmay Singal singaltanmay

🧁
View GitHub Profile
// This is an implementation of Linear Search and Binary Search algorithms in C
#include <stdio.h>
int LinearSearch(int query, int input[], int array_size);
int BinarySearch(int query, int input[], int array_size);
int main() {
int array_size = 0;
#include <stdio.h>
#include <stdlib.h>
struct node {
int data;
struct node *next;
};
int size_of_list = 0;
struct node *head;
#include <stdio.h>
#include <stdlib.h>
struct node {
struct node *previous;
int data;
struct node *next;
};
int size_of_list = 0;
#include <stdio.h>
#include <stdlib.h>
struct node {
int data;
struct node *next;
};
int size_of_list = 0;
struct node *head;
#include <stdio.h>
#include <stdlib.h>
struct node {
int data;
struct node *next;
};
int size_of_queue = 0;
struct node *head = NULL;
@singaltanmay
singaltanmay / ExcelReader.java
Created October 12, 2018 16:23
Reads and interprets the input excel file and extracts meaningful data from it.
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import java.io.*;
public class reader {
/* Path of the .xls spreadsheet*/
#include<stdio.h>
struct node {
int row, col, value;
};
int main() {
int col, row;
printf("Enter no of Col = ");
scanf("%d", &col);
#include <iostream>
#include <conio>
#include <string.h>
class xyz {
char str[40];
public:
@singaltanmay
singaltanmay / ADA_Lab_Sorting_Algo.c
Last active August 18, 2019 15:43
A time complexity analysis of various algorithms used for sorting 1D arrays
#include <time.h>
#include <stdio.h>
#include <stdlib.h>
enum arrayType
{
INCREASING = 1,
DECREASING = 2,
RANDOM = 3
} order;
@singaltanmay
singaltanmay / batch_rename.py
Created December 2, 2019 18:18
Batch renaming files
import os
def rename():
fpath = "/media/tanmsy/NAS/TV Shows/Westworld/Season 01/"
os.chdir(fpath)
nameList = os.listdir()