<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ankur Malik on Medium]]></title>
        <description><![CDATA[Stories by Ankur Malik on Medium]]></description>
        <link>https://medium.com/@ankurmalik04?source=rss-4da3c2738954------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*a-rrCSWIvZwLM1sk9Ovlcw.jpeg</url>
            <title>Stories by Ankur Malik on Medium</title>
            <link>https://medium.com/@ankurmalik04?source=rss-4da3c2738954------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 19:32:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ankurmalik04/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[HOW TO KILL TIME IN OFFICE CALLS]]></title>
            <link>https://medium.com/@ankurmalik04/how-to-kill-time-in-office-calls-703847eeb410?source=rss-4da3c2738954------2</link>
            <guid isPermaLink="false">https://medium.com/p/703847eeb410</guid>
            <category><![CDATA[funny]]></category>
            <category><![CDATA[how-to]]></category>
            <category><![CDATA[meetings]]></category>
            <category><![CDATA[education]]></category>
            <category><![CDATA[office]]></category>
            <dc:creator><![CDATA[Ankur Malik]]></dc:creator>
            <pubDate>Wed, 11 May 2022 11:14:19 GMT</pubDate>
            <atom:updated>2022-05-11T12:39:28.516Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IZ8x_p-0r0J8xLvkO36hEA.jpeg" /></figure><p>Office calls are very common and we all attend them in some way, today we will dive into some techniques and hacks to efficiently kill time in an office call.</p><p>An office call can be divided into three major parts:</p><ol><li><strong>Intro (First 15 mins)</strong></li><li><strong>Middle (Middle 30 mins)</strong></li><li><strong>Ending (Last 15 mins)</strong></li></ol><h3><strong>INTRO</strong></h3><p>This is the starting period of a call and certainly the easiest to handle.<br>Some important points you should always make sure to cover</p><ul><li>Do not join on time, always join 2–3 mins late, and make sure to provide some technical reason</li></ul><blockquote>“My last meeting overran, apologies”</blockquote><blockquote>“Apologies for joining late, my laptop just restarted”</blockquote><blockquote>“I was caught up in an urgent issue”</blockquote><ul><li>Always greet in an over excited way</li></ul><blockquote>“Hey!! Good morning, how are you?”</blockquote><blockquote>“Heya! How is it going?”</blockquote><ul><li>Wait if everyone has not joined the call, how irrelevant they may be in the discussion</li></ul><blockquote>“Hey, lets wait for Peter to join the call”</blockquote><blockquote>“I would suggest we wait for everyone to join and then start the discussion”</blockquote><p>There exist two other main ways to start a time wasting convo in the Intro part:</p><ol><li><strong>General talk</strong></li></ol><ul><li>In general talk you talk about general things, (stock market is people fav)</li></ul><blockquote>“How is the weather? It is just too hot here”</blockquote><blockquote>“how is the stock market?”.</blockquote><blockquote>“Why are the petrol/gas prices so high nowadays?”</blockquote><ul><li>There are political topics too,</li></ul><blockquote>“This Russia-Ukraine war is too much for me”</blockquote><blockquote>“I always support this party in elections”</blockquote><blockquote>“Do you think the Government should really ban the blabla group”</blockquote><p><em>NOTE:</em></p><ul><li>Please note that the political discussions require more practice to handle and I don’t recommend bringing those up if you are not very experienced yet.</li><li>As a general rule of thumb we do use the art of agreeing with political statements. According to which you agree to whatever opinion the other persons on the call have, just agree softly and let them continue</li></ul><p>2.<strong> Personal Talk</strong></p><ul><li>Personal talks are really great but they do require some homework from your end, may be maintaining a sheet of people and their concerns would be a great idea. An example would be</li></ul><blockquote>“Hey Josh you went to the dentist yesterday, how are you feeling now?”</blockquote><blockquote>“Hey you mentioned your daughters birthday last week, how did it go, how old is she now?”</blockquote><blockquote>“Hey Steven, how was your trip to Turkey?”</blockquote><p>In my opinion Personal and political talks are always very lucrative and work most of the times even with dead serious employees.</p><h3><strong>Middle</strong></h3><p>Middle part makes the 50% of the call and often gets very productive, it is where all the work happens and is the hardest to tackle and waste. But with some practice I assure you it is not impossible to conquer. Here are some tricks you can use to kill time here</p><ul><li>Start with a thanking note to the call organiser. <br>“He thanked me for no reason” said nobody ever</li></ul><blockquote>“First of all I would thank Emily for arranging this call”</blockquote><blockquote>“Before we begin, thanks to Karen for bringing all of us on the same table/call”</blockquote><ul><li>Ask for context: It is a very famous technique and very effective.</li></ul><blockquote>“I am afraid, can you give me some context on what this meeting is about”</blockquote><blockquote>“I don’t have much context about this call, can someone explain this to start with”</blockquote><ul><li>Discuss about previous call</li></ul><blockquote>“Can you elaborate on the last discussed findings”</blockquote><blockquote>“Can we revisit the conclusions of the last call”</blockquote><ul><li>Transfer of ownership — ask for more context, blame on new team or employee who left the company</li></ul><blockquote>“I am afraid I do not know about this program, this was earlier handled by ABACUS team and has moved to us recently, can you give some context about this”</blockquote><blockquote>“Actually this was managed by Joshua and after he left the office nobody has really worked on this, would you mind providing more insights on to what is this exactly?”</blockquote><ul><li>Clarify for SOP and ownership</li></ul><blockquote>“Are you sure this is something managed by our team”</blockquote><blockquote>“Do you think this should not be handled by your team itself, we are very new to this”</blockquote><ul><li>Challenge the existence of the problem</li></ul><blockquote>“I am not sure why is this needed in the first place”</blockquote><blockquote>“There are existing tools to do similar things, why do we need to build this on our own”</blockquote><blockquote>“I think we should really look into the ROI here before starting this”</blockquote><p>Even if these tricks don’t buy you much time there are always a bunch of interruptions you can throw in between to meet your purpose.</p><ul><li>Pull in your pet or children to disturb and meet and greet the folks on call</li></ul><blockquote>“Hey Kat, mumma is working please go outside, hey folks this is my daughter Kat, Kat say Hi to everyone”</blockquote><blockquote>“Oh My God, my dog is jumping on me and wants to say Hi to everyone, is anyone here a pet lover?”</blockquote><ul><li>Bring in the guest problem</li></ul><blockquote>“Oh I think someone is at the door, please hold on for a second”</blockquote><blockquote>“Hey folks, my parcel has arrived, let me get it”</blockquote><p>Always explain your self with diagrams, they are always the best way to extend the call where you draw the diagram slow, incorrectly and keep updating them</p><blockquote>“Let me explain this with a diagram on the whiteboard”</blockquote><blockquote>“This is very important so that we all are on the same page”</blockquote><blockquote>“Oh my god it is so tough to draw on these mouse pads, let me redraw this clearly”</blockquote><p>Never forget to use your super powers here and there</p><blockquote>“Can you hear me”</blockquote><blockquote>“Am I audible”</blockquote><blockquote>“You can see my screen?”</blockquote><blockquote>“I think my internet is bad”</blockquote><h3><strong>Ending</strong></h3><p>Ending is again an easy part of the call. Most of the times you will get support for killing your time here from other joiners in the call too. Here are some techniques you can use to achieve your goal.</p><ul><li>Always enter this part with an announcement or may be a chat message stating</li></ul><blockquote>“I have a hard stop in 15 minutes, will drop off”</blockquote><blockquote>“I think we might not be able to cover all the agendas in the remaining time, better we take notes of all the findings today and continue this call”</blockquote><ul><li>Make sure to mention how important and useful the call has been, so that everybody is ignorant to your main hidden motive</li></ul><blockquote>“This call is very helpful”</blockquote><blockquote>“This has been a very educative call, I am glad we had this”</blockquote><p><strong>Tough employees</strong></p><p>There are always some tough employees to work with, those can be identified with their will to work and their wordings</p><blockquote>“In the interest of time we should focus on our agenda”</blockquote><blockquote>“I have send a pre-read, please go through them”</blockquote><p>These people are very tough to deal and work with, they wont kill or waste time and most of the times are productive, I will soon come with another post on with tips and tricks on how to handle these tough team mates.</p><p>Hope this post helps you in shaping your time-killing skills. <br>Do let me know if you have any other suggestions in the comment sections.</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><p><strong><em>DISCLAIMER</em></strong></p><p><em>This post is only for fun, and in no way is to encourage toxic working environment. Please treat this as a joke. Any resemblance to actual people, living or dead, or events, past, present or future, is purely coincidental.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=703847eeb410" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[BLOCKED ROAD]]></title>
            <link>https://medium.com/@ankurmalik04/blocked-road-ae9bff41d924?source=rss-4da3c2738954------2</link>
            <guid isPermaLink="false">https://medium.com/p/ae9bff41d924</guid>
            <category><![CDATA[fiction-writing]]></category>
            <category><![CDATA[political-satire]]></category>
            <category><![CDATA[fiction]]></category>
            <category><![CDATA[satire]]></category>
            <dc:creator><![CDATA[Ankur Malik]]></dc:creator>
            <pubDate>Wed, 29 Dec 2021 21:05:55 GMT</pubDate>
            <atom:updated>2021-12-29T21:42:49.331Z</atom:updated>
            <content:encoded><![CDATA[<p>“Let us go” yelled the young boy in his teens to the traffic police officer, the boy wearing an all white kurta pajama was visibly frustrated.</p><p>“We have to take my father to the crematorium, why have you stopped us”.</p><p>There were a lot of family members standing behind an orange coloured school bus holding the dead body on their shoulders waiting for the blocked road to open.<br>It had been a while the traffic was stopped here.<br>A lot of people have now encircled the officer.</p><p>“We cannot open the traffic, our minister has to pass in a minute, please hold on” shouted the police officer.</p><p>“At least let the school bus pass, students would be late for their class” said the bus driver.<br>“I have my first day at office today, please let me go” said a young man neatly dressed in white and black suit with an awkward looking red tie.</p><p>“NO” shouted the officer again.</p><p>“My wife is in labour pain, please let us pass at least” pleaded a man in his mid 40s, he was sweating and seemingly in a great hurry.<br>“The love of my life is getting married today, I have to stop her, I love her, let me go” said another young guy from the crowd.<br>“Why don’t they let us pass, I don’t see any minister coming, we would have reached the school by now”<br>“At least let me go, my wife is in pain, we need a doctor right now”</p><p>“Our minister would be here soon” shouted the officer raising his stick, “move back and wait”. Everybody backed off with a little fear in their eyes.</p><blockquote>Some time passed by</blockquote><p>Traffic had become very long, could see so many people. who had turned off their engines and waiting.<br>The school bus was erupting from joy knowing they are late for their class and might get a day off. The teacher was trying very hard in the bus to silent the students. <br>The man was running at the nearby shops enquiring about a doctor who can take care of his wife. <br>The dead man family group has now starting getting smaller, a lot of distant relatives and neighbours have returned back to their homes.<br>Lots of office goers have opened their laptops and have started working, there were so many laptops, everywhere, in cabs, autos and buses. The new joiner was on a phone call trying convince someone to guide him to work from their only.</p><blockquote>Some time passed by</blockquote><p>The traffic jam is now very long, but its not increasing. People are making U-turns at the end and moving to different roads. Could hear the FM folks and navigation apps diverting traffic from not reaching this road.<br>Lover boy was crying at one corner of the road describing how much he really loved her while some people were consoling him.<br>Dead man was finally on a side stand by the road where his family members have now removed him from their shoulders, only a few were left.</p><blockquote>Some time passed by</blockquote><p>A lot of females covered the car where the pregnant lady was, they had found a lady doctor who had asked them for some help.<br>School bus was now silent wherein the teacher had started taking the class in the school bus itself, sound of teacher explaining her chapter could be easily heard.<br>The new joinee was explaining something on phone, he seemed quite relieved right now.<br>Everything seemed a lot quiet right now.</p><blockquote>Some time passed by</blockquote><p>“Its a girl” the doctor screamed with joy. Everybody was very happy and congratulating each other. There was a great cheer all around now.<br>The traffic officer had also joined the crowd while someone had got sweets from the nearby shop and was distributing it.<br>People had come out of their cars and were congratulating the new father.</p><p>Suddenly someone noticed a guy at the edge of a tall building, “oh, look” pointing towards the guy. “She has married” yelled the boy and jumped from the building.<br>Everyone went silent, a complete shock swept the crowd, there was a dead silence and then the officers satellite phone turned on.</p><p>“Hello, Hello, we have got an update, ministers breakfast was heavy, he is not travelling today”</p><p>“Ahhhhh, haa haa haa” came the voice, dead man was panting heavily.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ae9bff41d924" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Interesting DS/ALGO — real life Software Engineering interview Question]]></title>
            <link>https://medium.com/@ankurmalik04/interesting-ds-algo-real-life-software-engineering-interview-question-a10bd9eae895?source=rss-4da3c2738954------2</link>
            <guid isPermaLink="false">https://medium.com/p/a10bd9eae895</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[data-structures]]></category>
            <category><![CDATA[interview-questions]]></category>
            <dc:creator><![CDATA[Ankur Malik]]></dc:creator>
            <pubDate>Tue, 28 Dec 2021 18:51:55 GMT</pubDate>
            <atom:updated>2022-01-21T19:02:00.886Z</atom:updated>
            <content:encoded><![CDATA[<h3>Interesting DS/ALGO —A real life Software Engineering Interview Question</h3><p><strong>Statement</strong></p><p>Let there be some service X, all the API hit count of the service is passed to you through an API call every hour.<br>Example, at end of an hour, lets say at 04:01, you would receive a call on your API with value“10” denoting that between 03:00–04:00 the service got 10 requests.</p><p><strong>Task</strong><br>Your task is to create a dashboard which sends an alert to teams if the maximum API hit count in last K hours exceeds a defined threshold limit T.</p><p><strong>Contraints</strong></p><p>Both K and T are configurable and the team can define them, but would be constant once the dashboard is created.</p><p><strong>Assumptions</strong><br>For ease of solving you can assume a method call instead of API which would be called every hour with last hour API call count.<br>We are only interested in developing the backend logic here, please consider K and T passed as some method parameter.<br>Also please assume a pre defined method ”notify()” to notify the team.</p><p><strong>Solution</strong></p><p>Before you read the solutions, I would recommend you give some time and think about this problem yourself.<br>NOTE: THE PROBLEM AND SOLUTION IS ASSUME A EXISTING KNOWLEDGE AND UNDERSTANDING OF DS/ALGO TO GOOD EXTENT, BEGINNERS MAY FIND THIS DIFFICULT TO UNDERSTAND</p><p>There are multiples ways to solve this problem which involves space-time trade offs, in questions like these best advice is to discuss each pros and cons of all your approaches and then move to code the one your interviewer is interested in.</p><p><strong>Brute Force</strong></p><p>So the task is technically to keep a check on maximum value of API hit count in last K hours, also this would be required to be recalculated at every new input. At any hour if the maximum value goes beyond ‘T’ we call the “notify()” method. Another way to actually define this problem is saying you have a stream of numbers where you have to find the maximum of last (latest) K values every time a new input comes. A simple brute force method would be to store the value of last K hours in some memory and calculate the maximum out of them every hour.<br>For this purpose a K sized queue would be suitable. Whenever a new input comes, we remove the first (head/front) value from queue and add the new value in rear, then we go through all the values from the queue and find the maximum value, which can thus be used to call “notify()” method if required.</p><p>Let K = 9, <br>At hour H<br>Queue: [124, 43, 23, 56, 76, 35, 12, 43, 55] <br>max = 124,</p><p>At hour H+1, let there be new input “66”<br>Queue: [43, 23, 56, 76, 35, 12, 43, 55, 66] <br>max = 76, <br>here new input is added in the queue and first input(124) is removed. The new max value is 76</p><p>Complexity Analysis: for calculating the maximum value from the queue of size K, time complexity would be O(K), and space complexity also the same.<br>Adding and removing from the queue would take constant time.<br>Time: O(NK), Space O(K) for N inputs</p><p><strong>Heap</strong></p><p>Definitely a brute force cannot be an answer here, a very intuitive way to solve this is to use heap, we keep adding value to heap and find out the max value at any step.<br>Problem here is, lets say we have k numbers, all in the heap, we will get the max but when k+1 value enters we will have to remove the 1st value from the heap. And in heap its easy to remove the top value but a target value removal is O(N).<br>A probable shortcut here is to not delete the number until its at the top.<br>so we keep adding number in the heap with their indices and maintain a variable “count” with count of total input. At each input we check if the heap top value index is less that “count — K”, if yes we delete this number and keep checking, if no we return that as the answer(max value).</p><p>Complexity Analysis: for calculating max value its O(1), for inserting into heap O(logN) and space O(N).<br>Time: O(NlogN), Space O(N) for N inputs</p><p><strong>BST</strong></p><p>One way to see the problem is ideally we want the max value in a list of number where we keep on adding and removing one element. If we maintain a sorted list of all the elements we can easily get the max value, in order to do this we will use BST. Whenever a new element is added or removed(targeted element) from the BST it is O(logN) complexity and same goes with finding the max value. We will have to keep a queue of size K here too to maintain the element which needs to be removed at each cycle.</p><p>Complexity Analysis: O(logK) time complexity and O(K) space.<br>Time: O(NlogK), Space O(K) for N inputs<br>Please note the worst case complexity of BST is O(N) for above operations in this case we are considering a self balancing BST, which practically has some overhead.</p><p><strong>Heap with pointers</strong></p><p>All the above solutions have some limitations, BST has overhead, Heap takes a lot of space and brute force is, well, brute force.<br>Another way to implement this by using a tweaked version of Heap. Here we maintain a separate map of element-&gt; index(location) in heap. This map has to be maintained and should always be updated while running the heapify method. Whenever a node is inserted or swapped with its children while heapifying, the map indices should be updated. <br>Now we make slight change to our heap approach using this map, when new element is inputted we add it into the heap(O(logN)), and the queue. We then find the max (O(1), i.e. top of heap) value and delete the first value of the queue from the heap using the newly created map. This map will help us locate the element to be deleted in the heap, we can replace that element with the last element of heap(standard heap deletion)and run heapify. <br>This way we would be able to keep the size of the heap in check.</p><p>Complexity Analysis: for calculating max value its O(1), for inserting into heap O(logK) for deletion O(logK) and space O(K).<br>Time: O(NlogK), Space O(K) for N inputs<br>Please note that the overhead to maintain the map is very minimal as it would require us to update the values maximum of logK times only.</p><p><strong>Doubly linked list</strong></p><p>This problem essentially is just “sliding window maximum” value problem, instead of a sliding window over an array window is sliding over a stream.<br>A simple and popular way to solve this is by using a double ended queue.<br>Approach is simple, we maintain a normal queue of size K and a doubly ended queue(doubly linked list). Whenever a new value is input we add it into the main queue and add it into the doubly queue, but there is a catch. We maintain the doubly queue in sorted order(decreasing) so before adding the element to the doubly queue we keep on removing the elements from the tail which are smaller then the current element. Hence the doubly queue is always in decreasing order, this way we can get the max value(head of the queue) in constant time.<br>Also on each input we remove the first element from the main queue and compare it with the head of doubly queue, if both are same we remove the first element of the doubly queue too.</p><p>Complexity Analysis: Addition and removal overall will be O(1) for each entry, because each element would be added and removed only once from the queue, hence for all the N elements time complexity would be (N), and space O(K) for queue.<br>Time: O(N), Space O(K) for N inputs</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><p>Please comment under for any clarifications, thanks</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a10bd9eae895" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>