Skip to main content

33. Search in Rotated Sorted Array

 33. Search in Rotated Sorted Array 📄 Problem Statement : There is an integer array nums sorted in ascending order (with distinct values). Before being passed to your function, nums may be rotated at an unknown pivot index k (where 1 <= k < nums.length ) such that the array becomes [nums[k], nums[k+1], ..., nums[n-1], nums[0], nums[1], ..., nums[k-1]] . You are given the array nums after the rotation and an integer target . Your task is to return the index of the target if it exists in nums , or return -1 if it does not exist. You must solve it in O(log n) time. 📚 Examples : Example 1 : Input: nums = [4,5,6,7,0,1,2], target = 0 Output: 4 Example 2 : Input: nums = [4,5,6,7,0,1,2], target = 3 Output: -1 Example 3 : Input: nums = [1], target = 0 Output: -1 📜 Constraints : 1 <= nums.length <= 5000 -10⁴ <= nums[i] <= 10⁴ All values of nums are unique . nums is a sorted array, possibly rotated . -10⁴ <= target <= 10⁴ ...

 


How to build Self confidence in 2022


Self- confidence is an required part of humanity. A person with self- confidence usually likes themselves, is willing to take threats to achieve their individual and professional goals, and thinks appreciatively about thefuture.Someone who lacks self- confidence, still, is less likely to feel that they can achieve their dreams, and tends to have a negative outlook about themselves and what they hope to gain in life. The good news is that self- confidence is something you can upgrade! Building self- confidence requires you to cultivate a positive posture about yourself and your social relations, while also learning to deal with any negative feelings that arise and practicing lesser self- care. You should learn to set aims and take dangers, as well, since meeting challenges can further upgrade your self- confidence. 


🔵 Cultivating a Good Attitude


Identify your negative thoughts. Your negative thoughts might sound like this" I can not do that,"" I'll surely dissatisfy"," no one wants to ascertain what I've to bring out." This inward voice is hopeless and unhelpful and will hold you back from winning high self- esteem and greater self- confidence. 


🔵 Turn your negative thoughts to positive thoughts.


As you pay concentration to your negative debates, revolve them around to positive thoughts. This may take the form of positive asseveration , similar as" I'm going to try it,"" I can be successful if I work at it," or" people will hear to me." Start with just a some positive thoughts a day. 


🔵 Refuse to focus on negative thoughts more often than positive thought.

sometime, your positive thoughts should be contributed more" brain space" than your negative thoughts. The likewise you battle your negative self- thinking with positivity, the likewise natural this will come. 


 ðŸ”µ Maintain a positive support network


Connect with those close to you, whether they're family or buddies, to observe your outlook upraised. likewise, stay off from people or things that make you feel unsatisfactory. 

 

◾ Someone you call a friend may really make you feel bad, if they constantly make negative reflections, or condemn you. 


◾ Indeed well- intended family members who weigh in with their opinions about what you" should" be doing can be destructive to your tone- confidence. 

   

◾ As you cultivate your own positive station and take way to achieve your ambitions these naysayers may come more apparent. As much as possible, limit your contact with them while you make your tone- confidence. 

    

◾ Take some time to suppose about which people in your life really make you feel great. Make a thing to spend further time with people who are probative and uplifting. 


🔵Eliminate reminders of your negativity.

Escape spending time around stuff that can make you feel bad about yourself again. These might be monuments from the history, rags that no lengthy fits, or places that do n’t fit with your new ambitions of building up confidence. Though you may not be suitable to get relieve of every negative source in your life, you can clearly suppose about how to cut your losses. This will go a long way in erecting your tone- confidence up. 

 

Take the time to sit down and suppose about all of the effects that are bringing you down, from mean musketeers, a career you do not important care for, or a living situation that's nearly unsupportable. 


🔵 Identify your talents.


Everyone is good at individuality, so discover the things at which you exceed, and also concentrate on your gifts. Give yourself allowance to take pride in them. Express yourself, whether it's through art, music, writing, or dance. Find thing you enjoy and develop a talent to go with your interest.


◾Adding a variety of interests or pursuits to your life won't only make you more confident, but it'll increase your chances of meeting compatible buddies as well.


◾ When you are following your passion, not only will it have a remedial effect, but you will feel unique and accomplished, all of which can help make your tone- confidence. 


🔵 Take pride in yourself


Not only should you feel proud of your talents or your expertise, but you should correspondingly think about the goods that make your self-identity great. It can be your sense of humor, your sense of compassion, your listening skills, or your capability to manage under tension. You may not allow

 that there is anything about your personality worth esteeming, but if you dig deep, you will realize that you have abundance of estimable rates. Focus on them by writing them down. 


🔵 Look in the mirror and smile.


Studies encircling what is called the" facial feedback hypothesis" intimate that the expressions on your face can frankly encourage your brain to register or magnify certainemotions.So by appearing in the looking glass and smiling every day, you might feel happier with yourself and additional confident in the long run. This will also help you feel happier about your appearance, and to accept the way you look. 


 Other people will probably respond to you well when you smile at them, so in addition to making yourself feel happier, you may get a boost in confidence due to the feedback you get from other people aswell.confidence. 


Thanks for reading the this article, hope article will help you in what you are trying to gain. If you have any problem or any suggestions then please contact me.


Here you can read another's blogs :-








Comments

Popular posts from this blog

Mistakes to Avoid Before Coming to India for Study

Mistakes to Avoid Before Coming to India for Study | Study Abroad Tips Mistakes to Avoid Before Coming to India for Study Studying in India can be a transformative experience, offering a unique cultural perspective and high-quality education. However, to make the most of your time in India, it’s crucial to prepare thoroughly and avoid common mistakes. Here’s a guide to help you avoid pitfalls and ensure a smooth transition to your studies in India. 1. Neglecting Visa and Documentation Requirements One of the most critical aspects of studying abroad is ensuring that you have the correct visa and documentation: Visa Application: Ensure you apply for the correct type of student visa. Check the specific requirements and processing times to avoid last-minute issues. For detailed visa requirements, visit the Indian Government's official visa website . Document Checklist: Prepare all necessary documents, s...

Mohan babu university Placements | Placement in Mohan babu university | MBU Tirupati | Dim vlogs

Jobs and Placement at Mohan Babu University Jobs and Placement at Mohan Babu University Mohan Babu University (MBU) is well-known for offering excellent education and career opportunities to its students. The university has a dedicated placement cell that works hard to ensure that students get placed in top companies across India and abroad. MBU has built strong relationships with recruiters from various industries, helping students start their careers with good job offers. Why Choose Mohan Babu University for Placements? At Mohan Babu University, students not only receive quality education but also have access to a strong placement network. The university’s placement cell works throughout the year to help students prepare for interviews, develop soft skills, and connect with leading companies. This is one of the key reasons why students at MBU have high placement success rates. Placement Statistics at Mohan Babu Univ...

How to Crack College Placements: A Complete Guide to Projects, Interviews, and Success

How to Crack College Placements: A Complete Guide to Projects, Interviews, and Success How to Crack College Placements: A Complete Guide to Projects, Interviews, and Success Welcome to the first episode of The Mali Show ! If you're a student preparing for college placements , you're probably feeling both excited and nervous. Landing that dream job or internship is a big deal, but with the right approach, cracking campus placements doesn’t have to be a stressful experience. In this blog post, we’ll break down everything you need to know about how to crack college placements , from selecting the perfect placement projects to preparing for those nerve-wracking interviews . With these tips, you’ll be one step closer to success. 1. How to Crack College Placements: The Basics When it comes to college placements , understanding the entire process is key. Every college has its own str...