#Binary Search
Explore tagged Tumblr posts
speccytechybecky · 2 years ago
Text
How does the computer scientist find their breakfast?
By using a serial search
32 notes · View notes
sivaniverse · 2 years ago
Text
Binary Search Algorithm
I made a new video explaining the Binary Search Algorithm. My aim is to explain Binary Search Algorithm more straightforwardly in this video. I have also tried to explain this visually with the help of an example array I took. I hope this video helps you understand about Binary Search Algorithm.
Do check it out!
youtube
12 notes · View notes
compsci-haikus · 3 months ago
Text
There once was a bicycle theft that left a CS nerd bereft. A binary search would have found the merch but alas, the cop's mind wasn't deft.
Tumblr media
99K notes · View notes
rahulswriteups · 10 months ago
Text
Tumblr media
Navigating Efficiency: A Comprehensive Guide to the Binary Search Algorithm
In the vast landscape of algorithms, one star shines bright in the realm of search operations—Binary Search. This comprehensive guide aims to demystify the intricacies of this algorithm, exploring not only its mechanics but also delving into the crucial aspect of time complexity. Join us on a journey to unlock the power of efficiency.
Understanding Binary Search:
Binary Search Demystified:
Imagine you have a library of books neatly arranged in alphabetical order. Binary search is like finding a specific book by repeatedly splitting the remaining possibilities in half. You start in the middle, decide if the target is in the left or right half, and continue this process until you've pinpointed the book. This systematic approach is the heartbeat of binary search.
Real-World Scenario:
Consider a scenario where you're searching for a friend in a phone book. You open it in the middle, decide whether their name would be in the first or second half, and repeat until you locate the right entry. This mirrors the efficiency of binary search in swiftly finding elements in a sorted collection.
Time Complexity Unveiled:
The Essence of Time Complexity:
Now, let's dive into the critical realm of time complexity. Binary search boasts a time complexity of O(log n), where n is the number of elements. To put it simply, as your dataset grows, binary search's efficiency doesn't increase at the same pace as linear search, making it a go-to solution for large datasets.
Visualizing Time Complexity:
Picture a scenario where you're searching for a specific contact in your phone—a linear search would involve scrolling through each entry, while binary search mirrors the efficiency of quickly narrowing down your contacts by jumping to the middle, then deciding which half to explore.
Real-Life Applications:
Binary Search in Everyday Scenarios:
Consider managing an extensive contact list on your phone, sorted by names. Binary search becomes your ally in swiftly locating a friend's contact information without scrolling through every entry. This efficiency becomes even more pronounced in scenarios like online databases or searching for elements in a sorted array.
Optimizing Database Queries:
In the realm of databases, where time is of the essence, binary search becomes a game-changer. Whether you're searching for a specific record by ID or querying a sorted dataset for relevant information, the algorithm's efficiency enhances response times and user experience.
Conclusion:
As we conclude our exploration of the Binary Search Algorithm, it stands as a beacon of efficiency in the sea of algorithms. Its simplicity, coupled with the elegance of divide and conquer, makes it a valuable asset in the toolbox of any programmer or data scientist.
Armed with the knowledge of binary search and its time complexity advantages, you're empowered to optimize search operations and enhance the responsiveness of your applications. In the dynamic world of technology, where speed and efficiency are paramount, understanding the nuances of binary search opens doors to a realm of possibilities, making your journey through the vast data landscape smoother and more rewarding.
Know more: Click Here
0 notes
jcmarchi · 1 year ago
Text
OpenAI GPTs: Building Your Own ChatGPT-Powered Conversational AI
New Post has been published on https://thedigitalinsider.com/openai-gpts-building-your-own-chatgpt-powered-conversational-ai/
OpenAI GPTs: Building Your Own ChatGPT-Powered Conversational AI
What are GPTs?
GPTs, introduced by OpenAI in November 2023, are customizable versions of the ChatGPT model. They represent a significant shift from general-purpose AI chatbots to specialized, purpose-driven AI assistants. GPTs can be tailored for specific tasks, making them more effective and efficient in various domains, from education and gaming to business and creative arts.
OpenAI new GPT Builder (GPTs)
Key Features and Capabilities
Customization Without Coding: One of the most groundbreaking aspects of GPTs is that they require no coding skills to build. This makes it accessible to a broader audience.
Wide Range of Applications: GPTs can be designed for myriad uses, such as teaching math, assisting in game rules interpretation, or creating digital content like stickers.
Integration of Extra Knowledge: Users can feed additional information into GPTs, enhancing their ability to handle specialized tasks.
Functional Flexibility: GPTs can incorporate capabilities like web searching, image creation, and data analysis, depending on the user’s needs.
Creating a Custom GPT: Simplicity and Efficiency
Creating your personalized GPT app is a straightforward process that requires no coding knowledge, making it accessible for anyone with an idea. Here’s a simplified guide on how to bring your custom GPT to life:
Step-by-Step Guide to Creating Your Personalized GPTs App
Login and Navigate: First, log into your ChatGPT account. Look for the “Explore” section, which is usually located on the top left of your screen. This is where you’ll find all the GPT applications you have access to.
OpenAI ChatGPT
Create Your GPT: Click on ‘Create My GPT’. You’ll be taken to a new screen. Here, you’ll be prompted to describe what your GPT should do.
GPTs Interface
Set Your Prompt: Input your prompt with clarity and purpose. For our example we created a “Code Mentor” by entering a prompt: “Create an AI that provides clear explanations and guides users through algorithms and data structures, capable of facilitating real-time problem-solving sessions.”
Building a Coding Mentor with GPTs
Refinement: ChatGPT may ask follow-up questions to refine your concept. This step ensures your GPT is aligned with your vision and is capable of performing its intended functions efficiently.
Testing and Customization: Once created, your GPT appears on the right side of the screen. Here you can test its capabilities and fine-tune its functions. For the “Code Mentor” you might test it with queries like “Explain the concept of dynamic programming” or “Guide me through implementing a binary search tree.”
Save and Share: After you’re satisfied with your GPT, you can save your settings. Then, take advantage of the option to share your GPT with others. This is done through a link, making collaboration easy and promoting a community-oriented approach to AI development.
Remember, while Plus users have immediate access to use the GPTs via shared links, the creators won’t have access to the chats others have with their GPTs,.
Open AI mentioned that Privacy and safety are at the heart of GPTs. Chats with GPTs remain private, not shared with builders, and users have full control over whether data is sent to third-party APIs. Additionally, builders can decide if interactions with their GPT should contribute to model training, giving users and builders alike control over data usage and privacy.
Connecting GPTs to Real-World Applications
Beyond explanations, these GPTs can connect to external data sources or perform actions in the real-world. For instance, you could create a “Shopping Assistant” GPT that helps with e-commerce orders, or a “Travel Planner” GPT that integrates with a travel listings database.
Empowering Enterprises with Custom GPTs
Enterprises can take advantage of internal-only GPTs for specific use cases. This could range from a “Marketing Assistant” that helps draft brand-aligned materials to a “Support Helper” that aids in customer service. These GPTs can be deployed securely within a company’s workspace, with full administrative control over sharing and external GPT usage.
5 custom GPT applications that users have created
Conclusion
The evolution of AI technology with OpenAI’s GPT-4 Turbo and the introduction of customizable GPTs represent a significant leap forward in the field of artificial intelligence. GPT-4 Turbo’s enhanced context window and integration with visual and auditory capabilities mark a new era of conversational AI that is more accurate, detailed, and versatile. The GPTs, with their user-friendly customization options, open up endless possibilities for personal and professional use, democratizing AI technology and making it accessible to a wider audience.
0 notes
vatche-dev · 1 year ago
Text
Grokking Algorithms #1
I’m awful at algorithms. There, I said it. I could blame my college algorithms professor or the fact that I’ve never had to use fancy algorithms at work. But anytime I’m on the market for a new job, I’m confronted with the inevitable HackerRank or LeetCode challenge and I stumble, remembering my biggest weakness as a software engineer. Now that I’m happy with my current job, I figure it’s a…
Tumblr media
View On WordPress
1 note · View note
dat-physics-gal · 1 year ago
Text
It’s actually really sad that the police didn’t listen for a way to do their job better.
Then again, it’s the police, so i’m not that surprised.
God-tier account of a Cambridge computer scientist trying to get police to investigate his bike theft camera footage:
Tumblr media
33K notes · View notes
deletedg1rl · 1 year ago
Text
oomfies what should I learn after binary search
0 notes
b4b31 · 1 year ago
Text
All 25 algorithms: HOW TO NAVIGATE
SEARCHING:
Linear Search: Imagine you have a bunch of love letters, and you want to find a specific letter from someone special. You start by looking at the first letter and check if it's the one you're looking for. If it's not, you move on to the next letter and keep going until you find it or reach the end of the letters.
Binary Search: Your collection of love letters are arranged in alphabetical order. Binary search is like playing a guessing game where you try to find a secret love letter. You start by guessing the letter in the middle. If your guess is too late in the alphabet, you know the secret letter must be in the earlier part of the collection. If your guess is too early, you know the secret letter must be in the later part. You keep dividing the collection in half and guessing until you find the secret love letter.
Depth First Search: In your stack of love letters from different people you are going through each letter and exploring deeply before moving on to the next letter. If you find a reply or another love letter within a letter, you read and explore that before continuing with the rest of the stack.
Breadth First Search: In a box full of love letters from different people you are going through all the letters from the same sender before moving on to letters from other senders. You explore all the letters from one person, then move to the next person and explore their letters, and so on.
SORTING:
Insertion Sort: You want to arrange a messy pile of love letters in order of the senders name. With insertion sort, you start with an empty hand and pick one letter at a time from the messy pile. Each time you pick a letter, you put it in the correct position in your hand among the letters you've already sorted.
Heap Sort: You want to sort a big pile of love letters, based on the date they were written. Heap sort is like organizing the letters by putting the most recent one at the top. You keep picking the most recent letter and putting it in a separate pile until all the letters are sorted.
Selection Sort: You want to arrange a stack of love letters from different people in order of the length of the letter. With selection sort, you start by finding the shortest letter and put it aside. Then, you find the next shortest letter and put it next to the first one. You keep doing this until all the letters are arranged by length.
Merge Sort: You want to sort a big collection of love letters from different people, based on the emotions expressed. With merge sort, you divide the collection into smaller groups, sort each group individually based on emotions, and then merge them back together in the correct order. You keep dividing, sorting, and merging until all the letters are sorted.
Quick Sort: You want to sort love letters, based on the intensity of love expressed. With quick sort, you pick one letter as a "special letter" called the base. Then, you divide the line into two groups: letters with less intense expressions of love and letters with more intense expressions. You repeat this process for each group until all the letters are sorted.
Counting Sort: You want to sort a collection of love letters from different people, based on the number of words. Counting sort is like counting how many letters have a specific number of words and then putting them in order.
GRAPHS:
Kruskal’s Algorithm: Imagine you have a map with different locations connected by lines, and you want to build the shortest possible network of lines between all the locations. This algorithm helps you select and connect the lines in a way that forms the minimum spanning tree, which means the total length of the lines is minimized.
Dijkstra’s Algorithm: Think of a map with different locations and lines connecting them, and you want to find the shortest path from one location to another. This helps you find the path with the minimum total distance. You start at one location and keep moving to neighboring locations, always choosing the path with the shortest distance until you reach the destination.
Bellman-Ford Algorithm: Imagine a treasure map with different paths and each path having a certain cost. This algorithm helps you find the shortest path to the treasure by considering the costs of the paths. You keep comparing and updating the total cost of reaching each location until you find the shortest path.
Floyd-Warshall Algorithm: Picture a map with different routes connecting the locations, and you want to find the shortest path between all pairs of locations. This algorithm helps you calculate the shortest path between any two locations in the most efficient way. It considers all possible paths and updates the distances until it finds the shortest paths between all pairs of locations.
Topological Sort Algorithm: Imagine you have a list of tasks, and some tasks depend on others. This sort helps you order the tasks in such a way that no task depends on another task that comes later in the order. It ensures a proper sequence for completing the tasks without any dependency issues.
Flood Fill Algorithm: Picture a coloring book with different shapes. This algorithm helps you fill a shape with a specific color. You start by selecting a shape and filling it with the desired color. Then, you move to neighboring shapes and fill them if they are the same color as the starting shape. You continue this process until you’ve filled all the connected shapes with the chosen color.
Lee Algorithm: Imagine you have a maze, and you want to find the shortest path from the starting point to the end point. This algorithm helps you explore the maze step by step to find the shortest path. You start at the beginning and keep moving to neighboring cells, marking them with the number of steps taken until you reach the destination.
ARRAYS:
Kadane’s Algorithm: Imagine you have an array representing the number of posts baked each day. This algorithm helps you find the longest consecutive period of baking the most posts. You start with the first day and keep adding the posts counts, but if the sum becomes negative, you start over with the next day, searching for the longest streak of baking the most posts.
Floyd’s Cycle Detection Algorithm: Picture an array of post reviews, where each element represents a unique review. This algorithm helps you find if there is a repeating pattern of reviews in the array. You have two pointers—one moving slowly and another moving faster. If the pointers meet, it means there is a repeating pattern of reviews in the array.
Knuth-Morris-Pratt Algorithm: Imagine you have an array representing a series of post ingredients, and you want to find occurrences of a specific ingredient pattern within the array. This algorithm helps you efficiently find instances of the ingredient pattern within the array. It uses a smart way of skipping unnecessary ingredient comparisons based on previously matched patterns, helping you identify the relevant occurrences efficiently.
Quick Select Algorithm: Picture an array of posts sizes, and you want to find the post size that ranks at a specific position when the array is sorted. Quick select algorithm helps you find the post size at the desired position efficiently by partitioning the array based on pivot elements (post sizes), narrowing down the search space iteratively until the desired position is found.
Boyer-Moore Majority Vote Algorithm: Imagine you have an array of post flavors, where each element represents a flavor preference. This algorithm helps you find the most popular post flavor within the array—the flavor that appears more frequently than any other. It iterates through the array, canceling out pairs of different flavors, and the majority flavor eventually remains as the most popular one.
BASICS:
Huffman Coding Compression Algorithm: Imagine you have a collection of love letters, and you want to send them to your sweetheart with reduced file size to save storage or transmission space. This algorithm helps you compress the letters by assigning shorter codes to the most frequently used letters or words, and longer codes to the less frequent ones. This way, you can represent the love letters using fewer bits, making them more efficient to store or send.
Euclid's Algorithm: Picture a scenario where you have a huge archive of posts that you want to distribute equally among your blogs. This algorithm helps you find the largest possible number of posts you can distribute, ensuring each blog gets an equal number without any posts left over. You keep dividing the posts into smaller groups until you can no longer divide them evenly, ensuring a fair distribution.
0 notes
varunrajkalse · 2 years ago
Text
6 Algorithms Every Developer Should Know
6 Algorithms Every Developer Should Know As a developer, it is essential to understand algorithms to create efficient and scalable software applications. Algorithms are sets of instructions that perform a specific task, such as sorting data or searching for information. By learning about these six essential algorithms, you can improve your coding skills and create better applications. By…
Tumblr media
View On WordPress
1 note · View note
liquidstar · 6 months ago
Text
Tumblr media
screenshot of despair...
17 notes · View notes
chaotic-fandom-hoarder · 4 months ago
Text
Tumblr media
Thinking about this AIDAN themed wallpaper I edited up about a month ago, maybe you guys would think it’s cool too?
9 notes · View notes
x-v4mp3y3lin3r-x · 1 year ago
Text
if you're deconstructing your ideas of binary gender and binary sex— you also have to deconstruct your ideas of binary sexuality and romantic attraction, too, fyi
#'are you saying homosexuals don't really exist??!?!!?!' no. please use your brain.#im saying it literally doesn't matter if a lesbian dates someone who YOU perceive as a man.#because the people in that relationship know more than you.#and human experience does not exist in a binary.#you have to accept that sometimes other people will experience life differently than you do#this also goes for gays and bis and pans and aces and aros.#the only people who get to define their experiences are them.#so no I don't really care if a gay man says his true love is a woman and he means it.#i still consider him gay. because he knows himself and his partner better than i know how to perceive them both#and how someone else identifies is none of my business.#that woman may be only part woman. or only perceived as a woman. or only sometimes a woman. or always both woman and man.#there's so many ways to be human. you have to learn to take other queers at face value and not question them#when you question if someone is 'REALLY gay' or 'REALLY trans' or 'REALLY bi'; you're thinking with the mindset of an oppressor#you do not need to gatekeep queerness. queerness is not a limited resource. queer people are not your enemies.#learn to empathize and embrace experiences unlike yours. be a better ally to the people in your own community instead of immediately -#- searching for ways to cast them out. be better. stop thinking like our oppressors. queer people do not need to rationalize ourselves for -#- anyone. they don't owe you an explanation. you cannot take their 'gay card' away.
70 notes · View notes
knightobreath · 1 year ago
Text
fun osc fact: thw creator of the queerphobic osc comics ("pronouns? genderfluid?" leafy, "i'm not a non-binary freak" paintbrush, etc etc) is no longer queerphobic
28 notes · View notes
skulls-soul · 5 months ago
Text
In celebration of pride month I've been doing some questioning
And I feel like the best way to figure something out is asking people who are either questioning the same thing or have already found an answer to it
This is all about being demi-romantic
So to anyone and everyone who's experience this ponderment what was the outcome / turning point for you?
(who knew after 7? Maybe 8 years of identifying as non-binary and pansexual that there could be potentially more? Being queer is one hell of a roller coaster
P.s Thank you to anyone and everyone who interacts with this post)
12 notes · View notes
datapacks · 5 months ago
Text
Figured out what I want 2 do for Projectile Protection, so now it's just recipes, polish, playtest.
7 notes · View notes