View allAll Photos Tagged bitwise
Problem Statement
Flipping an Image LeetCode Solution - We are given a matrix of size n. We need to perform 2 tasks-
- flip the image horizontally: it means each row of the given matrix is reversed
- invert the image: make all 0’s to 1’s & vice versa
Return the resulting matrix.
Given matrix contains only 0 or 1 and size of image is ≤ 20.
Examples & Explanations
Example 1:
Input: image = ,,]
Output: ,,]
Explanation: First reverse each row: ,,].
Then, invert the image: ,,]
Example 2:
Input: image = ,,,]
Output: ,,,]
Explanation: First reverse each row: ,,,].
Then invert the image: ,,,]
Approach
After reviewing some examples you will notice the following patterns:
1) Look at the first and last value of the row. If they are the same (1,1 or 0,0), they will be flipped in the output.
If they are different (1,0 or 0,1), they do not change. Work your way inward to the middle of the list
applying this rule.
2) If the row has an odd number of entries, the middle value always flips. For example if len(row) = 5,
then row must change values.
Bitwise XOR --> 0^1 = 1, 1^1 =0
Let i be the index at the beginning of the row, and j be the index at the end of the row. If the values at
these indices (row and row) are equal, flip their values using XOR ^. If the values are not equal, do
nothing and move i and j closer to the middle. When i == j , the code still executes as it should.
www.tutorialcup.com/leetcode-solutions/flipping-an-image-...
KS, Dhali, Nitzee, Akhil having Bitwise refreshments. We got it from Little Sisters Bar and Restaurant and Confectionary
Cyber Security Consortium Taking Place At Bitwise in Fresno - t.co/S3itf2z7B8 (via Twitter twitter.com/DataCorpLTD/status/938698364450848769)
Tổng cộng, 9 ETF này đã gom tới hơn 150.000 Bitcoin (khoảng 6,5 tỷ USD) trong tài sản quản lý, bỏ xa GBTC
🔶 Ai là những "tân binh" này?
BlackRock (IBIT)
Fidelity (FBTC)
Bitwise (BITB)
Ark 21Shares (ARKB)
Invesco (BTCO)
VanEck (HODL)
Valkyrie (BRRR)
Franklin Templeton (EZBC)
WisdomTree (BTCW)
🔶GBTC hụt hơi:
Ông vua cũ GBTC đang chứng kiến tài sản quản lý giảm mạnh 126.000 Bitcoin (khoảng 5,5 tỷ USD) kể từ khi các ETF mới xuất hiện.
Thị phần giao dịch của GBTC cũng giảm gần một nửa, từ 63,9% xuống còn 36,4% chỉ trong vài ngày.
🔶"Tiền tươi" đổ vào thị trường:
Tổng số tiền đổ vào các ETF Bitcoin mới đã vượt 1 tỷ USD trong ngày hôm qua, đánh dấu sự hồi sinh sau 4 ngày "chảy máu" tuần trước.
Tổng cộng, 9 ETF mới đã thu hút 6,25 tỷ USD, trong khi GBTC bị rút ròng 5,23 tỷ USD.
🔶Chi tiết đáng chú ý:
Lần đầu tiên kể từ ngày 11/1, lượng tiền đổ vào FBTC và IBIT trong một ngày vượt quá lượng tiền rút khỏi GBTC.
BlackRock's IBIT hiện đã vượt qua tổng tài sản quản lý của tất cả các ETF Bitcoin của Canada cộng lại.
🎯 Tóm lại:
Sự xuất hiện của 9 ETF Bitcoin mới đang tạo nên một cơn bão mới trên thị trường. Dòng tiền đổ vào các ETF này đang khiến GBTC hụt hơi và hứa hẹn một tương lai sôi động cho Bitcoin ETF nói chung.