15 Matching Annotations
  1. Dec 2024
    1. You have buried someone you loved. Now look for someone to love. It is better to make good the loss of a friend than to cry over him. — Seneca

      love and loss

    2. With regard to whatever objects give you delight, are useful or are deeply loved, remember to tell yourself of what general nature they are, beginning from the most insignificant things. — Epictetus

      epictetus.

    1. “He stepped down, trying not to look long at her, as if she were the sun, yet he saw her, like the sun, even without looking.” ― Leo Tolstoy, Anna Karenina

      romantic

    1. “If I had an hour to solve a problem I’d spend 55 minutes thinking about the problem and five minutes thinking about solutions” — Albert Einstein

      medium articel

  2. Nov 2024
    1. If a person’s behavior doesn’t make sense to you, it is because you are missing a part of their context. It’s that simple.

      medium article on why homeless people do what they do and laziness

    1. in queue/stack questions see whether they are saying to print the front or top element or remove and print the front and top elm. if they r just saying to print the top/front elm then track them st[st.length-1] or que[0], if they r saying remove and print then console.log(que.shift())

    1. Incorrect Console Output on Enqueue (push):The push method in JavaScript returns the new length of the array, not the element that was pushed. So, let enter = que.push(input[i][1]) assigns the length of the queue to enter, not the element that was added.

      The problem in your code seems to be with the way you’re handling the push operation and printing the result. Here’s a breakdown of the issues and improvements you can make:

      Incorrect Console Output on Enqueue (push):

      The push method in JavaScript returns the new length of the array, not the element that was pushed. So, let enter = que.push(input[i][1]) assigns the length of the queue to enter, not the element that was added. Instead, you should directly print the element that was added to the queue. Correcting the console.log for Enqueue:

      Replace console.log(enter) with console.log(input[i][1]) to print the element being added to the queue instead of the length of the queue.

  3. Oct 2024