Translate this page:
Sunday, February 4, 2024
The Virgin Way (by Richard Branson) - 15 minutes long summary in two languages
Friday, February 2, 2024
Negativity - The Evil King Goes Hungry (Chapter 2)
Translate this page:
It is impossible to build one’s own happiness on the unhappiness of others.
—Daisaku Ikeda
Cancers of the mind
- "Cancers of the mind," referring to comparing, complaining, and criticizing, highlights negative thought patterns that can adversely impact one's mental well-being and relationships.
- Comparing: Constantly measuring oneself against others can lead to feelings of inadequacy or superiority. Instead of fostering a positive mindset, it can breed jealousy, low self-esteem, and hinder personal growth. Embracing individuality and focusing on personal progress can be more beneficial.
- Complaining: Habitual complaining not only reflects a negative outlook but can also create a toxic environment for oneself and those around. While it's natural to express concerns, constant complaints without seeking solutions can perpetuate a cycle of negativity. Shifting focus towards finding solutions or practicing gratitude can be a healthier approach.
- Criticizing: Excessive criticism, whether directed at oneself or others, can erode self-confidence and damage relationships. Constructive feedback is valuable, but relentless criticism can be destructive. Cultivating empathy and understanding can lead to more positive interactions.
- Addressing these "cancers of the mind" involves cultivating self-awareness, fostering a positive mindset, and practicing mindfulness. By consciously choosing to replace comparing with self-acceptance, complaining with gratitude, and criticizing with constructive communication, individuals can promote mental well-being and build healthier relationships.
NEGATIVITY IS EVERYWHERE (But don’t play a victim)
- Bad things do happen. In our lives, we’re all victims at some point—whether we’re being racially profiled or being cut off in traffic. But if we adopt a victim mentality, we’re more likely to take on a sense of entitlement and to behave selfishly.
- Stanford psychologists took 104 subjects and assigned them to one of two groups—one told to write a short essay about a time they were bored, and the other to write about a time when life seemed unfair or when they felt “wronged or slighted by someone.”
- Afterward, the participants were asked if they wanted to help the researchers with an easy task. Those who’d written about a time they’d been wronged were 26 percent less likely to help the researchers.
- In a similar study, participants who identified with a victim mindset were not only more likely to express selfish attitudes afterward, they were also more likely to leave behind trash and even take the experimenters’ pens!
NEGATIVITY IS CONTAGIOUS (And Groupthink Bias)
- In the 1950s Solomon Asch gathered groups of college students and told them they were doing a vision test. The catch was that in each group, everyone was an actor except one person: the subject of the test.
- Asch showed participants an image of a “target” line first, then of a series of three lines: one shorter, one longer, and one that was clearly the same length as the target line. The students were asked which line matched the length of the target line. Sometimes the actors gave correct answers, and sometimes they purposefully gave incorrect answers. In each case, the real study participant answered last.
- The correct answer should have been obvious. But, influenced by the actors, about 75 percent of the subjects followed the crowd to give an incorrect response at least once. This phenomenon has been called groupthink bias.
- Groupthink is the practice of thinking or decision-making in a way that discourages individual responsibility.
Negative behaviors surround us so constantly that we grow accustomed to them.
Think about whether you have any of the following in your life:
Complainers, like the friend on the phone, who complain endlessly without looking for solutions. Life is a problem that will be hard if not impossible to solve.
Cancellers, who take a compliment and spin it: “You look good today” becomes “You mean I looked bad yesterday?”
Casualties, who think the world is against them and blame their problems on others.
Critics, who judge others for either having a different opinion or not having one, for any choices they’ve made that are different from what the critic would have done.
Commanders, who realize their own limits but pressure others to succeed. They’ll say, “You never have time for me,” even though they’re busy as well.
Competitors, who compare themselves to others, controlling and manipulating to make themselves or their choices look better. They are in so much pain that they want to bring others down. Often we have to play down our successes around these people because we know they can’t appreciate them.
Controllers, who monitor and try to direct how their friends or partners spend time, and with whom, and what choices they make.
- Gauranga Das repeated this advice in brief metaphorical form that we often used to remind ourselves not to harbor negative thoughts toward others:
- Don’t judge someone with a different disease.
- Don’t expect anyone to be perfect.
- Don’t think you are perfect.
REVERSE EXTERNAL NEGATIVITY
(1) Become an Objective Observer- Instead of reacting compulsively and retaliating to negativity or a negative word or action, we could enjoy our freedom as human beings and refuse to be upset.
- We step away, not literally but emotionally, and look at the situation as if we are not in the middle of it. We will talk more about this distance, which is called detachment, in the next chapter.
- For now, I’ll say that it helps us find understanding without judgment.
From a position of understanding, we are better equipped to address negative energy. The simplest response is to back slowly away. Just as in the last chapter we let go of the influences that interfered with our values, we want to cleanse ourselves of the negative attitudes that cloud our outlook. In The Heart of the Buddha’s Teaching, Thich Nhat Hanh, a Buddhist monk who has been called the Father of Mindfulness, writes, “Letting go gives us freedom, and freedom is the only condition for happiness. If, in our heart, we still cling to anything—anger, anxiety, or possessions—we cannot be free.” I encourage you to purge or avoid physical triggers of negative thoughts and feelings, like that sweatshirt your ex gave you or the coffee shop where you always run into a former friend. If you don’t let go physically, you won’t let go emotionally.
The 25/75 Principle
Aim for the feeling that at least 75 percent of your time is spent with people who inspire you rather than bring you down.
Allocate Time
There might be some people you can only tolerate for an hour a month, some for a day, some for a week. Maybe you even know a one-minute person. Consider how much time is best for you to spend with them, and don’t exceed it.
Don’t Be a Savior
If all someone needs is an ear, you can listen without exerting much energy. If we try to be problem-solvers, then we become frustrated when people don’t take our brilliant advice. The desire to save others is ego-driven. Don’t let your own needs shape your response.
REVERSE INTERNAL NEGATIVITY
The more we define ourselves in relation to the people around us, the more lost we are.
Spot, Stop, Swap
First, we become aware of a feeling or issue—we spot it.
Then we pause to address what the feeling is and where it comes from—we stop to consider it.
And last, we amend our behavior—we swap in a new way of processing the moment.
Spot
TRY THIS: AUDIT YOUR NEGATIVE COMMENTS.
Keep a tally of the negative remarks you make over the course of a week. See if you can
make your daily number go down. The goal is zero.
Stop
Regarding negative speech...
“Remember, saying whatever we want, whenever we want, however we want, is not freedom. Real freedom is not feeling the need to say these things.”
Swap
Mudita is the principle of taking sympathetic or unselfish joy in the good fortune of others.
KSAMĀ: AMENDING ANGER
Kṣamā is Sanskrit for forgiveness. It suggests that you bring patience and forbearance to your dealings with others. Sometimes we have been wounded so deeply that we can’t imagine how we might forgive the person who hurt us. But, contrary to what most of us believe, forgiveness is primarily an action we take within ourselves. Sometimes it’s better (and safer and healthier) not to have direct contact with the person at all; other times, the person who hurt us is no longer around to be forgiven directly. But those factors don’t impede forgiveness because it is, first and foremost, internal. It frees you from anger.
TRANSFORMATIONAL FORGIVENESS
FORGIVENESS IS A TWO-WAY STREET
Forgiveness has to ow in both directions. None of us is perfect, and though there will be situations where you are blameless, there are also times when there are missteps on both sides of a conflict. When you cause pain and others cause you pain, it’s as if your hearts get twisted together into an uncomfortable knot. When we forgive, we start to separate our pain from theirs and to heal ourselves emotionally. But when we ask for forgiveness at the same time, we untwist together. This is a bit trickier, because we’re much more comfortable finding fault in other people and then forgiving it. We’re not used to admitting fault and taking responsibility for what we create in our lives.
On an end note: The less time you fixate on everyone else, the more time you have to focus on yourself.
Tags: Book Summary,Buddhism,Sunday, January 28, 2024
Chapter 7: Last of Childhood Memories
REMEMBERING THE GAME OF SONAL, DIMPI, AND SRISHTI, AND OTHERS Sonal, Srishti, and Dimpi marked a significant chapter in the TT seasons of my youth. Sonal, with her serious expression during the game, always focused and determined. Her style was defensive, challenging opponents to make the first mistake, a game of 'who-drops-the-ball-first-Sonal-wont-attack.' If an aggressive shot failed, you lost to your own weakness, not due to her contribution. Playing against her was a tactical challenge. Dimpi, on the other hand, faced challenges in mastering the backhand. Her jovial nature made her enjoyable to play with, but often, she had to endure long waits when a large group gathered, and she wasn't selected promptly. Srishti, with her athletic body, played with a raw style. Her movements were stiffer, especially during flat smashes. The TT seasons started in 2004 (my VIII) and continued until the winters of 2007, encompassing four seasons. However, due to dominance by Prabhav's group in the winter of 2006 (my X), I decided to quit for various reasons – lack of playing opportunities, focus on X board exams, and Buaji's visit in December. Sonal's birthday on March 30 during the first season (2004) served as a reference point. Dimpi, though starting two years later, caught up quickly due to the slower progress of Sonal and Srishti. As the seasons progressed, the TT games became intertwined with the changing seasons and the basement's tube-lit environment. These memories were etched in my mind, forming an integral part of those youthful years. AUGUST FESTIVALS: RAKSHABANDHAN, JANAMASHTMI, AND INDEPENDENCE DAY August, a month of festivals, brought joy and celebration. Rakshabandhan symbolized the bond between brothers and sisters, celebrated with the tying of the Rakhi. The festival also involved money-sharing traditions, providing a unique perspective on gender roles in gift-giving. Janamashtmi, marking Lord Krishna's birth, involved elaborate preparations and real-life scenery creations. The festivities brought the community together, and as a child, these moments were among the most beautiful in the monsoons. However, as I transitioned to high school, August lost some of its charm. The changing weather and personal struggles affected my perception. Mood swings, coupled with the pressure of entrance exams and results, led to a shift in my perspective. The once-beloved festivals became associated with internal struggles. PEOPLE FROM THE PAST (LOST CONNECTIONS) The list of people from the past includes classmates, friends, and acquaintances, each with unique memories. Names like Nilesh Pandit, Akansha, Monty Sharma, Mukul Agarwal, Neerav, Chirag Singh, Rohan Katyal, Jatin Katyal, and Lakshya Gupta resurface, each with their stories and associations. GIRLS FROM PAST Recollections of Somya Mathur and Sidrah Sana, including crushes and shared moments, capture the innocence and emotional nuances of adolescent experiences. These memories, though tinged with nostalgia, reflect the evolving dynamics of friendships and emotions during school years. MUNIRA KHAN The vivid description of Munira Khan portrays her as an exotic beauty, capturing attention with her golden eyes, skin, and hair. The small scar on her left cheek adds a unique charm. The narrative reflects the fascination and admiration for her, grounded in shared experiences within the same house. INFORMATION ABOUT MY PERSONAL DIARIES Details about personal diaries, categorized by years and significant life events, reveal the role of writing in processing emotions and experiences. The choice of diaries, such as the Bharat Petroleum diary with golden-thick pages, adds a tactile and visual dimension to the storytelling. These recollections provide a rich tapestry of personal history, blending moments of joy, friendship, festivals, and introspection. The narrative weaves together the threads of the past, creating a mosaic of memories that define a significant part of the my life.
Chapter 6: Eleventh Grade Coming to an End
In the realm of academic pursuits, Deepti Sharma ma'am cast a unique spell on my teenage self as our math teacher. My admiration for her may have been sparked by a peculiar association with a Bollywood film, 'Om Shanti Om,' featuring Deepika Padukone alongside SRK. It was Deepika's debut, and uncannily, many scenes reminded me of my teacher. Observing them together, one might quip, "The angle from which I found the two women similar is not even an angle." This whimsical comparison seeded a fondness for her. A significant chapter unfolded when Deepti Sharma got married in December of that year. The details are hazy, perhaps falling between the 5th and 15th of the month. What remains vivid in my memory, like a scene preserved in Blu-ray quality, is an episode etched in time. She brought along the answer sheets for our third-term math test, conducted in her absence post-wedding. A new, tall, bold, and smart male faculty had evaluated the papers on her behalf. This marked her return to school. Anticipation gnawed at me as the answer sheets arrived unexpectedly early. Nervousness welled within, fueled by my less-than-stellar math skills. I was determined not to reaffirm a negative impression, especially with her recent return. On this particular day, she appeared enchanting—clad in a red saree, pinkish cheeks, adorned with bangles, and radiating the glow of a newlywed. A thought crystallized in my mind—I would compliment her beauty if my performance was commendable. My name was called, and to my astonishment, I scored 23 out of 25! The elation of my report card outshone any grand plans I had. Armed with my answer sheet, I approached her with a beaming smile, expressed my gratitude, and uttered, "Ma'am, you are looking beautiful." This impromptu compliment was a mental roller-coaster ride, leaving me oblivious to her reaction. Amidst these adolescent tales, an intriguing quote found its way into my quote book: "A hug is a perfect gift. One size fits all, and nobody minds if you exchange it." (23 December 2007). Curiously, I stumbled upon this quote in the newspaper, HT City, during a time when my heart was ensnared by Sonal. Financial constraints during that period limited my capacity for extravagant gestures, yet my affection for her fueled a desire to shower her with gifts and share precious moments. Meanwhile, societal developments, such as renovations and minor upgrades like marble flooring and notice boards, stirred discussions within the community. A substantial sum of twenty thousand caused reluctance in Chachaji, sparking debates at home. Veena Ralli and Dr. Mudita, representatives from our block in the management committee, intervened, eventually persuading Chachaji to meet the demands. In an attempt to claim my space on the societal notice board, I encountered an unintended competition. Dimpi had adorned it with a colorful quote on a piece of paper. Unfazed, I decided to contribute, jotting down a quote on a white A4 page using black and red pens. I added a touch of color through overwriting, aiming to catch attention. Sagar Balal, our neighbor, recognized and appreciated my effort. However, my subsequent attempts were thwarted by grander, printed displays, leaving me disheartened. Fast forward to 2012, my collection of newspaper cuttings until that year predominantly featured clippings from 2007, my eleventh-grade year. The motivations behind my cuttings varied, a testament to an evolving habit bordering on obsession. Noteworthy among them were cuttings related to space science, reflecting an inclination toward a dream that later intersected with my pursuit of computer engineering. The year 2007 marked a shift in my newspaper routine, transitioning from a choice to a responsibility as the cost was integrated into school fees. Amidst the daily influx of news, one topic loomed large—global warming. Media frenzy, coupled with my relatives' concern over energy consumption at home, painted a dire picture of Earth boiling and ice caps melting. This narrative was, however, employed by my family as an unwarranted tactic to disturb my nightly studies. As January 2008 unfolded, school results trickled in, bringing a mixed bag of scores. English fetched me around 18 out of 25, while my struggles with C++ language were apparent with scores ranging from 10-12. Physics became a nemesis, often leading to late-night struggles, while chemistry posed a comparably easier challenge. Transitioning to a different thread of my teenage years, a retrospective glance highlighted the stark contrast between Tri Nagar and Mayur Vihar. The shift brought me to a world where sports, particularly table tennis, entered my life after a hiatus of over three years. Tri Nagar lacked the resources, environment, and infrastructure for sports, with a mere common gallery serving as a makeshift cricket pitch. Tri Nagar's sports repertoire was limited to cricket played in the makeshift gallery, with occasional cycling on a shared bicycle. The school, Maharaja Agrasen Public School, lacked adequate facilities for soccer or cricket. Instead, games period was occupied by group activities like dodgeball and kho-kho, along with casual games like hide-and-seek and the obsessively-played "Stepoo." The introduction of the game 'Stepoo' was credited to a girl from the neighboring house, cementing her role in our childhood memories. The camaraderie shared in those games transcended time and space, encapsulating the innocence and simplicity of our formative years.
Chapter 5: December 2007
Recalling December nights from the years of my school life, I find myself entangled in a whirlwind of emotions, a chaotic mix of teenage infatuation, family struggles, and the quest for identity. Sonal, the enigma that held me captive, dominated my thoughts during those solitary moments in my room. I grappled with the inexplicable intensity of my feelings, questioning the very essence of my longing. Was it truly her, or was she just a symbol of the peace I desperately sought? Amidst the chaos at home, with Chachi's constant criticisms and Chachaji's questionable actions, I yearned for understanding, for someone who could unravel the mysteries within me. My refuge was the TT basement, where the regular crowd, including Sonal, Dimpi, and Srishti, gathered for games. One evening, our plastic TT ball suffered a dent, threatening to disrupt our game. Determined to fix it, I rushed home with the ball, concocting a plan involving boiling water and a touch of cooking oil. However, my experimental endeavor was interrupted by an unexpected slap from Chachi. The kitchen drama left the ball not only unaltered but with a peculiar bulge. It became an evening etched in my memory for various reasons. As I navigated the complex tapestry of teenage emotions, I found solace in small gestures. Treating Sonal, Dimpi, and Srishti to snacks before our TT sessions became a ritual, a momentary escape from the challenges that awaited me at home. December 18, 2007, marked my sixteenth birthday, a day I anticipated spending with Sonal. Yet, the financial constraints and my lack of a close-knit friend circle dampened the excitement. School, usually a mundane affair, offered a distraction from the harsh realities. Unexpectedly, classmates from the last benches acknowledged my birthday, initiating a celebratory chaos that involved lift-ups and birthday bumps. The narrative unfolds further into the labyrinth of school incidents. In 2007, during my eleventh grade, I carried an MP3 player to school, a forbidden act. An encounter with Loveneesh, a notorious fellow student, led to an unjust accusation of theft. A confrontation ensued, involving the head-girl Shreya Dhar and eventually the vice-principal, Ms. Dogra. The ordeal climaxed with a peculiar act of mercy from Ms. Dogra, who returned my MP3 player in the school parking lot. As I reflect on these chapters of my past, I grapple with the paradoxes of adolescence, where the mundane and the extraordinary converged in a symphony of highs and lows.
Chapter 4: A Rollercoaster of Emotions
Generalizing this pattern: The year 2007 marked a turning point in my life, as I embarked on the journey of Class XI after the intense board exams that defined the end of my class tenth. Little did I know that this year would be a rollercoaster of emotions, filled with love, friendship, fights, and self-discovery. As the year began, I found myself immersed in the whirlwind of events. Rekha buaji, a significant presence in my life, visited around January. The following months were consumed by exam preparations, leading to the climax of the board exams in March. The culmination of these exams ushered in a three-month vacation, a time of freedom and exploration. May brought me to Badi buaji’s house, where internet, music, and chatting became my daily companions. However, this period was marred by the loss of a precious possession – a watch given to me by Rekha buaji. It disappeared during a soccer game, a sport that filled my days along with cricket. Not all moments were joyous, though. I found myself entangled in a troubling incident involving a colony friend, Lakshya Lahoti. Our pranks and ragging had escalated to a point where it became too much for him. The consequences unfolded with his mother's visit to my house, seeking an explanation for our actions. As the academic year progressed, the results were declared, and I found myself with an 85% score, promoting me to Class XI in the Science stream. This transition brought its own set of challenges, including the struggle to make new friends and adapt to the complexities of the new academic environment. July was marked by soccer and mischievous activities, reminiscent of carefree times. August, on the other hand, was consumed by futile endeavors of watching for Sonal’s return from her school and wasting time in the evening. The reshuffling of students based on their streams and the subsequent difficulties at school highlighted the academic challenges I faced. October stood out with intense table tennis battles, friendships with Sonal, Dimpi, Srishti, and other friends. November introduced me to new acquaintances like Ballu, Raja, Ralli, and Bharat. December brought the festive spirit with Diwali celebrations, long evenings outside, and movies. Amidst these experiences, I couldn’t help but reflect on my academic struggles. The curly circles and enclosures in my math book symbolized my attempts to grasp complex topics without a deep conceptual understanding. Parallel to my personal journey, the birth of Anushka, Rekha buaji's wish for a nephew, and the tension between Rekha buaji and Manju buaji added familial drama to the narrative. In the academic realm, Class XI introduced me to new subjects and teachers, each with their unique challenges. From Neeta Agarwal in English to Prashant in Physics, the academic landscape was demanding. Jagdish Devrani, my Computer Science teacher, added his own set of challenges. As the year unfolded, I navigated the complexities of friendships, unrequited feelings for a girl with stiff hair, and the constant scrutiny from teachers like JD sir and Sunita ma’am. Despite academic setbacks and social challenges, the year provided valuable lessons and moments that would shape my understanding of life. The transition from school to college was on the horizon, and the experiences of Class XI set the stage for the unpredictable journey that awaited me. Little did I know that the diary I started, inspired by Mahatma Gandhi's autobiography, would become a repository of my thoughts, quotes, and reflections. Each entry became a step towards self-discovery, a theme that would echo through the chapters of my life. The year 2007, with all its highs and lows, became a chapter in the novel of my life, leaving an indelible mark on the pages of my memories. As I reflect on these moments, I realize that life is a tapestry woven with threads of joy, struggle, and self-discovery. The narrative continues, and the chapters of Class XI are but a prelude to the broader story that unfolds beyond the pages of my teenage years.
Saturday, January 27, 2024
Chapter 3: Adolescence
In the nostalgic echoes of July 2005, as the golden sun began to dip below the horizon, the sounds of children playing with Beyblades outside my window transported me back to a cherished time. Memories of my childhood friend, Lakshya Lahoti, came rushing back, reigniting the vivid moments we shared. Lakshya had returned to our neighborhood after spending a couple of years in Pune. Back in seventh grade, we had played together, and now, in the realm of ninth grade, the dynamics had changed. The evening darkness hinted at his return, and through friends like Appu and Kunal, I learned about Lakshya's presence. When I finally heard him speak, his fluent English sparked excitement in me. However, the fleeting joy of our conversation was overshadowed by his closer bond with Appu. I found myself on the periphery, invited to his house only to be part of the larger gathering. Amid playful banter, Chachaji humorously labeled my visits to Lakshya's house as "babysitting," given the age difference. Yet, beneath the jest, a subtle shift in our friendship dynamics was taking place. The once inseparable connection was now navigating the challenges posed by age and evolving interests. In the tapestry of relationships, Amogh played a pivotal role. His transition from childhood toys like Beyblades and Pokémon cards to adult fascinations like cars, gadgets, and fashion mirrored our collective journey into adolescence. While Appu and Lakshya owned their Bayblades, I relied on Amogh for access to such luxuries. Despite occasional grievances, I owed Amogh a debt of gratitude for being a companion during those formative years. As the pages of time turned to Class IX in the timeline of 2005, life unfolded with its unique set of experiences. The year commenced with final exams, and my improved performance in mathematics garnered attention from classmates and teachers alike. The credit, I acknowledged, belonged to my tuition teacher, Anu Daniel. Cricket in the morning and soccer in the evening defined the rhythm of May, with our group crowding the central park, leaving a grassless field in our wake. Friends and groups formed the vibrant tapestry of our social landscape, with boys and girls weaving separate stories. Hardik and Harshit's group, along with Sonal and Dimpi's group, stood out as the liveliest clusters, and my connections with them shaped the narrative of those days. July brought challenges in making new friends at school, with a roster of names representing the intricate social dynamics. A memorable mention was an ugly, short girl engaged in regular fights with mischievous boys, providing a unique spectacle in our adolescent world. As the monsoon set in, mid-term examinations loomed on the horizon, casting a shadow over September. The struggle at school intensified, and October brought an unexpected twist with my battle against jaundice. Forced to miss the first two exams, I grappled with the consequences of my health setback. November ushered in a new chapter as I discovered a friendship with Sonal, facilitated by a chance encounter in the table tennis basement. Our budding connection added warmth to the winter, a prelude to the transformative year ahead. Class X in 2006 unfolded with a myriad of experiences. Soccer became an obsession, and friendships blossomed with Shubham, Mayank, Prateek Ahuja, and others. Challenges surfaced, such as my failed attempt to join the house soccer team and the complexities of teenage affection. December 2006 marked a crucial juncture. Rekha buaji's visit added a familial touch to the holiday season. The year's end witnessed a blend of emotions, from disappointment in sports to collaborative efforts on a Social Studies project with Ananth and Sonal. The groundwork for metro construction commenced, symbolizing the evolving landscape of our surroundings. Amidst personal revelations and the ebb and flow of relationships, life in Delhi continued its course. As the narrative unfolded, December retained its significance. Rekha buaji's presence brought a mix of joy and concern about the impending tenth-grade board exams. The departure of familiar faces loomed on the horizon, signaling a shift in the tapestry of friendships. On the terrace, amid winter sunshine, I reflected on life's journey. Chirag's return sparked unexpected camaraderie, bridging past differences. A pivotal moment arrived when he introduced me to the world of cigarettes, influencing my decisions in ways I hadn't anticipated. The advent of 2007 witnessed a continuation of personal revelations and shared moments. A visit to the cyber cafe to connect with Sonal marked a new chapter in my online interactions. The joy derived from her chain-mails and the emergence of internet friendships added a digital layer to my adolescent experiences. Rekha buaji's presence during this period added a familial backdrop to my days. As I navigated the complexities of teenage emotions and friendships, the journey into adolescence unfolded against the backdrop of changing seasons and evolving relationships. In the midst of academic pursuits, the study of English literature became a passion, marked by a memorable encounter with my short-tempered English teacher. The pages of a fashion magazine became a bridge to connect with Sonal, reflecting the evolving dynamics of our friendship. As the narrative reached its zenith, the essence of those years became tangible. From childhood games to adolescent explorations, the tapestry of friendships, relationships, and personal growth unfolded against the backdrop of Delhi's changing landscape. Each page turned revealed a unique chapter, leaving an indelible imprint on the canvas of my teenage years.
Friday, January 26, 2024
Chapter 2: Childhood
2.1 The Mongoose and the Snake Tale
Back in the carefree days of our childhood, Manju bua, a captivating storyteller, once unfolded a short but impactful story—a tale of a snake and a pet mongoose. The narrative began with a harmonious family of four and their loyal mongoose. The parents, tasked with a temporary absence from home, devised a plan for the mongoose to guard their peacefully sleeping baby. The instructions were simple: guard the door and protect the child. As the day unfolded, the mongoose remained steadfast, while an unexpected visitor, a snake, slithered its way into the scene. What ensued was a fierce battle between the mongoose and the snake, with bloodshed, screeching, and wild fighting. The snake, in its wounded state, managed to leave a blood trail leading to the baby. In a precarious moment, the mongoose seized the snake by its neck, preventing a potential tragedy. However, fate took a cruel turn. The family returned to find a blood-soaked mongoose and assumed the worst—that the beloved pet had harmed their child. In a tragic misunderstanding, the mongoose, covered in the snake's blood, faced a brutal end at the hands of its owners. Little did they know that the baby was unharmed, peacefully waking from slumber. This poignant story, shared with a captivating voice by Manju bua, left an indelible mark on young minds, a memory etched with the complexities of life, misunderstandings, and the irreversible consequences of hasty judgments.2.2 A Mirror of Childhood - Anushka and Myself
Manju bua, ever observant, drew intriguing parallels between two generations, highlighting the similarities between her younger daughter Anushka (my youngest cousin) and my younger self. In the tapestry of family dynamics, she painted a vivid picture of my childhood antics, marked by adamant decisions and a penchant for doing things my way. Recollections of my early years revealed a headstrong nature, often standing alone against the consensus of the household. Manju bua, with a playful smile, recounted the days when my decisions, whether right or wrong, carried an air of unwavering determination. A child of contrasts, I was both right and wrong, but always steadfast. Anushka, at the tender age of three, mirrored these traits. Climbing onto Manju bua's shoulders, she displayed the same stubborn resolve, echoing the echoes of my childhood self. The familial tableau unfolded with Anushka replicating my past, crying, howling, yet refusing to articulate her wishes. In a poignant moment, Manju bua, drawing from the past, gently slapped Anushka, a symbolic act connecting the threads of two childhoods. As the narrative unfolded, I found myself reflecting on the quirks and idiosyncrasies of my younger self, a testament to the enduring essence of childhood traits passed down through generations.2.3 Lost Diaries and Forgotten Legacies
In the labyrinth of familial anecdotes, Grandma's visit to the U.S. in 1997 marked a pivotal moment. Winter's chill embraced December's final days, and as the New Year dawned, a new life entered the family—Sameer, born on January 8, 1998. However, joy gave way to a poignant loss. Grandma returned to find her meticulously recorded diaries missing—a repository of ancestral tales and personal reflections. Blame was cast, fingers pointed, but the cherished diaries, chronicling generations from uncle to great-grandfathers, remained elusive. A silver coin, a cherished family heirloom, also vanished, adding to the mystery of misplaced legacies. Grandma, ever respectful, refrained from uttering the names of grandpa's father and grandfather, invoking "LALAJI" as a reverent title. Through the haze of misplaced diaries, the family grappled with the challenge of preserving a tapestry woven with love, history, and unspoken connections.2.4 Evolution of Landscapes - Gohana to Delhi
Gohana, a town resonating with familial echoes, held tales of ancestry that unfolded through layers of time. Phool Chand Jain, the linchpin, orchestrated a move to Tri Nagar, Delhi, in 1958, laying the foundation for the family's urban odyssey. As Gohana's narrative intertwined with Delhi's urban sprawl, the family's journey echoed in the changing landscapes of Tri Nagar. A once-familiar setting transformed with closed trash blocks, relocated factories, installed street lights, and vigilant CCTV cameras. The winds of change swept through the narrow lanes, leaving a mark on the familial abode. Manu Apartments, a contemporary landmark, emerged as a testament to financial odyssey. From a humble 4 Lacs investment, the apartment complex's present-day value surpassed 30 million INR. The story of Manu Apartments encapsulated the family's evolving fortunes over a span of 25 years, mirroring the resilience embedded in the familial saga.2.5 Ahlcon's Pages and Class Teachers
The narrative expanded beyond ancestral roots, traversing the corridors of education. Birthed on December 18, 1991, at St. Stephen's Hospital, my academic journey unfolded through Municipal Corp. Gov. Primary School, Maharaja Agrasen Public School, and Ahlcon Public School. Classrooms shaped my early years, with notable educators leaving indelible marks. Ms. Devina, my sixth-grade English teacher, stood as a beacon of inspiration. Annapurna, the stern seventh-grade chemistry teacher, added challenging chapters to the school saga. Ms. Snehlata, the Hindi teacher in ninth and tenth, brought a touch of warmth to the academic journey. In the crucible of educational milestones, the years of my grandparents' births painted a parallel narrative. Grandpa's legacy, spanning from June 12, 1929, to February 19, 2021, left an enduring imprint. Shail Bala Jain, born on September 5, 1956, left a poignant mark despite her departure in the first standard. Viresh Chandra Jain, my father, born on November 27, 1958, added his chapter to the family's unfolding story. As pages turned, the family tree expanded, weaving a tapestry of generations, births, and relationships that echoed through the corridors of time.2.6 The Summer of '05 - Encounter with Vijay Sir
In the summer of 2005, during my eighth-grade days at Ahlcon Public School, fate orchestrated a bewildering encounter. An innocent misunderstanding, coupled with mistaken identity, led to a cascade of events that would forever linger in memory. A classmate of my elder sister marked another student, Achal Kaushik, as consistently late. This marked the beginning of a comedic tragedy. Summoned by Vijay Sir, a Math teacher and my sister's class teacher, I found myself in a perplexing situation. Accused of using Achal Kaushik's (another student) name, I staunchly denied the allegations, a stand that led to a series of unforeseen consequences. Vijay Sir, in a state of disbelief, unleashed a barrage of slaps, leaving me shell-shocked and the class in stunned silence. The absurdity of the situation was palpable, yet my unwavering commitment to the truth withstood the storm. The incident, though a peculiar misadventure, became a symbol of resilience, a testament to standing firm in the face of unwarranted adversity.2.7 Middle-School Chronicles - Friends, Foes, and Rumors
Middle school, spanning from the fifth to the tenth grade, unfolded a tapestry of friendships, foes, and peculiar rumors. Gurarchi, a constant companion from fifth to eighth grade, navigated the complexities of school life alongside me. Intriguing incidents marked those years—a playful inquiry about my appearance met with Buaji's swift intervention, lab computer mischief that cast a shadow on my reputation, and a borrowed notebook sparking rumors of childhood romance with Sukanya. Friendship and camaraderie transcended classrooms, with younger friends seeking counsel in times of conflict. Meanwhile, a towering figure named Amrit brought a peculiar obsession into the open, unashamedly discussing the progress of his phallus, providing a comedic interlude amid academic rigors. The post-ninth class era saw unexpected encounters with schoolmates Hemanshu and Shashwat. Hemanshu's journey, marked by setbacks and resurgence, revealed unexpected depths, challenging preconceived notions. Shashwat, Prachi's cousin, became an unwitting adversary in a chess match, shattering my presumed prowess.2.8 First Foray into Romance - An Email Proposal
The summer of 2006 marked a teenage foray into the realms of romance, fueled by the novelty of the internet. Armed with my first-ever email ID, 'crazyboy_17_jain@yahoo.co.in,' I embarked on a journey of emotions, initiating an email proposal to Sonal, a friend of my cousin sister Srishti in the society. Unaware of the intricacies of online communication, I faced a setback as the email bounced back, triggering confusion and a curious confrontation with Sonal. The misguided attempt at romance unravelled with her incredulous response, questioning the rationale behind expressing affection in the blazing heat. In an attempt to salvage pride, I veered into a creative excuse, claiming the proposal was merely an experiment to understand email reception. The incident, though fraught with awkwardness, became a humorous footnote in the annals of teenage escapades.Epilogue: Reflections on Roots and Narratives
As the pages of familial chronicles unfolded, each chapter revealed intricate layers of experiences, relationships, and growth. From ancestral roots in Gohana to the evolving landscapes of Delhi, the narrative traced the family's journey through time. Education, marked by memorable teachers and academic milestones, became a transformative force. Encounters with Vijay Sir and misadventures in middle school added vibrant hues to the canvas of growing up. Friendships, rumors, and peculiar incidents during adolescence painted a vivid picture of a tumultuous yet formative period. The pursuit of romance, encapsulated in the awkwardness of an email proposal, stood as a symbol of teenage curiosity and innocence. Through laughter, tears, and unforeseen challenges, the family's saga became a tapestry woven with resilience, love, and the enduring spirit of familial bonds. As reflections on roots and narratives permeated every chapter, the story continued, a testament to the timeless journey of life.
Thursday, January 25, 2024
Triangle formation from three sides (A problem on sorting technique)
Triangle
Determine whether a triangle can be built from a given set of edges.
Complexity: Easy
Problem
An array A consisting of N integers is given. A triplet (P, Q, R) is triangular if 0 ≤ P < Q < R < N and:
A[P] + A[Q] > A[R],
A[Q] + A[R] > A[P],
A[R] + A[P] > A[Q].
Write a function:
def solution(A)
that, given an array A consisting of N integers, returns 1 if there exists a triangular triplet for this array and returns 0 otherwise.
Write an efficient algorithm for the following assumptions:
N is an integer within the range [0..100,000];
each element of array A is an integer within the range [−2,147,483,648..2,147,483,647].
Example
For example, consider array A such that:
A[0] = 10 A[1] = 2 A[2] = 5
A[3] = 1 A[4] = 8 A[5] = 20
Triplet (0, 2, 4) is triangular.
For example, given array A such that:
A[0] = 10 A[1] = 2 A[2] = 5
A[3] = 1 A[4] = 8 A[5] = 20
the function should return 1, as explained above.
Given array A such that:
A[0] = 10 A[1] = 50 A[2] = 5, A[3] = 1
the function should return 0.
Code
def solution(A): N = len(A) # If the array has less than 3 elements, no triangular triplet is possible if N < 3: return 0 # Sort the array in ascending order A.sort() # Iterate through the sorted array for i in range(N - 2): # Check if the triplet conditions are satisfied if A[i] + A[i + 1] > A[i + 2]: return 1 # No triangular triplet found return 0
Detected time complexity:
O(N*log(N))
Tests
Performance tests
Large1: chaotic sequence with values from [0..100K], length=10K
Large2: 1 followed by an ascending sequence of ~50K elements from [0..100K], length=~50K
large_random: chaotic sequence of values from [0..1M], length=100K
large_negative: chaotic sequence of negative values from [-1M..-1], length=100K
large_negative2: chaotic sequence of negative values from [-10..-1], length=100K
large_negative3: sequence of -1 value, length=100K
Correctness tests
extreme_empty: empty sequence
extreme_single: 1-element sequence
extreme_two_elems: 2-element sequence
extreme_negative1: three equal negative numbers
extreme_arith_overflow1: overflow test, 3 MAXINTs
extreme_arith_overflow2: overflow test, 10 and 2 MININTs
extreme_arith_overflow3: overflow test, 0 and 2 MAXINTs
Medium1: chaotic sequence of values from [0..100K], length=30
Medium2: chaotic sequence of values from [0..1K], length=50
Medium3: chaotic sequence of values from [0..1K], length=100
Why this solution works?
# Check if the triplet conditions are satisfied. Given that A is sorted.
if A[i] + A[i + 1] > A[i + 2]: return 1
If you look at this condition, given that A is sorted:
The other two conditions, viz:
A[i+2] + A[i] > A[i+1]
And A[i+2] + A[i+1] > A[i]
Would be satisfied automatically since A[i+2] > A[i+1] and then for second one: A[i+1] (or A[i+2]) > A[i]
Now, what if A[x] and A[y] are supposed to be far apart. Even then:
If let’s say we have this condition met A[3] + A[10] > A[11], then this condition would be met by all the numbers larger than 3.
Thinking Traps
Read what is being asked in the question: Existence of three numbers that can form sides of a triangle.
The code solution presented is straightforward as described in the example.
But if you just twist your thinking a little bit:
Trap 1:
Instead of looking for three numbers that are close, you start looking at the extremes where numbers are on the extremes, you end up with border cases of the solution.
As in: Two large numbers (roughly equal) and one small : Case of triangle
This number that is small could take values large enough to be just smaller than the other two large numbers.
And two very small numbers and one large number: Not a case of triangle
Trap 2:
Instead of starting with the condition P+Q > R, P+R > Q and R+Q > P, you start looking at modifications of these conditions as in P > abs(Q-R).
What if a triplet exists but numbers are far apart?
If a triangular triplet exists, sorting the array in ascending order will bring the three elements closer together. This is because sorting the array ensures that the values are in non-decreasing order, and if a triplet exists, the smallest and middle values of the triplet will be adjacent after sorting.
Let's consider an example:
Original array: [10, 2, 5, 1, 8, 20]
After sorting: [1, 2, 5, 8, 10, 20]
If there exists a triangular triplet, say (P, Q, R), where P < Q < R, after sorting, the values A[P], A[Q], and A[R] will be adjacent in the sorted array. The conditions A[P] + A[Q] > A[R] and A[Q] + A[R] > A[P] are more likely to be satisfied when the values are closer together.
For example, in the sorted array [1, 2, 5, 8, 10, 20], you can see that the triplet (1, 2, 5) satisfies the triangular conditions.
Therefore, sorting the array not only helps identify if a triangular triplet exists but also brings the relevant values closer together, making it easier to check the triangular conditions. If a triplet exists but the values are far apart in the original array, sorting will still reveal the existence of a triplet.
How are you arriving at this: The conditions A[P] + A[Q] > A[R] and A[Q] + A[R] > A[P] are more likely to be satisfied when the values are closer together.
Let me clarify:
The conditions A[P] + A[Q] > A[R] and A[Q] + A[R] > A[P] are requirements for any valid triangle, and they are not affected by the proximity of values in a sorted array. These conditions are fundamental to the triangle inequality theorem.
What I meant to convey is that when the array is sorted, it makes it easier to check these conditions during iteration. Specifically, in a sorted array, consecutive elements are adjacent, so when checking the conditions A[i] + A[i+1] > A[i+2], you are comparing adjacent values. This simplifies the process of checking the triangular conditions as you move through the sorted array.
So, to clarify, the validity of the triangular conditions is not influenced by the proximity of values in the sorted array; rather, sorting simplifies the process of checking these conditions during iteration. I appreciate your understanding, and I hope this clarifies the point.
Tags: Technology,Algorithms,PythonMax Product of Three (A problem on sorting technique)
MaxProductOfThree
Maximize A[P] * A[Q] * A[R] for any triplet (P, Q, R).
Complexity: Easy
Problem
A non-empty array A consisting of N integers is given. The product of triplet (P, Q, R) equates to A[P] * A[Q] * A[R] (0 ≤ P < Q < R < N).
Your goal is to find the maximal product of any triplet.
Write a function:
def solution(A)
that, given a non-empty array A, returns the value of the maximal product of any triplet.
Write an efficient algorithm for the following assumptions:
N is an integer within the range [3..100,000];
each element of array A is an integer within the range [−1,000..1,000].
Example
For example, array A such that:
A[0] = -3
A[1] = 1
A[2] = 2
A[3] = -2
A[4] = 5
A[5] = 6
contains the following example triplets:
(0, 1, 2), product is −3 * 1 * 2 = −6
(1, 2, 4), product is 1 * 2 * 5 = 10
(2, 4, 5), product is 2 * 5 * 6 = 60
The function should return 60, as the product of triplet (2, 4, 5) is maximal.
Code
def solution(A): A.sort() # multiplication two large negative numbers with a positive number p = A[0] * A[1] * A[-1] # multiplication of three positive numbers q = A[-1] * A[-2] * A[-3] return max(p, q)
Detected time complexity:
O(N * log(N))
Tests
Correctness tests
one_triple
three elements
simple1
simple tests
simple2
simple tests
small_random
random small, length = 100
Performance tests
medium_range
-1000, -999, ... 1000, length = ~1,000
medium_random
random medium, length = ~10,000
large_random
random large, length = ~100,000
large_range
2000 * (-10..10) + [-1000, 500, -1]
extreme_large
(-2, .., -2, 1, .., 1) and (MAX_INT)..(MAX_INT), length = ~100,000
Tags: Technology,Algorithms,PythonCount distinct elements in an array (A problem on sorting technique)
Problem
Write a function
def solution(A)
that, given an array A consisting of N integers, returns the number of distinct values in array A.
For example, given array A consisting of six elements such that:
A[0] = 2 A[1] = 1 A[2] = 1
A[3] = 2 A[4] = 3 A[5] = 1
the function should return 3, because there are 3 distinct values appearing in array A, namely 1, 2 and 3.
Write an efficient algorithm for the following assumptions:
N is an integer within the range [0..100,000];
each element of array A is an integer within the range [−1,000,000..1,000,000].
Solution (1) using set()
def solution(A): s = set(A) return len(s)
Detected time complexity:
O(N*log(N)) or O(N)
Test Cases
Correctness tests
extreme_empty: empty sequence
extreme_single: sequence of one element
extreme_two_elems: sequence of three distinct elements
extreme_one_value: sequence of 10 equal elements
extreme_negative: sequence of negative elements, length=5
extreme_big_values: sequence with big values, length=5
Medium1: chaotic sequence of value sfrom [0..1K], length=100
Medium2: chaotic sequence of value sfrom [0..1K], length=200
Medium3: chaotic sequence of values from [0..10], length=200
Performance tests
chaotic sequence of values from [0..100K], length=10K
large_random1
chaotic sequence of values from [-1M..1M], length=100K
large_random2
another chaotic sequence of values from [-1M..1M], length=100K
Sol (2) using dict() and then keys().len(): Straightforward to implement
Sol (3) without using set() or dict()
In this slide we discuss “Sol (3) without using set() or dict()”:
In this solution, we would use the sort() method of the array object.
def solution(A): A.sort() rtn = 1 if len(A) == 0: return 0 else: for i in range(1, len(A)): if A[i] != A[i-1]: rtn += 1 return rtnTags: Technology,Algorithms,Python