Thread: please help me!

  1. #1
    Registered User
    Join Date
    Apr 2011
    Posts
    3

    Red face please help me!

    hellow guys,
    if you can please show me how to solve this programs in a simple way using c:
    first program:
    write two programs which are linear search and binary search, they should Display the menu repeatedly which shows the choices of above two operations to choose from.
    and Invoke either Linear Search or Binary Search function as per the user’s choice.
    *Linear Search function should accept the array and key element as input arguments, perform search and then display the position of key element if it’s found (Successful Search); otherwise it should display a message “Key Not Found” (Unsuccessful Search) as an output.
    *Binary Search function should also accept the array and key element as an input arguments, perform search and then display the position of key element if it’s found (Successful Search); otherwise it should display a message “Key Not Found” (Unsuccessful Search)as an output.
    second program
    • Write three separate user defined functions to perform Insertion Sort and Quick Sort.
    o Insertion Sort function should accept the array as an input argument, perform sorting and then display the sorted array as an output.
    o Recursive Quick Sort function should also accept 3 arguments; the array, index of the first element, index of the last element. Performs sorting and then display the sorted array as an output. Note: Quick Sort function invokes non-recursive partition function.
    o A non-recursive partition function which accepts 4 arguments, array, index of the first element, index of the last element, and returns the integer value(index of the pivot after partitioning)

    • Write a main() program which should
    o Read the array elements.
    o Display the menu repeatedly showing the choices of above two operations to choose from.
    o Invoke either Insertion Sort or Quick Sort function as per the user’s choice.

    please i am waiting for your answers
    Last edited by susu; 04-23-2011 at 06:09 AM.

  2. #2
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    Welcome to the forum, susu!

    That's not how we roll here. You start your program, and when (if), you get stuck, you post your program and tell us what you need help with. We will assist at that point.

    Before that, you need to get going, and working on it. This is not a homework service forum.

Popular pages Recent additions subscribe to a feed