6 
 
        
      
      Tìm XOR tối đa của hai số trong một khoảng: chúng ta có thể làm tốt hơn bậc hai không?
      
  Giả sử chúng ta đã cho hai số và và chúng ta muốn tìm cho .r max ( i ⊕ j )lllrrrmax(i⊕j)max(i⊕j)\max{(i\oplus j)}l≤i,j≤rl≤i,j≤rl\le i,\,j\le r Thuật toán ngây thơ chỉ đơn giản là kiểm tra tất cả các cặp có thể; ví dụ trong ruby chúng ta sẽ có: def …
      
        
          
                   14
                
        
        
          
                  
                    algorithms 
                  
                    algorithms 
                  
                    machine-learning 
                  
                    statistics 
                  
                    testing 
                  
                    terminology 
                  
                    asymptotics 
                  
                    landau-notation 
                  
                    reference-request 
                  
                    optimization 
                  
                    scheduling 
                  
                    complexity-theory 
                  
                    time-complexity 
                  
                    lower-bounds 
                  
                    communication-complexity 
                  
                    computational-geometry 
                  
                    computer-architecture 
                  
                    cpu-cache 
                  
                    cpu-pipelines 
                  
                    operating-systems 
                  
                    multi-tasking 
                  
                    algorithms 
                  
                    algorithm-analysis 
                  
                    education 
                  
                    correctness-proof 
                  
                    didactics 
                  
                    algorithms 
                  
                    data-structures 
                  
                    time-complexity 
                  
                    computational-geometry 
                  
                    algorithms 
                  
                    combinatorics 
                  
                    efficiency 
                  
                    partitions 
                  
                    complexity-theory 
                  
                    satisfiability 
                  
                    artificial-intelligence 
                  
                    operating-systems 
                  
                    performance 
                  
                    terminology 
                  
                    computer-architecture