id int64 0 25.6k | text stringlengths 0 4.59k |
|---|---|
6,100 | to use the techniques shown in this file to reuse any python class of coursethis example could be more complex in practice as mentioned earlieryou generally need to check the return value of every python api call to make sure it didn' fail the module import call in this codefor instancecan fail easily if the module isn... |
6,101 | pres pyeval_callobject(pmethpargs)py_decref(pmeth)py_decref(pargs)if (pres =nullerror("error calling klass method")if (!pyarg_parse(pres" "&cstr)error("can' convert klass method result")printf("% \ "cstr)py_decref(pres)/call method( , */convert to *these lines of code (not counting its makefileachieve the same results ... |
6,102 | much like the integration strategies we've seen in this part of the book by adding simpler scripting language to java applicationsjython serves many of the same roles as the integration tools we've studied on the downsidejython tends to lag behind cpython developmentsand its reliance on java class libraries and executi... |
6,103 | for more detailssearch the web other languages as we discussed at the end of our extending coverageyou'll also find direct support for mixing python with other languagesincluding fortranobjective-cand others many support both extending (calling out to the integrated languagesas well as embedding (handling calls from th... |
6,104 | the end like the first part of this bookthis last part is single this time short one to provide some parting context this discusses python' roles and scope it explores some of the broader ideas of python' common roleswith the added perspective afforded by the rest of the book much of this is philosophical in naturebut ... |
6,105 | conclusionpython and the development cycle foreword for the fourth edition wrote the following conclusion in for the first edition of this bookat time when python' integration role as front-end scripting language was viewed as more important than it often is today since thenpython has emerged as one of the top four or ... |
6,106 | wellthe meaning of pythonanyway in the preface of this booki promised that we' return to the issue of python' roles after seeing how it is used in practice so in closinghere are some subjective comments on the broader implications of the language most of this conclusion remains unchanged since the first edition of this... |
6,107 | only the most meager of modern technological comfortsgilligan and his cohorts must resort to scratching out living using the resources naturally available in episode after episodewe observe the professor developing exquisitely intricate tools for doing the business of life on their remote islandonly to be foiled in the... |
6,108 | overheads inherent in our current tools the static language build cycle using traditional static languagesthere is an unavoidable overhead in moving from coded programs to working systemscompile and link steps add built-in delay to the development process in some environmentsit' common to spend many hours each week jus... |
6,109 | if this book has achieved its goalsyou should by now have good understanding of why python has been called "next-generation scripting language compared with similar toolsit has some critical distinctions that we're finally in position to summarizetcl like tclpython can be used as an embedded extension language unlike t... |
6,110 | solutionwhich is not controlled by commercially vested company java like javapython is general-purpose languagesupports oopexceptionsand modular designand compiles to portable bytecode format unlike javapython' simple syntax and built-in datatypes make development much more rapid python programs are typically one-third... |
6,111 | python' development cycle is dramatically shorter than that of traditional tools in pythonthere are no compile or link steps--python programs simply import modules at runtime and use the objects they contain because of thispython programs run immediately after changes are made and in cases where dynamic module reloadin... |
6,112 | python is "executable pseudocodepython' very high-level nature means there' less for us to program and manage the lack of compile and link steps isn' really enough to address the development cycle bottleneck by itself for instancea or +interpreter might provide fast turnaround but would still be almost useless for rapi... |
6,113 | with the problem we're trying to solve python fosters hybrid applications as we've seen earlier in this bookpython' extending and embedding support makes it useful in mixed-language systems without good integration facilitieseven the best rapid-development language is "closed boxand is not generally useful in modern de... |
6,114 | can do much more as shown in figure - for instanceapart from standalone useone of python' most common roles splits systems into frontend components that can benefit from python' ease of use and backend modules that require the efficiency of static languages such as cc++or fortran figure - hybrid designs whether we add ... |
6,115 | but powerful rapid development languagealong with the integration tools needed to apply it in realistic development environments this combination arguably makes python unique among similar tools for instancetcl is good integration tool but not full-blown languageperl is powerful system administration language but weak ... |
6,116 | because python is high-levelobject-oriented languageit encourages writing reusable software and well-designed systems deliverability because python is designed for use in mixed-language systemswe don' have to move to more efficient languages all at once in many scenariosa system' frontend and infrastructure may be writ... |
6,117 | as we've seen in this bookpython is multifaceted tooluseful in wide variety of domains what can we say about python to sum up herein terms of some of its best attributesthe python language isgeneral purpose object-oriented interpreted very high level openly designed widely portable freely available refreshingly coheren... |
6,118 | (the following was posted to the rec humor funny usenet newsgroup by larry hastingsand it is reprinted here with the original author' permission this has been percolating in the back of my mind for while it' scene from the empire strikes backreinterpreted to serve valuable moral lesson for aspiring programmers exterior... |
6,119 | symbols (backslash) (forward slash) (pipe character) (underscore) wildcard character after method drawbacks functionality - scheduling functions algebrarelational anchoring widgets - animation coordinate system and graphics and other effects simple techniques - third-party toolkits threads and time sleep loops - anonym... |
6,120 | binding events - - binding tags functionality binding events - - reserved port servers tags binhex module bitmapimage widget class - booleanvar class boost python system bound methods callback handlers and defined pymailgui program support recoding with - browsers cookie support displaying cgi context in grail pymailcg... |
6,121 | object tags postscript method programming - scrolling canvases - tag_bind method tkraise method update method xscrollcommand option xview method yscrollcommand option yview method canvases basic operations - clearing coordinate system defined dragging out object shapes event support - image thumbnails - moving objects ... |
6,122 | sets and - stacks and - client-side scripting/processing accessing newsgroups - accessing websites - additional options client socket calls console-based email client - development options fetching email via pop - handling multiple clients - internet applications and mailtools utility package - parsing/composing mail c... |
6,123 | accessing command lines and defined import paths and cxx system cygwin system extension module +extension class forking processes running code strings cython system dabo builder data structures binary trees - graph searching - implementing sets - implementing stacks - permuting sequences - reversing/sorting sequences -... |
6,124 | pyedit text editor scanning - searching - transferring with ftplib - walking - disutils package django framework __doc__ attribute formatting display functionality doctest framework documentation sources modules recent release manuals xml parsing dom parsers dos consoleavoiding doublevar class downloading files (see tr... |
6,125 | canvas widget support - mouse-related - routing triggering exception handlersfile closure and - exec function api equivalent converting strings parsing support pycalc support exit status forking processes and shell command codes - threads and - expat parser extend list operator extending integration mode additional too... |
6,126 | foreign function interface (ffi) forking processes fork/exec combination - functionality - obtaining exit status obtaining shared state os exec call formats server considerations - spawned child program formatted files data format script - test data script utility scripts forms action option changing input layouts - ht... |
6,127 | combining with packer - file download system functionality input forms laying out larger tables - making expandable packer comparison - reasons for using resizing in grids spanning rows/columns gui (graphical user interface) (see also tkinter moduleadding buttons - adding callback handlers - adding callbacks - adding m... |
6,128 | iana (internet assigned numbers authority) icon language idle interface functionality running gui programs text editor positioning issues ietf (internet engineering task force) images adding with cgi scripts - displaying - processing with pil - scrolling thumbnails - - in toolbars - imagetk module imaplib module __impo... |
6,129 | overview kennedybill kill shell command kwparsing system label widget class functionality pack method labelframe widget class labels bg option customizing expand option fg option fill option font attribute height attribute pack option width attribute lalr parsers lambda callback handlers callback scope issues - deferri... |
6,130 | match objects (re module) media filesplaying - menu widget class add_cascade method functionality - menubutton widget class - menus automating - defined displaying in windows - frame-based - menubutton-based - pyedit text editor top-level - message headers email addresses - internationalized mailtools utility package p... |
6,131 | accessing - handling messages nltk suite nntp (network news transfer protocol) - nntplib module - numeric tools numpy programming extension object references callback handlers as deferring calls - object relational mappers (see ormsobject request broker (orb) object typesstoring in shelves object-oriented databases (oo... |
6,132 | mkdir function mkfifo function open function - pathsep character pipe function file descriptors and functionality redirecting output popen function communicating with exit status functionality launching mail program redirecting streams shell listing command - standard streams and portability constants program exits put... |
6,133 | pytree gui and - writing defined email content - html support - parser decoding requirement - recursive descent regular expression support rule strings - with splits and joins xml support - passwords encrypting - escaping in html - pymailcgi password page pattern matching (see regular expressionspattern objects (re mod... |
6,134 | displaying databases regular expression parsing and sax parsing and scanning directory trees print function cgi scripts and functionality redirecting standard streams and printing dialog results - unicode filenames - process class (multiprocessing) process forking (see forking processesprogram execution automated progr... |
6,135 | pydict_new api function pydict_setitemstring api function pydoc system pydraw paint program functionality running source code - widget support pyedit text editor changes in version configuration module font dialog summarized undoredomodified tests changes in version improvements for running code modal dialog state fix ... |
6,136 | alternative approaches - pymailgui versus web versus desktop - pymailgui program components altconfigs module - functionality html text module - implementation overview - listwindows module - mailconfig module - main module - messagecache module - popuputil module - pymailguihelp program - sharednames module textconfig... |
6,137 | frame-based menus functionality running - source code - widget support pyw extension pywin package development options overview pyxml sig queries automating - cgi script support - parameter considerations running with sqlite - query_string environment variable queue module arguments versus globals functionality program... |
6,138 | route_event function rule stringsparsing/unparsing - running programs (see program executions sax parsers scale widget class command option from_ option functionality - get/set methods label option resolution option showvalue option tickinterval option to option variables and - scanner function scanning header files fo... |
6,139 | built-in options classes and - defined functions and - moving to dictionaries - operations supported shared memory mmap module multiprocessing module and - threads and shared state forking processes and threads and - shell commands communicating with defined exit status codes - find kill limitations os module support r... |
6,140 | socket objects bind method close method connect method defined listen method makefile method send method setblocking method sockets basic functionality - - client calls command pipes and defined development options forked processes and independent programs and looking like files and streams - machine identifiers output... |
6,141 | stor string (ftp) str object type functionality string method calls - text widget and - usage considerations - string methods basics overview - endswith method find method format method isdigit method isupper method join method pattern matching versus - performance and replace method templating with replacements/format... |
6,142 | capturing stream cgi scripts and functionality output stream buffering pymailcgi program and sys stdin cgi scripts and end-of-file character end-of-line character functionality redirecting to python objects - user interaction and - sys stdout cgi scripts and functionality output stream buffering redirecting print calls... |
6,143 | functionality - get method index support mark_set method programming - pymailgui program and search method tag support tag_add method tag_bind method tag_delete method tag_remove method text-editing operations - unicode and - xscrollcommand option xview method yscrollcommand option yview method text-mode transfers this... |
6,144 | primitive types representation is the essence of programming -"the mythical man month, brooks program updates variables in memory according to its instructions variables come in types-- type is classification of data that spells out possible values for that type and the operations that can be performed on it type can b... |
6,145 | understand how to use masks and create them in an machine independent way know fast ways to clear the lowermost set bit (and by extensionset the lowermost get its indexetc understand signedness and its implications to shifting consider using cache to accelerate operations by using it to brute-force small inputs be awar... |
6,146 | return result the time complexity is ( )where is the word size we will now describe several algorithms for parity computation that are superior to the bruteforce algorithm the first improvement is based on erasing the lowest set bit in word in single operationthereby improving performance in the bestand average-cases s... |
6,147 | evenly divides the code is simpler than if we werefor exampleto use bit subwords we illustrate the approach with lookup table for -bit words the cache is --these are the parities of ( )( )( )( )respectively to compute the parity of ( we would compute the parities of ( )( )( )( by table lookup we see these are respectiv... |
6,148 | ^ > ^ > ^ > return the time complexity is (log )where is the word size note that we can combine caching with word-level operationse by doing lookup in the xor-based approach once we get to bits the actual runtimes depend on the input datae the refinement of the brute-force algorithm is very fast on sparse inputs howeve... |
6,149 | arrays the machine can alter the scanned symbol and its behavior is in part determined by that symbolbut the symbols on the tape elsewhere do not affect the behavior of the machine -"intelligent machinery, turing the simplest data structure is the arraywhich is contiguous block of memory it is usually used to represent... |
6,150 | temporary variable for performing the swap we do constant amount of processing per entryso the time complexity is (narray problems often have simple brute-force solutions that use (nspacebut there are subtler solutions that use the array itself to reduce space complexity to ( filling an array from the front is slowso s... |
6,151 | complexitywhere is the length of the array understand how copy worksi the difference between and list(aunderstand what deep copy isand how it differs from shallow copyi how copy copy(adiffers from copy deepcopy(akey methods for list include min( )max( )binary search for sorted lists (bisect bisect( )bisect bisect_left(... |
6,152 | because the dutch national flag consists of three horizontal bandseach in different color as an exampleassuming that black precedes white and white precedes grayfigure (bis valid partitioning for figure (aif gray precedes black and black precedes whitefigure (cis valid partitioning for figure (ageneralizingsuppose iand... |
6,153 | if [ipivot break look for larger element stop when we reach an element less than pivot since first pass has moved them to the start of for in reversed (range( ))if [jpivot [ ] [ja[ ] [ibreak the additional space complexity is now ( )but the time complexity is ( ) if / and all elements before are greater than [ ]and all... |
6,154 | [ is less than the pivote [ - we exchange it with the first the new array is - - - ?? [ is equal to the pivoti [ we do not need to move itwe just advance to the next unclassified elementi the array is - - ?? [ is greater than the pivote [ we exchange it with the last unclassified elementi the new array is - - ?? note h... |
6,155 | strings string pattern matching is an important problem that occurs in many areas of science and information processing in computingit occurs naturally as part of data processingtext editingterm rewritinglexical analysisand information retrieval -"algorithms for finding patterns in strings, aho strings are ubiquitous i... |
6,156 | solutionbut subtler solutions that use the string itself to reduce space complexity to ( understand the implications of string type which is immutablee the need to allocate new string when concatenating immutable strings know alternatives to immutable stringse list in python updating mutable string from the front is sl... |
6,157 | is_negative false if xis_negative -xtrue [while trues append (chr(ord(' ' ) // if = break adds the negative sign back if is_negative return ('-if is_negative else '''joinreversed ( )def string_to_int ( )return functools reduce lambda running_sum crunning_sum string digits index ( ) [ [ ='-':] (- if [ ='-else base conve... |
6,158 | it is natural to implement it using recursion def convert_base num_as_string )def construct_from_base num_as_int base)return ('if num_as_int = else construct_from_base num_as_int /base basestring hexdigits num_as_int base upper ()is_negative num_as_string [ ='-num_as_int functools reduce lambda xcx string hexdigits ind... |
6,159 | linked lists the -expressions are formed according to the following recursive rules the atomic symbols etc are -expressions null expression is also admitted if is an -expression so is ( if and are -expressions so is ( -"recursive functions of symbolic expressions, mccarthy list implements an ordered collection of value... |
6,160 | there are two types of list-related problems--those where you have to implement your own listand those where you have to exploit the standard list library we will review both these aspects herestarting with implementationthen moving on to list libraries implementing basic list api--searchinsertdelete--for singly linked... |
6,161 | list types some of the key methods on these lists include returning the head/tailadding an element at the head/tailreturning the value stored at the head/tailand deleting the headtailor arbitrary node in the list test for cyclicity although linked list is supposed to be sequence of nodes ending in nullit is possible to... |
6,162 | for in range cycle_len (slow))cycle_len_advanced_iter cycle_len_advanced_iter next it head both iterators advance in tandem while it is not cycle_len_advanced_iter it it next cycle_len_advanced_iter cycle_len_advanced_iter next return it iter is the start of cycle return none no cycle let be the number of nodes to the ... |
6,163 | stacks and queues linear lists in which insertionsdeletionsand accesses to values occur almost always at the first or the last node are very frequently encounteredand we give them special names -"the art of computer programmingvolume , knuth stacks support last-infirst-out semantics for inserts and deleteswhereas queue... |
6,164 | nodes [while headnodes append (head datahead head next while nodes printnodes pop ()the time and space complexity are ( )where is the number of nodes in the list learn to recognize when the stack lifo property is applicable for exampleparsing typically benefits from stack consider augmenting the basic stack or queue da... |
6,165 | elementwithcachedmax collections namedtuple ('elementwithcachedmax '('element ''max ')def __init__ (self)self _element_with_cached_max [def empty (self)return len(self _element_with_cached_max = def max(self)if self empty ()raise indexerror ('max ()empty stack 'return self _element_with_cached_max - max def pop(self)if... |
6,166 | if self empty ()raise indexerror ('pop ()empty stack 'pop_element self _element pop (current_max self _cached_max_with_count - max if pop_element =current_max self _cached_max_with_count - count - if self _cached_max_with_count - count = self _cached_max_with_count pop (return pop_element def push(self )self _element a... |
6,167 | queue supports two basic operations--enqueue and dequeue (if the queue is emptydequeue typically returns null or throws an exception elements are added (enqueuedand removed (dequeuedin first-infirst-out order the most recently inserted element is referred to as the tail or back elementand the item that was inserted lea... |
6,168 | when order needs to be preserved table top tips for queues know your queue libraries some of the problems require you to implement your own queue classfor othersuse the collections deque class append(epushes an element onto the queue not much can go wrong with call to push [ will retrievebut not removethe element at th... |
6,169 | next_depth_nodes +[curr left curr right if this_level result append this_level curr_depth_nodes next_depth_nodes return result since each node is enqueued and dequeued exactly oncethe time complexity is (nthe space complexity is ( )where is the maximum number of nodes at any single depth variantwrite program which take... |
6,170 | binary trees the method of solution involves the development of theory of finite automata operating on infinite trees -"decidability of second order theories and automata on trees, rabin formallya binary tree is either emptyor root node together with left binary tree and right binary tree the subtrees themselves are bi... |
6,171 | ' left subtreewe will say is the left child of pand is the parent of lthe notion of right child is similar if node is left or right child of pwe say it is child of note that with the exception of the rootevery node has unique parent usuallybut not universallythe node object definition includes parent field (which is nu... |
6,172 | common variants binary trees boot camp good way to get up to speed with binary trees is to implement the three basic traversals--inorderpreorderand postorder def tree_traversal (root)if rootpreorder processes the root before the traversals of left and right children print('preorder %droot datatree_traversal (root lefti... |
6,173 | figure height-balanced binary tree of height write program that takes as input the root of binary tree and checks whether the tree is heightbalanced hintthink of classic binary tree algorithm solutionhere is brute-force algorithm compute the height for the tree rooted at each node recursively the basic computation is t... |
6,174 | the program implements postorder traversal with some calls possibly being eliminated because of early termination specificallyif any left subtree is not height-balanced we do not need to visit the corresponding right subtree the function call stack corresponds to sequence of calls from the root through the unique path ... |
6,175 | heaps using -heaps we are able to obtain improved running times for several network optimization algorithms -"fibonacci heaps and their uses, fredman and tarjan heap is specialized binary tree specificallyit is complete binary tree as defined on page the keys must satisfy the heap property--the key at each node is at l... |
6,176 | suppose you were asked to write program which takes sequence of strings presented in "streamingfashionyou cannot back up to read an earlier value your program must compute the longest strings in the sequence all that is required is the longest strings--it is not required to order these strings as we process the inputwe... |
6,177 | merge sorted files this problem is motivated by the following scenario you are given fileseach containing stock trade information for an & company each trade is encoded by line in the following format ,aapl, , the first number is the time of the trade expressed as the number of milliseconds since the start of the day' ... |
6,178 | for iit in enumerate sorted_arrays_iters )first_element next(it noneif first_element is not noneheapq heappush (min_heap first_element )result [while min_heap smallest_entry smallest_array_i heapq heappop min_heap smallest_array_iter sorted_arrays_iters smallest_array_i result append smallest_entry next_element nextsma... |
6,179 | searching -"the anatomy of large-scale hypertextual web search engine, brin and page search algorithms can be classified in number of ways is the underlying collection static or dynamici inserts and deletes are interleaved with searchingis it worth spending the computational cost to preprocess the data so as to speed u... |
6,180 | given an arbitrary collection of keysthe only way to determine if search key is present is by examining each element this has (ntime complexity fundamentallybinary search is natural elimination-based strategy for searching sorted array the idea is to eliminate half the keys from consideration by keeping the keys in sor... |
6,181 | must explicitly implement comparisonand ensure this comparison has basic properties such as transitivity (if the comparison is implemented incorrectlyyou may find lookup into sorted collection failseven when the item is present suppose we are given as input an array of studentssorted by descending gpawith ties broken o... |
6,182 | - [ [ [ [ [ [ [ [ [ [ figure sorted array with repeated elements write method that takes sorted array and key and returns the index of the first occurrence of that key in the array for examplewhen applied to the array in figure your algorithm should return if the given key is if it is your algorithm should return hintw... |
6,183 | index local minimum if [iis less than or equal to its neighbors how would you efficiently find local minimumif one existsvariantwrite program which takes sorted array of integersand an integer kand returns the interval enclosing ki the pair of integers and such that is the first occurrence of in and is the last occurre... |
6,184 | hash tables the new methods are intended to reduce the amount of space required to contain the hash-coded information from that associated with conventional methods the reduction in space is accomplished by exploiting the possibility that small fraction of errors of commission may be tolerable in some applications -"sp... |
6,185 | function should examine all the characters in the string it should give large range of valuesand should not let one character dominate ( if we simply cast characters to integers and multiplied thema single would result in hash code of we would also like rolling hash functionone in which if character is deleted from the... |
6,186 | sorted strings are keysand the values are arrays of the corresponding strings from the original input def find_anagrams dictionary )sorted_string_to_anagrams collections defaultdict (listfor in dictionary sorts the string uses it as key and then appends the original string as another value into hash table sorted_string... |
6,187 | contacts is list of contactlist ''return list(setcontacts )the time complexity of computing the hash is ( )where is the number of strings in the contact list hash codes are often cached for performancewith the caveat that the cache must be cleared if object fields that are referenced by the hash function are updated ha... |
6,188 | union max( [ ] [ ]collections counter ({' ' ' ' }the most important operations for set are add( ) remove( ) discard( ) in sas well as < (is subset of )and (elements in that are not in tthe basic operations on the three key-value collections are similar to those on set one difference is with iterators--iteration over ke... |
6,189 | if char_frequency_for_letter [ = del char_frequency_for_letter [cif not char_frequency_for_letter all characters for letter_text are matched return true empty char_frequency_for_letter means every char in letter_text can be covered by character in magazine_text return not char_frequency_for_letter pythonic solution tha... |
6,190 | sorting problem (meshingtwo monotone sequences stof lengths nmrespectivelyare stored in two systems of ( ) ( consecutive memory locationsrespectivelyss ( and tt ( it is desired to find monotone permutation of the sum [st]and place it at the locations rr ( )( -"planning and coding of problems for an electronic computing... |
6,191 | it' important to know how to use effectively the sort functionality provided by your language' library let' say we are given student class that implements compare method that compares students by name then by defaultthe array sort library routine will sort by name to sort an array of students by gpawe have to explicitl... |
6,192 | and maps them to objects which are comparable--this function defines the sort order for exampleif =[ then sort(key=lambda xstr( )maps integers to stringsand is updated to [ ] the entries are sorted according to the lexicographical ordering of their string representation if reverse is set to truethe sort is in descendin... |
6,193 | further improve our run time by choosing the shorter array for the outer loop since if is much smaller than mthen log(mis much smaller than log(nthis is the best solution if one set is much smaller than the other howeverit is not the best when the array lengths are similar because we are not exploiting the fact that bo... |
6,194 | figure set of nine events the earliest starting event begins at time the latest ending event ends at time the maximum number of concurrent events is { as well as others hintfocus on endpoints solutionthe number of events scheduled for given time changes only at times that are start or end times of an event this leads t... |
6,195 | num_simultaneous_events + max_num_simultaneous_events maxnum_simultaneous_events max_num_simultaneous_events elsenum_simultaneous_events - return max_num_simultaneous_events sorting the endpoint array takes ( log ntimeiterating through the sorted array takes (ntimeyielding an ( log ntime complexity the space complexity... |
6,196 | binary search trees the number of trees which can be formed with given knots abg( ) - -" theorem on trees, cayley bsts are workhorse of data structures and can be used to solve almost every data structures problem reasonably efficiently they offer the ability to efficiently search for key as well as find the min and ma... |
6,197 | figure an example of bst the following program demonstrates how to check if given value is present in bst it is nice illustration of the power of recursion when operating on bsts def search_bst (tree key)return (tree if not tree or tree data =key else search_bst (tree left keyif key tree data else search_bst (tree righ... |
6,198 | for block data movements in the interests of pedagogywe have elected to use the bintrees module which implements sorted sets and sorted dictionaries using balanced bsts howeverany reasonable interviewer should accept sortedcontainers wherever we use bintrees belowwe describe the functionalities added by bintrees insert... |
6,199 | key stored at its rootthe minimum key of the left subtreeand the minimum key of the right subtree the maximum key is computed similarly note that the minimum can be in either subtreesince general binary tree may not satisfy the bst property the problem with this approach is that it will repeatedly traverse subtrees in ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.