Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Madhivarman Madhivarman

🏠
Working from home
  • Pluto7
  • Bengaluru
View GitHub Profile
@Madhivarman
Madhivarman / Bruteforce.java
Last active May 20, 2022
String Pattern matching using BruteForce Algorithm
View Bruteforce.java
//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;
@Madhivarman
Madhivarman / SelectionSort.java
Created Sep 5, 2017
Selection Sort using single Loop
View SelectionSort.java
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 / HashingTable.java
Last active Sep 5, 2017
Hashing Table concept implemented in java
View HashingTable.java
import java.io.*;
import java.util.Scanner;
class HashingTable{
static String userchoice;
static int capacity;
static int array[];
//constructor function called
public HashingTable(int capacity){
this.capacity = nextPrime(capacity);