Skip to content

Instantly share code, notes, and snippets.

View sudhanshuptl's full-sized avatar
🦴
Focusing

Sudhanshu patel sudhanshuptl

🦴
Focusing
View GitHub Profile
@sudhanshuptl
sudhanshuptl / DelimiterDataParser.c
Created June 2, 2018 08:06
Custom Function for delimiter seperated data parsing in c
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
/*Global Variabls*/
char *GlobalPointer=NULL;
/* Prototypes */
char *ParseLine(char *arr, char *delimiter);
@sudhanshuptl
sudhanshuptl / data.txt
Last active June 2, 2018 09:51
example of fseek and ftell function c file handling
sudhanshu|patel||1234
Chandan|kumar|54645
Ashutosh|Dwivedi|34654
@sudhanshuptl
sudhanshuptl / Bubble_Sort.py
Last active June 11, 2018 12:31
Different Sorting Algorithms in Python
# Bubble sort in python
__author__ ='Sudhashu Patel'
class BubbleSort:
def __init__(self, ls=[5,3,6,2,4,7,4,3]):
self.ls = ls
self.length = len(self.ls)
def sort(self, reverse=False):
if reverse:
@sudhanshuptl
sudhanshuptl / MergeSort.c
Last active June 25, 2018 10:51
sorting Algorithms in c
#include<stdio.h>
#define SIZE 10
void print(int arr[]);
void mergeSort(int arr[],int base,int end);
void merge(int arr[],int base,int mid, int end);
int main(){
int arr[SIZE]={5,32,7,2,8,7,9,6,43,65};
print(arr);
7c54feb6bab5404ba3ab660a3fd04e77c1212b055d8e1cbf34a42049aa82c47a9ee0577f3575c1c7a25c235e0982677c2801f2f253372d16f9ae60804a20ffc8