Member Avatar

Hii, Can anyone provide me the python code for finding a number that is stored in a file . The file contains 1 lakh numbers!! And i want a python code that searches the file and find the desired element!!!! Both linear search and binary search!! i'm a python beginner!!!! Plzz help urgent

Member Avatar
0
50
Member Avatar

do u have any code to find a system of two linear equations with two variables??

Member Avatar
0
47
Member Avatar

This is a topic we didn't cover in class so I am lost on what is going on, any pointers would be greatly appreciated: ~Given the following numbers ... 25 72 122 ... and given the following hashing function ... hashvalue := (i*i) mod 97 ... and using Linear Probing, where are the locations where the numbers will end up?

0
1
Member Avatar

Ok guys i have a few questions about implementing a gneric hash table using linear probing. Ok first, i need to make an entry class Entry<K,V> then An Entry <K,V> table array but since its gneric must initiatied elsewhere my question is how does the class entry work , from what i understand it will be like some sort of node with 2 fields of type K and V but i dont know how i will insert using entry then entering it in the table. This is what i have written so far. Am having trouble understanding it correctly, and …

Member Avatar
0
6
Member Avatar

I have an assignment to write a program in Java to implement the Natural Correspondence Algorithm for converting a linear list into a binary tree. The program should process its inputs in two steps: (a) It first builds a tree for a given input list (b) It then traverses the tree using Preorder and Inorder traversal schemes. In each case the program prints out the information field of each node visited during the traversal. An example of input data would be something like (P (Q R)) How would I go about doing this? Thanks for any help.

Member Avatar
0
5
Member Avatar

So, I've been assigned to write a program that reads the wind-tunnel test data, that of which is called the "tunnel.dat" in my program, and then allows the user to enter a flight-path angle. If the angle entered is within the bounds of the data set, the program would need to do linear interpolation to compute the corresponding coefficient of lift, given by f_b = f_a + ((b-a)/(a-c)) * (f_c - f_a) The problem I'm having is that the program has successfully compiled, however the result isn't turning out as it should be. It's returning "The coefficient of lift is …

Member Avatar
0
8
Member Avatar

Hi. Can you help me how to balance a chemical equation using linear algebra. I know how to do it on a piece of paper using the usual method of balancing. I just don't get the principle how to do it on the other method. Please give me a step by step procedure on how to do it, the basic ones. This is how far I have gone. Ex: Fe + Cl2 = FeCl3 Set a variable for each [A]Fe + [B] Cl2 = [C] FeCl3 Count the number of coefficients Fe: A = C Cl: 2B = 3C And …

Member Avatar
0
6
Member Avatar

Hi there, first post! First off, I apologise for asking such a basic question, but I am new to Java (done VB before..) and was wondering if you could please help me out with a little problem I'm having! I have a method that reads data from a text file, uses a StringTokenizer, and puts the information in to an ArrayList called StudentArray [code] public void readFile() { ArrayList<String> studentArray = new ArrayList<String>(); //Declares new ArrayList to contain string values try { BufferedReader in = new BufferedReader(new FileReader("/Users/John/Resources/Teech/studentList.txt")); //New bufferedReader and fileReader String theText = in.readLine(); //Get next line from …

Member Avatar
0
4
Member Avatar

[B]Hi guys!!... I am just looking for some startup guidance with a program I am supposed to write.. it goes like this ->[/B] A program which compares these three hashing methods: 1) open addressing with linear probing, 2) open addressing with quadratic probing, and 3) separate chaining. Input will come from in.txt. The first line of the file will contain the hash table size (assume < 100); the remaining lines (except the last) each contain one non-negative integer per line (you may assume no duplicate keys, and that the number of keys is ≤ the table size); the last line …

Member Avatar
0
7
Member Avatar

Hey guys!! first off please dont tell me to google it, iv already done my searching with google and various text books lol ... Ok So i understand how to find numbers in a linear search by inputting 10 numbers and searching. Now i need to do the same except now i am searing a given string of names. [ICODE] String[] names = { "fred" , "barney", "tom", "jerry", "larry", "moe", "curly", "betty" , "wilma", "bart", "homer", "marge", "maggie", "lisa", "pebbles" , "bambam", "smithers", "burns", "milhouse", "george", "astro", "dino" , "mickey", "minnie", "pluto", "goofy", "donald", "huey", "louie" , "dewey", "snowwhite", …

Member Avatar
0
5
Member Avatar

Hi all Am trying to Truncate the end of a linear list in java. so that: [CODE] // reduce the size of the list to s by removing all elements // with indices greater or equal to s; return the number of removed // elements; // for example, if the list is [d, a, b, c, g, a], then truncateEnd(4) // should change it to [d, a, b, c] and return 2; // don’t do anything (and return 0), if the size of the list // isn’t greater then s public int truncateEnd(int s) { // there is a method …

Member Avatar
0
10
Member Avatar

Sorry but I'm having a problem whit this function that is meant to let me edit records in a binary file. After I enter what I want to change an attribute to the file remains unchanged. [CODE]void updateStudent(fstream & file) { S students; long lenth; char snum[10]; char editChoice = '7'; bool editmade = 0; lenth = sizeof(S); int list = 1; int recno = 0; file.open(FILENAME, ios::in|ios::out|ios::binary); if(!file) { cout<<"can not open file"<<endl; } //file.clear(); //refresh file variable file.seekg (0,ios:: beg); file.read( reinterpret_cast< char *> (&students),sizeof(S)); while(!file.eof()) { cout<<"Enter "<<list<<" to edit \t"<<students.regNumber<<endl; file.read( reinterpret_cast< char *> (&students),sizeof(S)); list++; …

Member Avatar
0
3
Member Avatar

We have an assignment to write a program finding the nth Fibonacci number. On the web, there are some standard mathematical equations for this, but that would just defeat the purpose of this assignment if I use those formulas. I have my current code down here(with some sketchy back up code stuff), but I am really confused about what I am writing down here, the loop I have written in my code is not really working at all. :| Also, would this program represent a linear equation or a quadratic or possibly polynomial equation? [CODE]import java.util.InputMismatchException; import java.util.Scanner; public class …

Member Avatar
0
15
Member Avatar

Hi, Has anyone animated a complext svg file ? I would like to know your experience ? Browser support? Time It Took ? Anything unexpected ? if possible a link on ur work would be great. Appreciate it. Vishal

0
1

The End.