This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Node: | |
#creation of node | |
def __init__(self,data): | |
self.data = data #assign data | |
self.next = None #initialize null | |
class LinkedList: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//spiral matrix method is used | |
import java.io.*; | |
import java.util.Scanner; | |
public class BrainTeaser{ | |
static int[] array = new int[200]; | |
static int userchoice; | |
//brainFunction called here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
NewerOlder