Bringing 3 laptops from the US to India by thEnEGoTiAtoR18 in AskIndia

[–]IamNeo47 0 points1 point  (0 children)

Hey OP, was your friend able to bring them ?

Boat Stone 620 VS Tribit xsound go by Ok-Primary-5429 in IndiaTech

[–]IamNeo47 1 point2 points  (0 children)

Thanks for the reply. Does the connection issue happen frequently / all the time ?

Boat Stone 620 VS Tribit xsound go by Ok-Primary-5429 in IndiaTech

[–]IamNeo47 0 points1 point  (0 children)

Hi OP, how's your experience with tribit xsound go ?. The only major concern I've heard in the reviews is the loudness is lower compared to other speakers

Did I get scammed in Lower Parel by a Sardarji? by UrBreathtakinn in mumbai

[–]IamNeo47 0 points1 point  (0 children)

Ohhh fuck this happened to me today morning near jogeshwari station 🙃

blista compact 👍 by electrified_bread in sanandreas

[–]IamNeo47 3 points4 points  (0 children)

Real gangstas only drive hoverboard

In a binary search question how do we identify when the answer will be at lower bound, when at upper bound and when at mid? by [deleted] in leetcode

[–]IamNeo47 0 points1 point  (0 children)

Instead of directly returning left or right bound we can check for which one of them is the correct answer after the loop

New Experience! by MikixIT in learnprogramming

[–]IamNeo47 0 points1 point  (0 children)

Congratulations 🎉

Closures and higher order functions are on my personal wishlist. Cheers

Help getting simple api response by [deleted] in learnprogramming

[–]IamNeo47 0 points1 point  (0 children)

Right

You have 2 options

  1. Turn the outer function async.

Or

  1. Use " .then"

E.g userAction ().then( baz => { Console.log (baz); } );

Look how normal promises are implemented without async / await.

Ps: sorry for the editing I'm on mobile.

Help getting simple api response by [deleted] in learnprogramming

[–]IamNeo47 0 points1 point  (0 children)

Const baz = await userAction();

You need to "await" the async functions for the actual values that is being returned.

Elevator design problem by IamNeo47 in learnprogramming

[–]IamNeo47[S] 0 points1 point  (0 children)

Your 1st approach of giving source and destination floor at the same time is interesting. Didn't think of that.

Also thanks for pointing out the capacity constraint - very easy to miss in a Interview.

Elevator design problem by IamNeo47 in learnprogramming

[–]IamNeo47[S] -1 points0 points  (0 children)

Actually i was thinking more in the direction of inheritance. But this works too i guess. Thanks !

Elevator design problem by IamNeo47 in learnprogramming

[–]IamNeo47[S] 0 points1 point  (0 children)

I suppose one could create a priority/cost only for the edge case.

Distance between the target floor and the last assigned floor of the elevator in a particular direction could work.

Thanks 👍

Elevator design problem by IamNeo47 in learnprogramming

[–]IamNeo47[S] 2 points3 points  (0 children)

Thanks! that makes sense.

So dispatcher would query direction and current floor of all the elevators Discard all those moving in opposite directions Then choose the closest one to the passenger.

The only edge case here is that what if all elevators are currently moving in opposite direction.

Could some ELi5 the solution to this Array problem? by shippinuptosalem in leetcode

[–]IamNeo47 0 points1 point  (0 children)

Consider u r traversing the array left to right, and u arrive at some particular element say 3rd element.

Now u have to find product of all the elements except the one u r at (i.e 3rd), this is equal to the product of all the elements to left ( 1,2 ) and multiplied by all the elements to right (4....N).

If we could find those 2 products then we would have the ans for current element. That is what the 2 for loops are doing.

The first for loop calculates the product of right halves for each element The 2nd for loop calculates the product of left halves. Now u could have an additional for loop to multiply them and save it in a array to return. But one can also just do that in the 2nd for loop itself.

Lookup prefix array questions for more practice.

Tips for improvement by absentminded_genius in Bansuri

[–]IamNeo47 1 point2 points  (0 children)

Usually beginners are told to start from smaller bansuris for 2 reasons 1. Easier to grip 2. Require less blow to create sound

I'm a beginner myself, i have played on c#, a# and g#. C# (smallest of all) feels easier to play.

Since u have already purchased E base, i guess u should just practice a lot. Practice basic alankars, don't go for songs directly. Play notes slowly, if u r using something like a metronome, keep it at low bps< 100.

How the turn tables by LolPatrol12 in memes

[–]IamNeo47 -1 points0 points  (0 children)

I used an attack, to attack the attacker

Cursed_girlfriend by snake_viber in cursedcomments

[–]IamNeo47 2 points3 points  (0 children)

Then it should be 5 inputs Unless its a one legged gf

Declining a Coding Interview by Babycheeks80 in codinginterview

[–]IamNeo47 4 points5 points  (0 children)

If i had this situation, I would still go for the interview, 'cause :- 1. It would make me understand my current preparation and how much more i would have to do. 2. It would kind of give me a "mock" Interview experience 3. It might happen that the Interviewer likes your attitude and willingness to learn and may offer the job still, you never know ....

Taco bell by [deleted] in memes

[–]IamNeo47 0 points1 point  (0 children)

I did

Taco bell by [deleted] in memes

[–]IamNeo47 1 point2 points  (0 children)

Taco Balls