Python
কতোটা মানুষ বাকি আছো
কতোটা মানুষ ছিলে ?
কয় পশলা রোদের বদল
কতোটা বৃষ্টি দিলে ?
1234
কতোটা মানুষ বাকি আছো কতোটা মানুষ ছিলে ? কয় পশলা রোদের বদল কতোটা বৃষ্টি দিলে ?
…
প্রথমত স্বপ্নেরা বেদখল হয়ে গেছেঅতঃপর তুমি ,যতবার হারাই আমি দ্বিতীয় মৃত্যুর অতলেততবার হারাও তুমি। উদ্ভ্রান্তের মত জেগে উঠিখুঁজি তোমায় বেখেয়াল,হাত বাড়ালেই বিঘত দূরে তুমিতবু অদৃশ্য এ দেয়াল । স্বপ্নে না হোকদুঃস্বপ্নে তবু তুমি এসো ,তুমি আমার না হওতবু আমায় ভালবেসো । — আমন্ত্রণ – মহিউদ্দিন আহমেদ
কোনো এলগোরিদমের টাইম কমপ্লেক্সিটি বের করার সময় আমরা কিছু নিয়ম ফলো করি। যেমনঃ ১ । কন্সট্যান্ট পদ বাদ দেয়াঃ যদি কোনো কমপ্লেক্সিটি আসে O(3n+2) তাহলে সেটা আসলে O(n) লিখা যায়। কারণ Asymptotic Notation এর ক্ষেত্রে আমরা আমরা রিলাশনটা খুঁজি যে এটা লিনিয়ার নাকি লগারিদ্মিক ইত্যাদি আমরা একচুয়াল অপারেশন কত চলবে এইটা বের করি না। আর n এর খুব বড় মানের জন্য এদের তেমন কোনও ভূমিকা ও নেই। ধরি n এর মান ১, তাহলে O(3n+2) = (৩*১+২) = ৫ কিন্তু n এর মান যদি ১লক্ষ হয় তাহলে রেসাল্ট এর সাথে ২ যোগ করা না করা কম্পিউটারের জন্য কিছুই না। সেম কথা ৩ গুনের জন্য প্রযোজ্য । n এর মান ১০ হলে ৩ গুণ ৩০ হবে, ২০ হলে ৬০ হবে, কিন্তু ৩ গুণ না হয়ে যদি n গুণ হত তাহলে কমপ্লেক্সিটি হতো O(n2) n=১০ হলে হত ১০০ আর ২০ হলে ৪০০ তখন কিন্তু আমরা আর একে বাদ দিতাম না, তাই কমপ্লেক্সিটি তে কন্সট্যান্ট পদ বাদ দেয়া হয় । ২ । নন ডমিন্যান্ট পদ বাদ দেয়াঃ O(n2 + n + 4) এমন হলে আমরা কন্সট্যান্ট বাদ দিব তাহলে হবে O(n2 + n) এখন চিন্তা করে দেখি এখানে ডমিন্যান্ট পদ বা সবচেয়ে বড় পদ কিন্তু n2 যদি এর মান হয় ১০, তাহলে এর ভ্যালু…
আমরা প্রোগ্রামিং করার সময় খুব বেশি এই প্রশ্ন শুনি যে ‘এই প্রোগ্রামের টাইম কমপ্লেক্সিটি কত?’ একটা প্রোগ্রাম আসলে কী ? আমরা যদি চিন্তা করি দেখবো যে প্রতিটা প্রোগ্রাম / সফটওয়ার কিন্তু আসলে কিছু ফিক্স Operation এর সমষ্টি । তাহলে আমাদের প্রোগ্রাম যখন রান করে তখন এই অপারেশন গুলো চলার জন্য টাইম লাগবে। অপারেশন হতে পারে Assignment operation (a = 2) , conditional operation (a < 0) ইত্যাদি । সহজ ভাষায় টাইম কমপ্লেক্সিটি হলো কোনো নির্দিষ্ট ইনপুট এর জন্য একটা প্রোগ্রাম সল্যুশন করতে কত সময় নেয় । আমরা জানি যে , কোনো প্রবলেম এর একাধিক সল্যুশন থাকতে পারে। আমি যে কাজ ৫ ঘণ্টায় করতে পারি তুমি সেম কাজ ১ ঘণ্টায় করতেই পারো । তাহলে সময় এর বিবেচনায় তোমার পদ্ধতি আমার চেয়ে ভালো তো আমরা বলবো তোমার সল্যুশন এর টাইম কমপ্লেক্সিটি আমার চেয়ে ভালো । একই জিনিস প্রোগ্রামিং এর জন্যেও সত্য । একাধিক সল্যুশন এর মাঝথেকে অপ্টিমাল সল্যুশন খুঁজে বের করার একটা উপায় হচ্ছে তাদের টাইম কমপ্লেক্সিটি বিবেচনা করা। এক্ষেত্রে কিন্তু আমরা এটা বের করছি না যে কত সেকেন্ড সময় লাগলো বরং আমারা কোনও ইনপুট এর জন্য সল্যুশন টাইম এর গ্রোথ রিলেশনটা বের করি । খুবই ভালো কথা আমরা বুঝলাম যে কমপ্লিক্সিটি দেখে আমরা ভালো মন্দ আলাদা করতে পারব তো এখন প্রশ্ন…
In the tapestry of life, woven with threads of joy and sorrow, it is the moments of pure, unadulterated bliss that illuminate our journey and give meaning to our existence. Each day offers a myriad of opportunities to embrace the beauty of living and to savor the simple pleasures that abound. So, let’s embark on a quest to infuse every moment with joy and find happiness in the smallest of things. 1. Cultivate Mindfulness Mindfulness is the art of being fully present in the moment, savoring each experience with an open heart and a curious mind. Take a moment to pause and breathe, allowing yourself to fully immerse in the sights, sounds, and sensations of the present moment. Whether it’s the warmth of the sun on your skin, the melody of birdsong in the air, or the taste of your favorite meal, let mindfulness be your gateway to experiencing the richness of life with heightened awareness and gratitude. 2. Find Beauty in the Everyday Beauty surrounds us at every turn, waiting to be discovered in the most unexpected places. Take time to notice the small miracles that unfold in the ordinary moments of life—the dew-kissed petals of a flower, the…
Understanding oneself is a lifelong journey, an odyssey of self-discovery and introspection that unfolds in layers over time. It requires courage, curiosity, and a willingness to delve deep into the recesses of our hearts and minds. Here are some ways to embark on the quest of better understanding yourself: 1. Self-Reflection Set aside time for quiet introspection, away from the distractions of daily life. Reflect on your thoughts, emotions, and experiences with gentle curiosity and non-judgment. Journaling can be a powerful tool for self-reflection, allowing you to articulate your thoughts and feelings in a tangible form. 2. Explore Your Values and Beliefs Identify your core values and beliefs—the guiding principles that shape your thoughts, decisions, and actions. Reflect on what matters most to you in life, and consider how your values influence your behavior and relationships. Aligning your actions with your values can lead to greater authenticity and fulfillment. 3. Embrace Your Strengths and Weaknesses Acknowledge and embrace your strengths and weaknesses with compassion and acceptance. Celebrate your achievements and talents, while also recognizing areas for growth and improvement. Embracing your whole self, flaws and all, is essential for cultivating self-compassion and self-acceptance. 4. Pay Attention to Your Emotions Listen…
Living with anxiety can be challenging, but it is possible to develop coping strategies and lifestyle changes that help you manage and reduce its impact on your daily life. Here are some practical tips for living with and dealing with anxiety: 1. Understand Your Anxiety Educate yourself about anxiety and its symptoms to better understand what you’re experiencing. Recognize that anxiety is a natural response to stress and perceived threats, and that it can manifest in physical, emotional, and cognitive ways. 2. Practice Self-Care Prioritize self-care practices that promote relaxation and well-being. This may include getting enough sleep, eating a balanced diet, exercising regularly, and practicing mindfulness or relaxation techniques such as deep breathing, meditation, or yoga. 3. Establish a Support System Reach out to trusted friends, family members, or mental health professionals for support. Sharing your feelings and experiences with others can provide validation, empathy, and practical advice for managing anxiety. 4. Set Realistic Goals Break tasks and goals into smaller, manageable steps to prevent feeling overwhelmed. Focus on what you can control and take things one step at a time, celebrating your progress along the way. 5. Challenge Negative Thoughts Learn to recognize and challenge negative thoughts and…
Getting out of your comfort zone can be both exhilarating and challenging, but it’s essential for personal growth and development. Here are some practical steps to help you step outside your comfort zone: 1. Identify Your Comfort Zone Start by identifying the areas of your life where you feel most comfortable and secure. This may include your daily routine, social interactions, or professional responsibilities. Recognize that growth occurs when you venture beyond these familiar boundaries and embrace new experiences. 2. Set Clear Goals Define specific goals or objectives that you want to achieve by stepping outside your comfort zone. Whether it’s learning a new skill, taking on a leadership role, or challenging yourself physically or emotionally, having clear goals will provide direction and motivation for your journey. 3. Start Small Take small, manageable steps outside your comfort zone to build confidence and momentum. Start with activities or challenges that are slightly outside your comfort zone but still achievable. As you gain experience and become more comfortable with discomfort, gradually increase the level of challenge. 4. Embrace Fear and Uncertainty Recognize that fear and uncertainty are natural responses when stepping outside your comfort zone. Instead of avoiding or resisting these feelings,…