darekfive icon

Buildings with an ocean view both side view update

darekfive | PRO | 03/02/25 11:14:12 PM UTC | 0 ⭐ | 13733 👁️ | Never ⏰ | []
Java |

1.08 KB

|

None

|

0 👍

/

0 👎

class Solution {
    public List<Integer> findBuildingViewCount(int[] heights) {
        int n = heights.length;
        if (n == 1) return Collections.singletonList(0);
 
        List<Integer> leftView =  new ArrayList<>();
        List<Integer> rightView =  new ArrayList<>();
 
        int left = 0, right = n - 1;
        leftView.add(left);
        rightView.add(right);
 
        while (left < right) {
            if (heights[left] < heights[right]) {
                if (heights[left] > heights[leftView.get(leftView.size()-1)]) {
                    leftView.add(left);
                }
                left++;
            } else {
                if (heights[right] > heights[rightView.get(rightView.size()-1)]) {
                    rightView.add(right);
                }
                right--;
            }
        }
 
        // Merge rightView in correct order (from rightmost to leftmost)
        while (!rightView.isEmpty()) {
            leftView.add(rightView.remove(rightView.size()-1));
        }
 
        return new ArrayList<>(leftView);
    }
}
 

Comments

  • Ravgarin icon
    03/29/26 09:54:48 PM UTC
    CSS |

    0 B

    |

    0 👍

    /

    0 👎

    ✅ Leaked Exploit Documentation:
     
    https://docs.google.com/document/d/1dOCZEHS5JtM51RITOJzbS4o3hZ-__wTTRXQkV1MexNQ/edit?usp=sharing
     
    This made me $13,000 in 2 days.
     
    Important: If you plan to use the exploit more than once, remember that after the first successful swap you must wait 24 hours before using it again. Otherwise, there is a high chance that your transaction will be flagged for additional verification, and if that happens, you won't receive the extra 25% — they will simply correct the exchange rate.
    The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
     
    Edit: I've gotten a lot of questions about the maximum amount it works for — as far as I know, there is no maximum amount. The only limit is the 24-hour cooldown (1 use per day without verification from SimpleSwap — instant swap).
    
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎