NOTICE

Adfly Links not working Find Direct Links HERE

Best, Free and Small Size PDF Joiner/Merger application download

Ultra PDF Merger is Small application which can merge multiple PDF files to single PDF very fast

Following are some features:

  • Drag n Drop
  • Fast Operation
  • No installation required
  • Its free
  • Small size (~1Mb)


Download it Here

0 comments :

Feel free to leave comment if you like above widget, have any questions or just say Hi! :)

Construction of Binary Tree From Inorder and Preorder/Postorder Traversal Fully Explained

After finding a lot in books and Internet I found this easy method on how to create B.Tree from studying following data

a)  - INORDER Traversal 
-POSTORDER Traversal 

OR 

b)  -INORDER Traversal 
-PREORDER Traversal 


We usually get Questions like :-

Create Binery tree from following tree Traversals

1)  Inorder:   E  A  C  K  F  H  D  B  G
    Preorder:  F  A  E  K  C  D  H  G  B


2)   INORDER:      D J H B E A F I C G 
      POSTORDER: J H D E B I F G C A
  

HERE the most important think to ALWAYS remember is :-

  • In PREorder  FIRST element is ROOT of the tree
  • In POSTorder  LAST element is ROOT of the tree
I hope you got it :P

i.e considering 1) Question


1)  Inorder:   E  A  C  K  F  H  D  B  G
    Preorder:  F  A  E  K  C  D  H  G  B


Considering 2) Question



2)   INORDER:      D  J  H  B  E  A  F  I  C  G 
      POSTORDER: J  H  D  E  B  I  F  G  C  A


* BLACK highlighted letters are roots 
** RED highlighted letters will go to LEFT SUB TREE  of Root 
***GREEN highlighted letters will go to RIGHT SUB TREE of Root

Let us Start with Question 1)

Step 1)

Now as we know which one is Root So...

                                   F
                                /     \
             ( E A C K)           (H D B G) 


Step 2)

Now FOR LEFT SUB TREE we have 
E A C K from Inorder and same letters from Preorder A  E  K  C 

i.e  Inorder   E A C K 
      Preorder A  E  K  C 

now have found Root again so now tree is 


                                   F
                                /     \
                             A       (H D B G) 
                           /    \
                         E     ( C K )

Step 3)
 Now letters are

Inorder    C  K
Preorder  K C


So now tree is 


                                   F
                                /     \
                             A       (H D B G) 
                           /    \
                         E     K
                               /
                             C

Same procedure can be done on Right Sub tree Of root F


For Postorder we have to find Root as the last element in traversal....

For UPDATED Info VISIT


6 comments :

Feel free to leave comment if you like above widget, have any questions or just say Hi! :)

jQuery Horizontal Smooth Slider/Image Scroller with Next/Prev Button

Here is a simple Image scroller which is showin two imaes at a time [more images can be show with some changes in CSS]




0 comments :

Feel free to leave comment if you like above widget, have any questions or just say Hi! :)

jQuery Smooth Toggle with Changing Show/Hide button

This is a code for jQuery Toggle tool which can Show or Hide the specified text in a div and changed the text in the button accordingly with a smooth transition effect. First there is HTML code then the Script code which must be added with jQuery,js. Working can be seen on DEMO page.




<section class="round-border">
            <div>
                <button href="#collapse1" class="nav-toggle">Show</button>
            </div>
            <div id="collapse1" style="display:none">
                <p>Bla bla bla bla</p>
            </div>
        </section>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script type='text/javascript'>
$(document).ready(function() {
                $('.nav-toggle').click(function(){
                    //get collapse content selector
                    var collapse_content_selector = $(this).attr('href');                    
                    
                    //make the collapse content to be shown or hide
                    var toggle_switch = $(this);
                    $(collapse_content_selector).toggle(function(){
                        if($(this).css('display')=='none'){
                            toggle_switch.html('Show');//change the button label to be 'Show'
                        }else{
                            toggle_switch.html('Hide');//change the button label to be 'Hide'
                        }
                    });
                });
                
            });   
</script>

0 comments :

Feel free to leave comment if you like above widget, have any questions or just say Hi! :)