es
Feedback

¡No caigas en manos de tramposos! Telemetrio encuentra y marca estos canales 👉 Si quieres ver la etiqueta, suscríbete

Samri-A

Samri-A

Ir al canal en Telegram

Hey, I’m Samri 🤗. in one word "someone curious" This channel is my log book.

Mostrar más
El país no está especificadoLa categoría no está especificada
309
Suscriptores
Sin datos24 horas
-17 días
Sin datos30 días
Archivo de publicaciones
Was touching grass 😌 with @helina_commit
Was touching grass 😌 with @helina_commit
21 mar, 13:24

long time no seen 😁 it's been months since I last touched data or ml
long time no seen 😁 it's been months since I last touched data or ml
20 mar, 22:12

As @sudojajos suggested, I will post like this. My plan was to post daily ,but at night I forget and end up sleeping 😥
20 mar, 22:06

If you’ve solved any of these, comment your approach 🙂
20 mar, 21:52

Day 15 : Thursday 1, two city scheduling
First, I calculated the cost difference between the two cities and stored it with A and B values in a multi list. Then I sorted this list by their cost differences (so the large negative values appear first , for example, if city B costs 50 and city A costs 450, the difference relative to A is –350, so we prefer sending this person to B). After sorting, I assigned the first half of the list to the city used as the reference when computing the differences, and the remaining half to the other city. time : O(n log n) space : O(n) - used extra for cost difference
2, Browser history
My approach : I used doubly linked list and for back function used prev method and for forward function next method time : O(steps) - for each function call space : O(1)
3, Sub array sum div by k
this is prefix sum problem My approach : loop over the list and calculate prefix sums. In each step , store the current prefix sum modulo it in hash table and if the current modulo is already in the hash table , we take that frequency modulo to increase the subarray count time : O(n) space: O(n) - worst case
4, Remove stars
this is stack problem my approach : loop over the string and push the characters until we find * and pop once. finally we pop everything to a string time : O(n) space : O(n)
5, Recent calls
this is queue problem my approach : append the call range to the queue and if the left most ( the first ) element is not in the range of the current we dequeue that , and repeat until the first element is in the range of the current , and finally return the length of the queue time : O(1) ... but in worst case, we have to pop everything so it depends on length of the queue , idk how to express this tho space : O(1)
6, DataStream
this is design problem my approach : initially, store the value in hashtable to count it's frequency we check if the number is equal to the value , if it does we increase the count if not we reset our counter to zero and if the current count is lessthan k return False else it is true time : O(1) space : O(1)
7, Next greater
this is monotonic Stack problem my approach : I loop over nums2 from right to left and used a decreasing stack to track the next greater value to the right. For each number , I popped all smaller elements since they cannot be next greater for anything. The top of the stack is the next greater element , and stored this in hash table. Finally return the values from the hash using the nums1 values as a key time : O(n) space : O(n)
20 mar, 21:52

Repost from Po codes
Introducing የዝማሬ ማዕድ (YeZemare Maed) Selam everyone! 👋 During this Abiy Tsom, I really wanted a place to just listen to Orth
+5
Introducing የዝማሬ ማዕድ (YeZemare Maed) Selam everyone! 👋 During this Abiy Tsom, I really wanted a place to just listen to Orthodox Mezmurs peacefully with the lyrics, without getting distracted by recommendations, or cluttered UIs. I couldn't find an app that did exactly what I wanted... so I decided to fight with some scripts and build it myself! The User Experience: -Clean, distraction-free audio streaming. -Fully categorized by Zemarian and Mezmur categories. -5 different custom themes designed to feel natural and calm. Still a work in progress! • Around 75% of tracks don’t have lyrics yet • Lyrics are being generated in the background (Gimini API + Telegram API + Youtube API) Couldn’t wait ...wanted to share early and get your feedback 🙏 I’d love any ideas or improvements Join @pocodes
20 mar, 11:10

try this problem , it is interesting
20 mar, 05:33

now I wont feel that dumb 😂
20 mar, 03:31

some good comments 😁
some good comments 😁
20 mar, 03:26

Eid Mubarak to all muslim friends 😊
20 mar, 03:24

Day 14: solved few leetcode problems
18 mar, 17:38

😊
😊
18 mar, 10:59

My phone just survived its second suicide attempt from about 1.6 meters off dorm bed ( aka top one ) Thought she can escape easily 😒
17 mar, 16:41

Day 13: I finished half of the grokking algorithm book Did some leetcode problems on graph and recursion Started a project but I m not sure abt it
17 mar, 15:38

How do u deal with headaches? Except sleeping and using pills
17 mar, 15:18

got my first badge 😁
got my first badge 😁
16 mar, 14:58

Repost from Naol.Builds
May your day be amazing as you're
16 mar, 00:54

The course is interesting eko but the slides 😭 wth 🤦‍♀️
15 mar, 17:16

Before the exam cooks me ….
Before the exam cooks me ….
15 mar, 15:18

I am having aha time 😁
15 mar, 15:13