#Heap Sort
Explore tagged Tumblr posts
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.
#searching#sorting#graphs#arrays#basics#Linear Search#Binary Search#Breadth First Search#Depth First Search#Insertion Sort#Heap Sort#Selection Sort#Merge Sort#Quick Sort#Counting Sort#Kruskals Algo#Dijkstras Algo#Bellman Ford Algo#Floyd Warshall Algo#Topological Sort Algo#Flood Fill Algo#Lee Algo#Kadanes Algo#Floyds Cycle Detection Algo#KMP Algo#Quick Select Algo#Boyer - More Majority Vote Algo#Huffman Coding Compression Algo#Euclids Algo#Union Find Algo
0 notes
Text
#The Completely Made-Up Adventures of Dick Turpin#Noel Fielding#Dick Turpin#Mark Heap#John Turpin#A Legend Is Born (Sort Of)#I have made this entire village out of courgettes#gif
233 notes
·
View notes
Text
the next sheltie/collie breeder i see make grand claims about their dogs' eye health despite only having done DNA and not actual ophtho, I'm going to hit with a shovel
#this has got to be some sort of virus going around#this. my friends. is why breed- and kennel clubs are/were slow to recommend dna testing for disease#because it looks fancy and thorough and ppl think it makes clinical health tests obsolete when they#very much extremely does not#most DNA kits will check for CRD (component of CEA) and one or two relevant mutations connected to PRA#notably the usually-early-onset kind#but we know there are PRA versions that test clear for that mutation#and there's a whole heap of eye disorders that either should rule out a dog by default or should be avoided in combination#that you will only find by going to an opthalmologist#they loosened the requirements for the sheltie club stud list as well recently. stoppp itttt#i swear i see so much of this all over the place now and its driving me fucking insane.#clinically insane.
35 notes
·
View notes
Text
Trying something completely new today. Just a speed sketch.
#I do not know the character I don’t Go Here disclaimer#I fell into the TikTok trap recently and my fyp suddenly has heaps of these dudes#so figured if they’re popular might be good to Try learn how to draw this sort of thing#keegan p russ#cod Keegan#just a Scribbly sketch#seriously tho if anyone can explain the gear to me that’d b amazing#I know Nothing abt military stuff#I’m gonna try painting one of the lads properly eventually
22 notes
·
View notes
Text
@staff
I retain ownership and rights over my content.
"We never want to do anything with your work that surprises you" Selling it to Midjouney without warning surprises me.
But not AI, which you profit from and we don't, which is different than allowing Search Engine APIs to see and display the art.
And you are getting paid to use my art and content, which should mean I get proper reimbursement for my creations, which are as you say "entirely mine".
#batty babbles#i am not a lawyer#so take this with heap of salt#but they spring this AI shit on us when their ToS never hinted at this sort of use or gave us warning#And info has already come out that they provided test packets of posts from as far back as 2012 without permission to midjourney.#i want there to be a class action against midjourney and other ai platforms already to make this shit illegal.#anti ai#fuck ai#current events#artists on tumblr
28 notes
·
View notes
Text
A traveller is in a market. The town is small, the market smaller, and the variety of produce smaller still. Unfortunately, this is where she's chosen to stay until the winter storms don't pose as much of a risk, so she'll just have to deal with it.
"Marcia!" she hears from across the market. A child's voice, calling for a friend, maybe? It's loud, but it's nothing to do with her, so she-
"Marcia!" she hears again, closer, and it's accompanied by a small body slamming into her side. ----- The Castle is forgotten. Septimus is the only person in the whole world who remembers it exists, and anything at all about it.
#sep talks#septimus heap#marcia overstrand#my writing#I honestly have no idea if it's good it's. It's very specifically catered to Me and my tragic lack of hugs#and also its kind of sort of a [REDACTED] au#HOWEVER. I like it <3 and I think it's fun
23 notes
·
View notes
Text
ID: a redraw of a screenshot from the dungeon meshi anime, drawn as marcia and cerys instead of marcille and falin. They are in a bath house, shown from the chest up and neither of them are wearing anything (but anything nsfw is covered by camera angles). Cerys has her back turned to the viewer, leaning over Marcia, who looks at her, startled and blushing. They are holding hands. Marcia has several scars on her fingers and one on her face, and her hair is in braids. They are both dripping water. /end ID
GAY PEOPLE!!!!
Yes I did trace this what of it. Its for fun I'm not making money off this or anything abdudbdj. And I didn't want to draw All That from scratch <3. The hair is mostly mine for cerys and entirely mine for marcia (I used some of @lesbianmarciaoverstrand's apprentice marcia art as refs <3)
ID: the same image but marcias hair is a very dark purple. /end ID
#art#septimus heap#marcia overstrand#cerys banda#???#my art#<-only sort of. Bc well. The tracing#I would've done marcias hair how I normally do it but a) I wanted to try this for a while and b) I think marcilles hair being super long#is important. Bc it looks so cool in the one panel from the manga I want to Properly redraw as marcia#so I want marcia to have long hair that can mimic the shape of marcilles#ANYWAY!! this was an experiment but I think it's fun. So
27 notes
·
View notes
Text
Sometimes I have some really cool and fucked up sort of Bloodborne+ dreams and last night involved an optional boss fight that drastically changed how you perceived the enemies if you did it
Killing this optional boss would alter your perception so that the beasts were now just regular people still capable of speech and thought, but because it was only your perception that was changed it was impossible to actually tell whether or not you were actually killing beasts or people and you were essentially locked into a permanent state of blood-drunk frenzy
#herne talks#having my hunters there too was so cool i love it when they show up#darnell encouraging silence to face the optional boss instead of sneaking around#roland desperately trying to persuade against it at all costs#it very much gave si a psychological break after the realisation of what she was doing sunk in#also these dreams really make yharnam as a city MASSIVE like fully fledged life sized scale buildings and rooms etc#one previous dream involved a sort of dreg heap like area which the moon presence had retreated to in order to slumber and grow#it grew to massive size more like a set piece enemy and it was super important to avoid its gaze#fromsoft let me design a more fucked up bloodborne sequel i can do it
11 notes
·
View notes
Text
i just open photoshop and do anything atp..
#enhypenet#malegroupsnet#kpopco#enhypen#orange blood#heetual#the desire to create is way more important than the outcome !!! i don't like the first poster but im happy that i mDE it bc it means i#created smth.. and then bc i already didn't like it i got to do something out of my comfort zone for the second one.. idk im thinking about#this sort of thing a lot recently.. esp because my desire for creation is so inconsistent that i shuould celebrate times like now when i wa#to create things even though i don't have any ideas or inspiration because i end up with random things like this that i sort of like in a#slightly offputting mildly jarring way.. anyway thanks for everything as always i appreciate it heaps !!!#z.gfx#z.enhypen#z.ot7
36 notes
·
View notes
Text
Realised i have the power to dress up as anything I want and nobody can stop me 💙
#probably gonna post a bunch more of these lmao but I gotta sort through the whole heap of them first#anyway here’s my new oc Estrella
31 notes
·
View notes
Text
To the people who study or research humanities: how do you get your information? Better yet, where do you find it? Is it through books? If so, how do you know which books to read? Is there like a big database of it somewhere? Or is it more trial and error until you find the source you needed?
#humanities#history major#I have no idea how to tag this#but yeah - biosciences have their heaps of hard to read text#text that I know how to find and filter and sort through#I don't know how I'd even start with things like history#this isn't exclusive to history though - any subject in humanities works
12 notes
·
View notes
Text
with my mental health tanking as hard as it is I’ll probably only be writing low energy stuff for a while.
#I cannot say precisely what that will be bc#sometimes a friendo sends smth unprompted and my brain goes that on !!!#but sitting at my pc and writing feels like pulling teeth rn#and I’m not sure if I just need to recharge spend a week or so gaming and reading or just ?!#wait it out#but I’m also organising to go home for a visit which is going to be another#whole thing bc they will dead name me and it’s just gonna be#suck#I love them but they ??? are the way that they are#anyway if my replies have been slow or inconsistent#this is sort of why#I’m in a bit of a heap rn#negative /#ooc.
6 notes
·
View notes
Text
Ah, for the people who have blocked me bc I am simply (and reasonably) asking for proof of the validity of wildly circulated misinformation based on nothing but hearsay that is actively damaging hurricane relief efforts, and stirring even greater division among our fellow citizens:
I sincerely hope you have done so for reasons of not discoursing on the internet with a stranger in a way that for you is detrimental to your mental health, and not bc you refuse to acknowledge and discuss the possibility that you might be wrong.
One thing is very healthy, the other is very dangerous and sad.
#if you want a conspiracy about all this go read what#historian and political journalist heather cox richardson has been writing lately#biden didnt take from fema to give to immigration funds but trump did with ssp#he was also praised by republicans for his quick response to the disaster (and i can attest personally to#previous presidents' less than stellar or quick response to at least one disaster i lived through#we didnt call it a conspiracy then we called it bureaucratic red tape)#anyways a certain historic authoritarian was also fond of flooding the public with such huge amounts of misinformation#that people became too exhausted trying to sort through the lies to find the truth and **gave up** bc they couldn't stop the mass amounts of#lies from winning#you can also see locals and pastors pleading with people to stop spreading misinformation as trying to respond to it#is exhausting their energy when they are working 12hr days trying to help people and cannot afford to fight infowars#if you want a conspiracy it's definitely there#but it's one against democracy and against truth#and i can understand why people got exhausted trying to fight against this crap even before the age of information#anyways i got blocked what if i get hatey anons next simply bc i said 'do you know the specifics of these claims?'#and my lil blog doesnt reach far these days (thank heaven)#but i still have not had a single person supply actual evidence#just more of the same baseless claims made by media influencers who have something to gain#and they sprinkle in just enough truth (my family member's house flooded and neighbors helped them)#that the big lie (therefore the government is doing nothing and hates citizens) gets embraced wholeheartedly#literally the facts are there for anyone to look at#(or the lack of evidence of wrongdoing in this case)#like i don't love our government but whatever happened to innocent until proven guiltym#why find out that your opponent may not have done you dirty for once#when instead you can presuppose their guilt and lynchmob any dissenters for free#i love humans as individuals#i am terrified of humans in large groups who get angry bc someone told them something that fit their suspicions#(suspicions which have also been fed for years by massive heaping webs of lies#and often by foreign parties who would love to see american democracy crash and burn)#i wish i knew who to aim this rant at
2 notes
·
View notes
Note
WAIT can we see photos of ur pets named Jenna and Simon????? 👀❤️
Absolutely!!!
Simon's from a litter of 7 puppies, and Jenna was the only girl in her litter, which is the reasoning for their names. Simon's 2 and Jenna's almost 1. My two other cats are Ivy, who's 3, and Jack (Jenna's brother)
Here's the progression of Simon and Jenna's relationship! He wasn't sure how to react to her at first, but he's used to her affection now
Some bonus pictures because I have so many photos of my pets :)
19 notes
·
View notes
Text
Heaptober Day 1 : Forest
acrylic on paper
[id: a painting of a forest next to a river at sunset. the trees are illuminated by the setting sun. five pair of yellow eyes stare out from the shadows of the trees. the forest, the eyes and the sky are reflected in the water. below the painting is a handwritten note that reads day 1 : forest /end id]
#heaptober#septimus heap#this is sort of. only vaguely related but whagever#heaptober 2023#also this is my first time writing an id so tips are welcome#micart
12 notes
·
View notes
Text
You know what'd be fun?
A heap of whumpblrs playing pictionary/scribble.io/etc. but all the words are whump related.
#whump#whump prompts#sort of??#i can imagine a heap of whumpers playing pictionary together#whump stuff#whump thoughts#whumpblr#whumblr#whumper#whump community
40 notes
·
View notes