- Read How to answer a coding interview.
- Read Using sliding window technique to solve coding interview questions.
- Practice coding Array 1 Two Sum
- Practice coding Array 2 Three Sum
- Practice coding Array 3 Max Consecutive Ones III
- Practice coding Array 4 Maximum Product Subarray
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import os | |
| f = open('removed_parcels.txt') | |
| removed_parcels = f.readlines() | |
| f.close() | |
| if removed_parcels[0] == '\n': | |
| num_parcels = 0 | |
| removed_parcels_str = "No parcel is removed" | |
| else: | |
| num_parcels = len(removed_parcels) | |
| removed_parcels_str = '' | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | SELECT | |
| pid, | |
| user_name, | |
| starttime, | |
| query | |
| FROM stv_recents | |
| WHERE status = 'Running' | |
| AND user_name = ‘admin’ | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | -- Bad use of aggregation | |
| SELECT | |
| users.id, | |
| users.email, | |
| users.name, | |
| MAX(users.created_at) AS created_at, -- not necessary | |
| COUNT(orders.id) AS orders_count | |
| FROM orders | |
| LEFT JOIN users | |
| ON users.id = orders.user_id |