Java Data Structures Book

Hi all, I'm looking for a Data Structures and Algorithmitmics book in Java with the answers to many of the exercises.
Any idea?
Thanks

Hi all, I'm looking for a Data Structures and Algorithmitmics
book in Java with the answers to many of the exercises."Data Structures and Algorithmitmics book in Java " seems like a pretty generic name. Who is the author?
If the book is used for a university course, the publisher may only sell the answer book to authorized clients, e.g. the university bookstore. So you would have to ask them, but then they will ask if the request is on behalf of the professor. If you said you were a graduate student and a TA for the course, and on request from the professor you are asking to place an order, and to email/call you to pick it up for the professor then you might be able to get a copy. Or you could ask the professor for a letter and explain to him that you really need a copy of the answers. However, if the questions in the book are used as part of the grading questions, there is very little chance.
You could also try searching online, or ask the TA for help. In my experience, TAs have 1 or 2 hours a week where anyone can drop in and ask questions. Take advantage of that.
then you might be a

Similar Messages

  • Java data structure

    H!!
    I am looking for a good on line tutorial about
    Java Data structure. please help me.
    peter

    Hi again!
    This is my first time that I want to learn
    about : stack, list, linked list, queue, tree..
    . whit Java.Stack, list, linked list, queue and trees are data structures which are the same independent of the programming language. They are more of a concept.
    The best way to find more information is to google on the structure you want more information on. Here's an explanation on how a linked list works:
    http://encyclopedia.lockergnome.com/s/b/Linked_list
    /Kaj

  • How do we do TypeMapping for Vector, Hashtable, or any java data structure in RPC?

    I tried to implement a dynamic Client (RPC) however I got the following Error
    when I ran the program.
    Exception in thread "main" java.lang.ClassCastException
    Here is my part of code
    //create service
    Service service = factory.createService( serviceName );
    TypeMappingRegistry registry = service.getTypeMappingRegistry();
    TypeMapping mapping = registry.getTypeMapping(
    SOAPConstants.URI_NS_SOAP_ENCODING );
    mapping.register( Vector.class,                          
              new QName( targetNamespace, "Vector" ),      
              new language_builtins.util.VectorCodec(),                         new language_builtins.util.VectorCodec()
    //create call
    Call call = service.createCall();
    //set port and operation name
    call.setPortTypeName( portName );
    call.setOperationName( operationName );
    call.addParameter( "string",new QName( "http://www.w3.org/2001/XMLSchema","string"
    ParameterMode.IN);
    call.addParameter( "intVal",new QName( "http://www.w3.org/2001/XMLSchema","int"
    ParameterMode.IN);
    call.setReturnType( new QName( targetNamespace, "Vector" ) );
    Vector v = (Vector) call.invoke(new Object[] {"Hi", new Integer(1) });
    Any help on this will be greatly appreciated.
    december

    Hey December,
    I looked at your WSDL, but it doesn't give any hint of what you are putting in
    the LinkedList or Vector. All it says is that an "array of anything" (basically,
    an array of java.lang.Object) is returned from the buy and sell web service operations.
    Surely there is some complexType (i.e. TradeResults, TransactionResults, etc.)
    that you want to return here. A java.util.LinkedList object is not a complexType.
    It's a generic container object which is specific to the Java programming language.
    Same with the java.util.Vector. Web services are programming language independent,
    so a .NET client (written in C# or VB code) wouldn't really know how to deal with
    a java.util.LinkedList, right? Web services do not transfer objects back and forth,
    just XML. This means that the buy web service operation doesn't really return
    a java.util.Vector over an HTTP connection. It returns an XML representation of
    the "hierarchical state" associated with the complexTypes you put in the Vector,
    inside the "service implementation" code on the server side.
    What you want to do is use the WSDL "to describe" the data types your web services
    accepts and returns. To do this, you'll need to define complexTypes to put in
    the array of complex types that is returned. If you leave things as they are,
    I don't think you'll ever be able to determine what's in "the Vector". Again,
    this is because web services don't transfer objects back and forth, just the state
    that is used to instanciate them :-)
    HTH,
    Mike Wooten
    "december_i" <[email protected]> wrote:
    >
    >
    >
    Hi Michael Wooten,
    When I printed out the Object class name, it returned this "[Ljava.lang.Object;"
    So I tried this way again.
    Object[] obj = (Object[])call.invoke(new Object[] {"Hi", new Integer(1)});
    System.out.println("obj[0].getClass().getName()=" + obj[0].getClass().getName());
    At this time, it printed this "java.lang.String".
    I guess web services is not returning Vector.
    I attached my WSDL file.
    I really appreciated your help.
    best wishes,
    December
    "Michael Wooten" <[email protected]> wrote:
    If you are still getting a class cast exception, maybe it's becausethe
    web service
    isn't returning a Vector.
    Change the following line in your client code:
    Vector v = (Vector) call.invoke(new Object[] {"Hi", new Integer(1)});
    to:
    Object obj = call.invoke(new Object[] {"Hi", new Integer(1)});
    System.out.println("obj.getClass().getName()=" + obj.getClass().getName());
    That way you can see what the return type is :-)
    You might want to post the WSDL and remote interface of the web service
    you are
    trying to call also.
    Regards,
    Mike Wooten
    "december_i" <[email protected]> wrote:
    Hi Mike Wooten,
    Thanks for pointing out my mistake.
    However I'm still getting same error. I know i'm gettting this error
    because of
    return type "Vector". But I don't know what I did wrong.
    Does anybody have any sample example about TypeMapping for any datastructures?
    Any help on this will be greatly appreciated.
    December
    "Michael Wooten" <[email protected]> wrote:
    Hi December_i,
    Your code is saying that the "Vector" type is in the target namespace
    for your
    web service. I don't think this is correct. Try this:
    mapping.register(
    java.util.Vector.class,                          
    new QName("java:language_builtins.util", "Vector" ),      
    new language_builtins.util.VectorCodec(),
    new language_builtins.util.VectorCodec()
    call.setReturnType( new QName("java:language_builtins.util", "Vector"
    HTH,
    Mike Wooten
    "december_i" <[email protected]> wrote:
    I tried to implement a dynamic Client (RPC) however I got the following
    Error
    when I ran the program.
    Exception in thread "main" java.lang.ClassCastException
    Here is my part of code
    //create service
    Service service = factory.createService( serviceName );
    TypeMappingRegistry registry = service.getTypeMappingRegistry();
    TypeMapping mapping = registry.getTypeMapping(
    SOAPConstants.URI_NS_SOAP_ENCODING
    mapping.register( Vector.class,                          
              new QName( targetNamespace, "Vector" ),      
              new language_builtins.util.VectorCodec(),                         new language_builtins.util.VectorCodec()
    //create call
    Call call = service.createCall();
    //set port and operation name
    call.setPortTypeName( portName );
    call.setOperationName( operationName );
    call.addParameter( "string",new QName( "http://www.w3.org/2001/XMLSchema","string"
    ParameterMode.IN);
    call.addParameter( "intVal",new QName( "http://www.w3.org/2001/XMLSchema","int"
    ParameterMode.IN);
    call.setReturnType( new QName( targetNamespace, "Vector" ) );
    Vector v = (Vector) call.invoke(new Object[] {"Hi", new Integer(1)
    Any help on this will be greatly appreciated.
    december

  • Data Structures and Algorithms in java book

    Hi guys,
    I want to know a good book which is good for Data Structures and Algorithms in java. I am good at Core java but a beginner for Data Structures in Java. I am a little poor in Data Structures concepts.
    Following are the books I have found on the net. Could you help me the choose the best outta them.
    1. Data Structures and Algorithms in Java - Mitchell Waite
    2. Data Structures in Java - Sandra Anderson
    3. Fundamentals of OOP and Data Structures in Java - Richard Weiner & Lewis J. Pinson
    4. Object Oriented Data Structures Using Java - Nell Dale, Daniel T. Joyce, Chip Weems

    lieni wrote:
    I good data structures book doesn't have to be language-specific.Thx DrLazlo, my speachYes.
    The OP wrote:
    I have access to these books and dont know which one to start with.What I meant is that you shouldn't narrow your search to insist that the book you choose have "Java" in the title.

  • Open ended data structure for retrieving SQL data

    I have a flex project that reads data from a database and
    sends it to my flex app to display in a chart. I need to do this in
    Actionscript since I have to dynamically create different charts
    based on the database definitions. Up til now, I have inserted the
    data for each series into a separate
    ArrayList(java)/ArrayCollection(flex) in this way:
    BindingUtils.bindProperty(lineSeries, "dataProvider", series,
    "pointList");
    lineSeries.xField="point1";
    lineSeries.yField="point2";
    The series variable is a custom Actionscript/Java object
    which contains an ArrayCollection called pointList. And the array
    is made up of custom DataObjects with two fields, point1 &
    point2.
    But in the new paradigm, I'd basically like to create a big
    array of arrays similar to a database table and then just point the
    xField to one column, and the yField to another column. Anyway, it
    seems like the problem is that my point1 and point2 in the current
    implementation are variable names, but with this new dynamic
    structure, I won't be able to create variables on the fly. So how
    do I let flex know to look at column 3, for example for the yField?
    The attached code is from the Flex documentation and is an example
    of what I'd like to emulate (except I need to do it in
    actionscript). I'd like to be able to select "month" or "amount",
    etc. But coming from the Java side, there is no way for me to name
    the array contained in each column.

    I guess I wasn't clear enough. I am actually serializing a
    java object and mapping it to an actionscript object via blazeDS. I
    know about how the objects translate, for example for
    ArrayCollections in flex, I use ArrayLists in java. The problem is
    that I'm not sure how to get the associative aspects of the arrays
    in flex into my java data structures in a way that will translate
    to the way flex can define arrays, such as Month:"January".
    It seems that in flex, you can create an Array and assign it
    an element like {month:"January", amount:"450"} and it will create
    an Object with variables for month and amount. But I don't know how
    to do this on the fly in Java (or in Actionscript for that matter)
    when I have no way of knowing beforehand how many variables my
    object will need. Each series will need an x and y, though usually
    the x will be dates which are the same for each series. So if I had
    10 series sharing an axis, I'd need 11 variables in my object-
    date, series1, series 2...series 10.

  • Data structures

    what is the best data structure to use for keeping four different data
    bases interconnected and updated about the changes in one another at all times while not using an existing java data structure but by implementing one by one's own?
    thanx .

    Data structure? Coherency Protocol!
    What a question anyways? If you want to implement your own, the best thing to do is to get going ...

  • What is the smallest data structure record in a .TXT file record to be recognized as an Apple Address Book "Data Card"?

    Hello! This is my first time in this discussion group. The question posed is the subject line itself:
    What is the smallest data structure record in a .TXT file record to be recognized as an Apple Address Book "Data Card"?
    I'm lazy! As a math instructor with 40+ students per class per semester (pCpS), I would rather not have to create 40 data cards pCpS by hand, only to expunge that info at semester's end. My college's IS department can easily supply me with First name, Last name, and eMail address info, along with a myriad of other fields. I can manipulate those data on my end to create the necessary .TXT file, but I don't know the essential structure of that file.
    Can you help me?
    Thank you in advance.
    Bill

    Hello Bill, & welcome aboard!
    No idea what  pCpS is, sorry.
    To import a text file into Address Book, it needs to be a comma delimited .csv file, like...
    Customer Name,Company,Address1,Address2,City,State,Zip
    Customer 1,Company 1,2233 W Seventh Street,Unit 543,Seattle,WA,99099
    Customer 2,Company 2,1 Park Avenue,,New York,NY,10001
    Customer 3,Company 3,65 Loma Linda Parkway,,San Jose,CA,94321
    Customer 4,Company 4,89988 E 23rd Street,B720,Oakland,CA,99899
    Customer 5,Company 5,432 1st Avenue,,Seattle,WA,99876
    Customer 6,Company 6,76765 NE 92nd Street,,Seattle,WA,98009
    Customer 7,Company 7,8976 Poplar Street,,Coupeville,WA,98976
    Customer 8,Company 8,7677 4th Ave North,,Seattle,WA ,89876
    Customer 9,Company 9,4556 Fauntleroy Avenue,,West Seattle,WA,98987
    Customer 10,Company 10,4 Bell Street,,Cincinnati,OH,89987
    Customer 11,Company 11,4001 Beacon Ave North,,Seattle,WA,90887
    Customer 12,Company 12,63 Dehli Street,,Noida,India,898877-8879
    Customer 13,Company 13,63 Dehli Street,,Noida,India,898877-8879
    Customer 14,Company 14,63 Dehli Street,,Noida,India,898877-8879
    Customer 15,Company 15,4847 Spirit Lake Drive,,Bellevue,WA,98006
    Customer 16,Company 16,444 Clark Avenue,,West Seattle,WA,88989
    Customer 17,Company 17,6601 E Stallion,,Scottsdale,AZ,85254
    Customer 18,Company 18,801 N 34th Street,,Seattle,WA,98103
    Customer 19,Company 19,15925 SE 92nd,,Newcastle,WA,99898
    Customer 20,Company 20,3335 NW 220th,2nd Floor,Edmonds,WA,99890
    Customer 21,Company 21,444 E Greenway,,Scottsdale,AZ,85654
    Customer 22,Company 22,4 Railroad Drive,,Moclips,WA,98988
    Customer 23,Company 23,89887 E 64th,,Scottsdale,AZ,87877
    Customer 24,Company 24,15620 SE 43rd Street,,Bellevue,WA,98006
    Customer 25,Company 25,123 Smalltown,,Redmond,WA,98998
    Try Address Book Importer...
    http://www.sillybit.com/abee/

  • Is there a Java API for Tree data structure?

    Hi,
    I am wondering is there any Java API to work on Tree based data structure.
    I could read in some forums / sites that teach me how to create tree based objects using collection.
    But I wanted to know is there any core java API that can be used directly for tree based operations. (like binary tree or other type of trees)
    Please comment on this doubt.

    Headed using google and other stuff not found one.
    Suggestion: Why not start building the one, its a good idea to do that, isn't it.

  • How to access data structures in C dll from java thru JNI?

    We have been given API's( collection of C Functions) from some vendor.
    SDK from vendor consist of:
    Libpga.DLL, Libpga.h,Libpga.lib, Along with that sample program Receiver.h (i don't know its written in C or C++), I guess .C stnads for C files?
    Considering that I don't know C or C++ (Except that I can understand what that program is doing) & i have experience in VB6 and Java, In order to build interface based on this API, I have two option left, Use these dll either from VB or Java.
    As far as I know, calling this DLL in VB requires all the data structures & methods to be declared in VB, I guess which is not the case with Java (? I'm not sure)
    I experiemnted calling these function from Java through JNI, and I successfully did by writting wrapper dll. My question is whether I have to declare all the constants & data structures defined in libpga.h file in java, in order to use them in my java program??
    Any suggesstion would be greatly appreciated,
    Vini

    1. There are generators around that claim to generate suitable wrappers, given some dll input. I suggest you search google. Try JACE, jni, wrapper, generator, .... Also, serach back through this forum, where there have been suggestions made.
    2. In general, you will need to supply wrappers, and if you want to use data from the "C side" in java, then you will need java objects that hold the data.

  • Trees Data Structures in Java

    Hi all !
    Currently I�m developing a Java software that requires a Tree data structure. Searching through Java API I�ve found classes like TreeMap and TreeSet, but although these classes seens to use tree structure behind what they really provide are linear data structure, not a tree data structure. My question is if there is a public and free Java tree data structure that permits to do activities such as:
    - Search for a particular node (efficiently)
    - Insert children to any node
    - Maintain one Object in each node
    Simple like this ! It must have something like this in Java, but I just can�t find it and I�m just too lazy to implement it :) ! Anyone can help me ?
    Thanks in advance !

    Mel,
    I�ve seen javax.swing.tree.TreeModel and its seens more like an implementation of Control in swing MVC (Model Vision Control) swing paradigm for JTree. It has listeners generated for manipulation events for example. It uses javax.swing.tree.DefaultMutableTreeNode for its nodes, and maybe I could use this class for the nodes of my tree since it has many useful operations. However still I miss a node searching operation that this class doesn�t have.
    Yes my problem is a simple Tree, but it is simple now and it might become much more complex, demanding more operations on the tree and specially efficient searching algorithms. Thats why I�m looking for a complete solution and I prefer something that is already done and well tested :) !
    Thanks for your tip !

  • What Tree Data Structures does Java Include?

    Hello,
    I have been reading about several tree data structures like a binary search tree, self-balancing bst, minimum spanning tree, red-black tree, AVL tree, etc... Are there data structures in Java represent the various trees, or is implementation of the ds left to user?
    Eric

    "Java" can be termed the "Java Language". The language does not have trees.
    In more general usage "Java" can refer to a standard, desktop, delivered VM which includes the standard Java API. The types that you are asking about would be found in the following package.
    [http://java.sun.com/javase/6/docs/api/java/util/package-summary.html]
    "Java" could also refer to any other commonly available implementations. In that case probably anything that can be implemented has been implemented somewhere. Googling works.

  • Constracting an xml book data structure

    I have to construct a book data structure storing detalis about a book, which i parse from a file containing the book in XML format.
    I've done the parser, but i'm trying to figure out what would be the best Class I could use as a Data Structure to store the book.
    I have to store info about the title, the author, chapters, etc etc, as well as the book itself...
    Any suggestions would be very appreciated.
    Thanx.
    P.

    If I understand correctly,
    you have an xml file that describes a book.
    Would it be an option, if you just create an oject Book that has all your necessary fields in it and populate that object with your xml values?
    for ex,
    class Book
    String author;
    String title;
    String[] chapters;
    }

  • Difference speeds between Java�s data structures?

    Hello,
    I would appreciate to know, if there are any real efficiency differences between the data structures?
    One of my programs using s Vector to store 50 thousand small class objects.
    Adding to the vector seems quite slow, would anyone say the ArrayList/LinkedList is quicker. And the ArrayList/LinkedList are also quicker when looping through the objects again?
    Cheers

    ArrayList is basically the same as a Vector without the synchronization (and IIRC some slightly different default values). So if you don't need synchronization using an ArrayList is a sure, safe way to increase performance. Wether the gain is measurable depends on your problem. The question wether to use ArrayList or LinkedList depends mostly on how you access the values (do you need random access? do you just loop over them? do you need to insert values at the beginning or the middle?)

  • Storing a lot of data in an indexed data structure for quick access.

    I'm designing an app. which will need to store a large amount of data in memory. Records will be flowing into the app. via a socket. The app will receive about 30 records/second which is about 108,000 records/hour and about 600,000 records/day. I need to store the records in an indexed data structure so that I can access them quickly. For example, at 9:00am I will need to access records received at 8:30am, 8:35am, 8:40am, etc. This program will be multithreaded and as I understand Vector is the only data structure that is thread safe. Is Vector my only choice? How do I access objects in a Vector using an index? Is there something better that I can use?

    Is Vector my only choice?If you want to access the objects by key then you should use something like a HashMap. But if you want to access them by an array index then an ArrayList would be more appropriate.
    as I understand Vector is the only data structure that is thread safeYou can get a thread-safe version of any Collection object by using the Collection.synchronizedCollection method.
    How do I access objects in a Vector using an index? I'd suggest you read the API documentation. And probably the Sun tutorial on Collections at http://java.sun.com/docs/books/tutorial/collections/index.html
    600,000 records/day. Unless you plan to dump old data after a short period of time, you may want to consider using a database to avoid running out of memory.

  • Website on data structures such as stacks and queues.

    Hi,
    I'm currently try to read up on data structures such as stacks, queues but don't quite understand how to implement that. Is there any useful links with example that I can read up from?
    Thanks

    Depends what you mean by "implement". If you want to use standard Java classes that are already written, and you want to know which to choose, then
    http://java.sun.com/docs/books/tutorial/collections/
    If you want to write your own, for some obscure reason, then read a book on data structures. Or try to write your own implementation of the Java collection classes.

Maybe you are looking for

  • My iPhone just stopped working. I've tried charging it and turning it on and nothing works.

    Hello, my iPhone recently stopped working - I tried plugging it up to charge and that hasn't worked. I even took it out of the case. It still won't turn on. Is there any solutions?

  • Unable to update adobe updater

    I am installing Adobe CS2 from old Power Mac to new Mac Pro and need to get software updates. I went to Photoshop/Help/Updates. Click on updates. It tells me I must first update adobe updater. When I tell it to do that it starts to download, then giv

  • Accordion Menu with Column Chart

    Dear All, I have an accordion menu and a column chart showing monthly precipitation and on the graph I would like to add average points at the same time I would like to have the "average" title not showing in the menu. Any way to handle with it? Many

  • Windows Untitled

    Bonsoir, Je débute en Mac, et me suis offert un Mac Book Pro depuis 8 jours. Superbe ! Pour des raisons de compatibilité, j'ai installé Windows XP SP2 utilisant Boot Camp. J'ai très probablement raté une option, car je constate que le disque dur, rep

  • DJ2540 set-up on chromebook

    I just purchased a DJ2540.  I'm trying to set-up with my chromebook.  Where can I find the email address for my printer?