Difference between Linear & Binary search.

Hi,
       Could Anybody describe me, What is the difference between Linear Search and Binary Search in ABAP ?
Moderator Message: Please search before posting your question. Therad locked.
Edited by: Suhas Saha on Oct 19, 2011 11:21 AM

Hi,
In case of linear search system will search from begining.
that means Example : z table contains single field with values 
1 2 3 4 5 6 7 8 9 
if u r searching for a value then system will starts from
first position. if required value is founded then execution
will comes out from z table.
In case of binary search system will starts from mid point.
if value is not founded then it will search for upper half.
in  that upper half it will check mid point.like that search
will takes place.
Thanks,
Sridhar

Similar Messages

  • Difference between WF Notifications Search and Find Notifications

    Hi
    i wants to know the difference between Find Notifications and WF Notifications Search .When i am using WF Notifications Search it is allowing any body to approve any notification .
    Thanks
    Mohan

    why I can view everything in the WF Notification Search is because I also have the Workflow Administrator Responsibility where I can see and act on everything.
    So the issue is resolved.
    Thanks
    Mohan

  • Is there a difference between "Spotlight" & the "Search" field?

    Hi,
    In Lion, is there a difference between searching for a file using SPOTLIGHT . . . or the SEARCH field in the upper left of a folder (if you click your Hard drive.)?
    For example, I have a MacBook Pro with a 2nd hard drive inside.  If I don't "Spotlight" the 2nd hard drive - will the SEARCH field then still work?  Or if I DO SPOTLIGHT it - is it using the same search mechanism using "Find" and "Spotlight"?
    I'm curious how this works?  Thanks very much,
    Larry

    Using COMMAND-F or Finder's search field provides a window like this:
    If you click on the Kind dropdown menu you will see:
    You can select different search criteria for locating files. If you then select Other you will see:
    You can then check the different search attributes you wish to add to the previously shown dropdown menu thus providing many different search criteria.

  • Is there a difference between URL of search results in chrome vs. IE?

    Preview Images of images that comes from file share are not displayed in Chrome (while they do display in IE).
    In order to check i tried to set hard coded  in the search results display template a sample link as
    file://dev-sp-2013/test/box_galley_up.GIF
    Still it is displayed only in IE and not in Chrome (but when open Chrome and copy that URL - it opens the picture).
    Any solutions?should i add any manipulation to the Image URL variable (in the display template)  in order to display in in Chrome?
    keren tsur

    Hi keren,
    Since the issue only occurs to third party browser, there might be compatibility issue, I'd suggest you contact their support engineer for sufficient resource and professional assistance. For your convenience:
    http://productforums.google.com/forum/#!forum/chrome
    Regards,
    Rebecca Tu
    TechNet Community Support

  • Difference between Oracle Ultra Search and Intermedia Search

    hi,
    Can any one please tell me how Oracle Ultra Search is Different from Intermedia Search .from an article i came to know that Ultra search helps you to search dataq in Multiple RDBMS ,documents,URLs etc . but i think these options are also there in Intermedia
    regds
    sangeeth

    These are Oracle Text questions. Intermedia Text is now Oracle Text and has it's own forum. Please post Oracle Text qestions in the Oracle Text Forum where you will get a better, quicker answer. The Oracle Text forum is frequently monitored by Oracle text experts, this forum may be occasionally scanned by these experts, or not at all.

  • Innaugural demo: Is there any difference between 'GO' and 'Search'?

    I'm still poking around in this demo, and it looks to me like
    a) The Go and Search buttons do EXACTLY the same thing
    b) There are some old objects in there that are no longer used (OLD_SEARCH). I see two sets of code to generate results for pg. 2, but one is never called. I figured it would be called by one button or the other. Perhaps it was at one time?
    c) Where is the "search" button gif, if that's what it is? I am assuming "go.gif" is the blue "go" image. How is the yellow "search" button created?
    Thanks!

    Michael:
    a) You are correct, they do exactly the same thing. The Search button has been removed in the new application shipped with the next release.
    b) P0_OLD_SEARCH does not seem to be used any longer. It is referenced in a condition for firing a before header reset pagination process on page 2, but I can't find where this item is ever populated.
    Both query regions on page 2 are in fact used. If you choose a time interval, do not enter anything in the Search field, and click "Go" or "Search" you will see the other query region. Note that it does not have a "Score" column.
    c) There is no "Search" button gif. It is a template based button, while the "Go" button is an image button. Buttons can be either an Image (like the "Go" button), template based (like the "Search" button), or normal HTML buttons. To see the template for the "Search" button, Under Shared components on the page definition of page 0, click the link to the "Einstein Normal" in the Templates section next to button.

  • How to get percentage difference between two matrices?

    Good day everyone, I just want to ask how to get the percentage difference between two binary matrices. This is for comparing two images converted to matrices in LabView. Thank you. 
    Solved!
    Go to Solution.

    pinkman wrote:
    Good day everyone, I just want to ask how to get the percentage difference between two binary matrices. This is for comparing two images converted to matrices in LabView. Thank you. 
    You probably converted it to a 2D array (A matrix in LabVIEW has a special meaning).
    "Binary" is not very well defined (unless you are looking for the number of bits that are different). What is the datatype? Was it a color image or a greyscale image? Are both arrays the same size?
    How do you define "percentage difference"? Which one of the two is the 100% reference?
    Do you want a new 2D array where each element is the difference of the second array compared to the first (or vice versa), expressed in percentages?
    Do you want to know what percentage of array elements are different between the two arrays?
    Do you want to know the average difference between all array elements?
    All possible interpretations can be easily solved with very little code, but you need to explain in more detail what you actually want?
    Here is a simple solution for case #2, for example (assuming the array have the same size, and we only want a rought estimate, rounded down to the nearest integer percent):
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    PCT-Difference.png ‏16 KB

  • Difference between user locks

    What are the differences between the two lock options in the user management area of the portal? The red arrows indicate the standard lock we use but we were wondering what the difference was from the blue administrative lock below.

    I understand what's going on in the Search area. What is the difference between the red (search area) and the blue (detail area)?

  • Difference between Binary search and Linear search

    Dear all,
    If anyone helps me to get the basic difference between binary and Linear search in SAP environment.
    Regards

    Hi,
    In case of linear search system will search from begining.
    that means Example : z table contains single field with values 
    1 2 3 4 5 6 7 8 9 
    if u r searching for a value then system will starts from
    first position. if required value is founded then execution
    will comes out from z table.
    In case of binary search system will starts from mid point.
    if value is not founded then it will search for upper half.
    in  that upper half it will check mid point.like that search
    will takes place.
    Thanks,
    Sridhar

  • Linear search and binary search

    Hi
    can any one tell me what is linear and binary search in detail.
    and what is the difference between them .
    which one is useful in coding.
    Thanks&Regards,
    S.GangiReddy.

    hi,
    If you read entries from standard tables using a key other than the default key, you can use a binary search instead of the normal linear search. To do this, include the addition BINARY SEARCH in the corresponding READ statements.
    READ TABLE <itab> WITH KEY <k1> = <f1>... <kn> = <fn> <result>  BINARY SEARCH.
    The standard table must be sorted in ascending order by the specified search key. The BINARY SEARCH addition means that you can access an entry in a standard table by its key as quickly as you would be able to in a sorted table.
    REPORT demo_int_tables_read_index_bin.
    DATA: BEGIN OF line,
            col1 TYPE i,
            col2 TYPE i,
          END OF line.
    DATA itab LIKE STANDARD TABLE OF line.
    DO 4 TIMES.
      line-col1 = sy-index.
      line-col2 = sy-index ** 2.
      APPEND line TO itab.
    ENDDO.
    SORT itab BY col2.
    READ TABLE itab WITH KEY col2 = 16 INTO line BINARY SEARCH.
    WRITE: 'SY-SUBRC =', sy-subrc.
    The output is:
    SY-SUBRC =    0
    The program fills a standard table with a list of square numbers and sorts them into ascending order by field COL2. The READ statement uses a binary search to look for and find the line in the table where COL2 has the value 16.
    Linear search use sequential search means each and every reord will be searched to find. so it is slow.
    Binary search uses logrim for searching. Itab MUST be sorted on KEY fields fro binary search. so it is very fast.
    The search takes place as follows for the individual table types :
    standard tables are subject to a linear search. If the addition BINARY SEARCH is specified, the search is binary instead of linear. This considerably reduces the runtime of the search for larger tables (from approximately 100 entries upwards). For the binary search, the table must be sorted by the specified search key in ascending order. Otherwise the search will not find the correct row.
    sorted tables are subject to a binary search if the specified search key is or includes a starting field of the table key. Otherwise it is linear. The addition BINARY SEARCH can be specified for sorted tables, but has no effect.
    For hashed tables, the hash algorithm is used if the specified search key includes the table key. Otherwise the search is linear. The addition BINARY SEARCH is not permitted for hashed tables.
    Binary search must be preffered over linear sarch.
    Hope this is helpful, Do reward.

  • What is difference between TEXT mode and BINARY mode?

    Hi,
              What is difference between TEXT mode and BINARY mode? In TEXT mode what is "ENCODING DEFAULT".
    OPEN DATASET wl_filename FOR INPUT
                              IN TEXT MODE ENCODING DEFAULT.
      OPEN DATASET wl_filename FOR INPUT
                              IN BINARY MODE .

    Hi vishnu,
    1. files like .TXT files are considered to be text,
       and other files like .EXE . DOC etc are binary files.
    2. In text files, after each line, there are two
       internal binary characters
      one for line feed and another one for newline.
    3. But, we don't have any meaning for it,
       when we view such files in notepad, for eg.
       Hence, to only get the understandable content,
       we should open such TXT files, in text mode.
      (we can also open them in binary mode,
      but we will get two extra characters after each line,
       and such two extra characters are meaningless
      for interpreting the text)
    4. In binary mode, each byte by byte is considered,
       without any meaning.
    regards,
    amit m.

  • Difference between a Search and a Retrieve web service?

    Anyone has any idea what's the difference between a Search and Retrieve web-services generated by the 7.1 WS Generator? It seems like you can use both to retrieve any kind of result definition and search by any field.
    I don't mind really, just curious if I'm missing something.
    Alon

    Googling led me to this:
    Authentication:
    Portal: You log-in to the site. Provides you with information based on who you are.
    e.g. mail.yahoo.com
    Website: No log-in.
    e.g. www.yahoo.com
    Personalization:     
    Portal: Limited, focused content. Eliminates the need to visit many different sites.
    e.g. you type in your user name and password and see your yahoo mail only.
    Website: Extensive, unfocused content written to accommodate anonymous users needs.
    Customization :
    Portal: You will select and organize the materials you want to access. Organized with the materials you want to access.
    Website: Searchable, but not customizable. All content is there for every visitor.
    e.g. you can navigate to yahoo mail, yahoo shopping, geo cities, yahoo group. If you wish to use any of these services you will either have to authenticate yourself and see things personalized to you or you can simply visit sections that are for everyone like yahoo news were if you are not signed in then the default sign in is guest.

  • Searching for differences between oracle 8i and 9i

    hello
    can somebody help me please. i am searching for the difference between oracle 8i and 9i, and specially the differences in the DDL between 8i and 9i. may someone can help me!
    thanks
    Message was edited by:
    Da Rookee

    i need some expamples to show the difference....for
    example how it is written in 8i without joins and inNow you are talking about DML not DDL
    For some examples showing the differences between the "traditional" Oracle join syntax and the ANSI join syntax see this article on oracle-base
    http://www.oracle-base.com/articles/9i/ANSIISOSQLSupport.php

  • Linear and Binary Searching of Parallel Arrays

    I'm an AP student who used the "Fundamentals of Java" by Lambert/Osborne 3rd Edition. This text book has code that doesn't match anything else I've found in other how-to's, guides, or teach yourself books. Not even online can I find code that matches up with the format used in this book!
    I've got an assignment that wants me to read in a 4 digit account number of N number of customers, places them in two parallel arrays. Data found in two separate txt files. Create a prompt that ask's for customer's account number then displays account balance. Same program for both linear and binary search methods (2 programs).
    I know the search method and how to read the files with a scanner. It is the body of the program that is stumping me. How to call and search the arrays themselves. Any help would be great.

    First of all, you have posted this question in the wrong place. Please post these kinds of general questions in the New to Java forum.
    Second, if you're in an AP class, don't you have a teacher you can ask?
    But anyway, here's the idea
    For a linear search, you go thru the array element by element, and on each element you call equals(x) to see if that element is equal to what you're searching for (note that primitives use == rather than equals)
    For binary search, note first of all that your data MUST BE COMPARABLE (primative or implement the comparable interface) and MUST BE SORTED.
    Then what you can do if go to the middle of the list, and if what you are searching for is less than that element, go to the middle of the first half of the list (if it's greater, go the the middle of the upper half of the list) and keep breaking the list in half until you've found the element or you know its not there.

  • Searching and Matching - Difference between 'Match Pattern' and 'Match Geometric Pattern'?

    I was wondering if someone can explain to me the difference between  'Match Pattern' and 'Match Geometric Pattern' VIs? I'm really not sure which best to use for my application. I'm trying to search/match small spherical particles in a grey video in order to track their speed (I'm doing this after subtracting two subsequent frames to get rid of background motion artifacts).
    Which should I use?
    Thank you!
    Solved!
    Go to Solution.

    Hi TKassis,
    1.You may find from this link for the difference between these two,
    Pattern Match : http://zone.ni.com/reference/en-XX/help/370281P-01/imaqvision/imaq_match_pattern_3/
    Geometric Match : http://zone.ni.com/reference/en-XX/help/370281P-01/imaqvision/imaq_match_geometric_pattern/.
    2. I always prefer match pattern because of its execution speed, and incase of geometric pattern match it took lot of time to match your result. You may find in the attached figure for same image with these two algorithm execution time.
    Sasi.
    Certified LabVIEW Associate Developer
    If you can DREAM it, You can DO it - Walt Disney

Maybe you are looking for

  • Open dns resolver issues on windows server 2008 R2

    my client is running a windows 2008 r2 server with dns and dhcp roles. it's not a domain controller, just a workgoup server. got a notification from my client's isp: "These attacks have been facilitated through DNS amplification attacks. AT&T has det

  • O itunes store nao reconhece minha id e password.

    o itunes store nao reconhece minha id e password

  • Budget Table

    FI Experts, I am trying do to some functional specs for line items related to budget, I need to get cost center, posting date or period, version, amount. Can you tell me here I can find a table that will give me everything by cost center? We use KP06

  • Running Office 98 or Office 2001 for the Mac with Leopard

    Is it possible to run Office 98 or Office 2001 with Leopard?

  • ISE 1.3 Sponsor Appproval direct link

    There is a way to add a link in the email notification to the sponsor requesting approval. Does anyone know if there is a URL that is a direct link to the approval? Also is anyone aware of an API function for approvals so that approvals could be subm