Skip to content

Instantly share code, notes, and snippets.

View Madhivarman's full-sized avatar
🏠
Working from home

Madhivarman Madhivarman

🏠
Working from home
  • Pluto7
  • Bengaluru
View GitHub Profile
@Madhivarman
Madhivarman / SelectionSort.java
Created September 5, 2017 14:47
Selection Sort using single Loop
import java.io.*;
public class SelectionSort{
static int i;
static int temp,element;
//selection sorting done here
public static void SelectionSort(int[] arr,int n){
//while condtion to check the loop and increment
int smallest = arr[0];
int init = 0;
@Madhivarman
Madhivarman / multiprocess.py
Created January 26, 2020 18:47
Sample script in Multiprocessing
import time
import datetime
import os
import pandas as pd
from multiprocessing import Process, Queue, current_process
def do_something(fromprocess):
time.sleep(1)
print("Operation Ended for Process:{}, process Id:{}".format(
current_process().name, os.getpid()
@Madhivarman
Madhivarman / Bruteforce.java
Last active May 20, 2022 05:16
String Pattern matching using BruteForce Algorithm
//brute force algorithm
//string matching
import java.io.*;
import java.util.Scanner;
class Bruteforce{
//called function
public static int bruteforce(String text,String tobematched){
int length = text.length();//length of the text
int plength = tobematched.length();//length of the pattern;