1 Aug 2026, 06:24 UTC21 views2 reactionsread 10 August 2026 public class Solution {
public int MaxArea(int[] height) {
var l = 0;
var r = height.Length-1;
var result = 0;
while (l < r) {
result = Math.Max(result, Math.Min(height[l], height[r])*(r-l));
if (height[l] < height[r]) l++;
else r--;
}
return result;
}
}
https://leetcode.com/problems/container-with-most-water/ - One of the …
❤2
30 Jul 2026, 08:51 UTC35 views3 reactionsread 10 August 2026 func smallestPalindrome(s string) string {
s = sortString(s)
m := map[byte]int{}
for i := 0; i < len(s); i++ {
m[s[i]]++
}
var oddChar byte
hasOdd := false
for k, v := range m {
if v % 2 != 0 {
oddChar = k
hasOdd = true
}
}
result := make([]byte, len(s))
if hasOdd {
result[len(s)/2] = oddChar
m[oddChar]--
}
…
❤3
30 Jul 2026, 08:42 UTC28 views8 reactionsread 10 August 2026 func minimumPushes(word string) int {
m := make([]int, 26)
for i := 0; i < len(word); i++ {
m[word[i]-97]++
}
result := 0
n := 0
for i, v := range m {
if m[i] == 0 { continue }
if n < 8 {
result += v
} else if n >= 8 && n < 16 {
result += (v*2)
} else if n >= 16 && n < 24 {
result += (v*3)
} else {
…
❤4❤🔥3💘1
17 Oct 2025, 04:38 UTC147 views13 reactionsread 10 August 2026 Photo
I have achieved this badge, so it is not bad, but it is only beginning of journey ;)
🔥10❤2💘1
13 Oct 2025, 17:21 UTC145 views9 reactionsread 10 August 2026 func getIntersectionNode(headA, headB *ListNode) *ListNode {
dymmyA := &ListNode{
Next: headA,
}
dymmyB := &ListNode{
Next: headB,
}
i := 0
for headA != nil {
headA = headA.Next
i++
}
j := 0
for headB != nil {
headB = headB.Next
j++
}
var (
f *ListNode
s *ListNode
)
k := 0
if j < i {
f = dym…
💋7❤1🔥1
30 Sept 2025, 09:40 UTC103 views7 reactionsread 10 August 2026 public class Solution {
public int TriangularSum(int[] nums) {
var m = nums.Length;
for (var i = 0; i < nums.Length-1; i++) {
for (var j = 0; j < m-1; j++) {
nums[j] = (nums[j]+nums[j+1])%10;
}
m--;
}
return nums[0];
}
}
https://leetcode.com/problems/find-triangular-sum-of-an-array/description/?envType=daily-question&envId=202…
🔥3❤2👍1💋1
22 Sept 2025, 15:15 UTC82 views8 reactionsread 10 August 2026 public class Solution {
public ListNode MergeInBetween(ListNode list1, int a, int b, ListNode list2) {
ListNode pointA = null;
ListNode pointB = null;
var curr = list1;
var i = 0;
while(curr != null) {
if (i == a-1) pointA = curr;
if (i == b+1) {
pointB = curr;
break;
}
curr = curr.next;
…
❤4🔥2💋1💔1
21 Sept 2025, 14:32 UTC69 views11 reactionsread 10 August 2026 type Router struct {
limit int
queue [][3]int
storage map[[3]int]bool
destTimestampMap map[int][]int
}
func Constructor(memoryLimit int) Router {
return Router{
limit: memoryLimit,
queue: make([][3]int, 0, memoryLimit),
storage: make(map[[3]int]bool),
destTimestampMap: map[int][]int{},
}
}
func (this *Router) AddPacket(source int, destination int, timestamp …
🔥5❤4💋2
12 Sept 2025, 14:57 UTC61 views7 reactionsread 10 August 2026 public class Solution {
public bool DoesAliceWin(string s) {
var set = new HashSet<char>{'a','e','i','o','u'};
var count = 0;
foreach (char r in s) {
if (set.Contains(r)) {
count++;
}
}
return count == 0 ? false : true;
}
}
https://leetcode.com/problems/vowels-game-in-a-string/?envType=daily-question&envId=2025-09-12 - daily que…
❤3🔥3💋1
11 Sept 2025, 14:49 UTC61 views7 reactionsread 10 August 2026 public class Solution {
public string SortVowels(string s) {
var vowelsSet = new HashSet<char>{'A','a','E','e','I','i','O','o','U','u'};
var vowels = new List<char>();
for (var i = 0; i < s.Length; i++) {
if (vowelsSet.Contains(s[i])) {
vowels.Add(s[i]);
}
}
vowels.Sort();
var j = 0;
char[] result = s.ToCharArray();
…
🔥4🐳2💋1
4 Sept 2025, 15:01 UTC69 views7 reactionsread 10 August 2026 public class Solution {
public int FindClosest(int x, int y, int z) => Math.Abs(x-z) == Math.Abs(y-z) ? 0 : (Math.Abs(x-z) < Math.Abs(y-z) ? 1 : 2);
}
https://leetcode.com/problems/find-closest-person/?envType=daily-question&envId=2025-09-04 - daily question
topics: #math
level: #easy
probably the easiest easy
🔥3🦄2🍓1💋1
1 Sept 2025, 12:45 UTC89 views12 reactionsread 10 August 2026 public class Solution {
public double MaxAverageRatio(int[][] classes, int extraStudents) {
var pq = new PriorityQueue<int[], double>(Comparer<double>.Create((x, y) => y.CompareTo(x)));
foreach (var currentClass in classes) {
var a = (double) currentClass[0];
var b = (double) currentClass[1];
var res = ((a+1)/(b+1)) - (a/b);
pq.Enqueue(currentClass…
🏆5💔3🔥2🍓1💋1
Showing the 12 most recent of 20 posts we hold for @leetcode_to_faang. View and reaction counts are the latest single reading for each post, not a live figure, and a recent post is still accumulating both. A view count marked ≈ was rounded by Telegram before we ever saw it — t.me prints views in full below 1,000 and to three significant figures above, so ≈1,200,000 means somewhere between 1,150,000 and 1,249,999. Unmarked counts are exact. Text is reproduced from the public post preview and truncated for length.