Data Structure Puzzle

Posted on 2006-03-21
Last Modified: 2009-07-11
Hi Expert's

        Can Any one send me liunk for Data Structure Puzzle's and Problem So that i can try to solve it

Question by:avinash_takale
    LVL 45

    Expert Comment

    Hi avinash_takale,

    1) Given an singly linked list and poisition "n", we have to remove the nth item from end.
    2) Remove the duplicates in an array.
    3) Find if there is a loop in a linked list
    4) Shift ahead a block of elements in an array
    5) Implement two stacks in one array
    6) find first common ancestor for any two nodes in a tree
    7) Given an array of characters which form a sentence of words, give an efficient algorithm to reverse the order of the words (not characters) in it.
    8) Reverse a linked list.
    9) Extracting unique elements from a sorted list
    10) Given a singly linked list, print out its contents in reverse order.
    11) Given a singly linked list, find the middle of the list.
    12) How do you represent an n-ary tree? Write a program to print the nodes of such a tree in breadth first order.

    LVL 6

    Expert Comment

    LVL 45

    Accepted Solution

    Hi avinash_takale,

    Few more --
    - sort a linked list.
    - wild card string matching
    - routines to read and write a bounded buffer.
    - routines to manage a heap using an existing array

    LVL 5

    Expert Comment

    Few additions

    * Implement "tail" command of unix.
    Note: tail prints n number of lines from end of the file.... i.e. last n lines

    * You have given a stack library. using that library implement queue.

    * Find offset of a member variable in a structure.
    LVL 3

    Expert Comment

    Hi Avinash,
    If you have an idea about sockets, do the above work as a cliant-server app.
    client sends the request and server sends back the response to the client.

    Prashant Sabnekar

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
    Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode ( They will have you believe that Unicode requires you to use…
    The goal of this video is to provide viewers with basic examples to understand and use pointers in the C programming language.
    The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now