Time complexity of a hybrid merge and selection sort algorithm

I’m trying to analyse the time and space complexity of the following algorithm, which is essentially a hybrid of a merge and selection sort. The algorithm is defined as follows:

def hybrid_merge_selection(L, k = 0):     N = len(L)     if N == 1:         return L     elif N <= k:         return selection_sort(L)     else:         left_sublist = hybrid_merge_selection(L[:N // 2])         right_sublist = hybrid_merge_selection(L[N // 2:])         return merge(left_sublist, right_sublist)  

My thinking is that the worst case scenario occurs when $ k$ is extremely large, which means that the insertion sort algorithm is always applied resulting in a time complexity of $ O(n^{2})$ , where $ n$ is the length of the list and the best case scenario occurs when $ N$ when $ k == 0$ , so the merge sort algorithm is only applied resulting in a time complexity of $ O(n\log_{2}n)$ . However, could somebody give me a more detailed and mathematical explanation of the time complexity, for all scenarios, namely worst, best, average.

Selection Sort vs Merge Sort

I recently wrote a written test for the recruitment of Scientists/Engineers in ISRO(Indian Space Research Organization) few days back and the following question appeared in the test.
Of the following algorithms, which has execution time that is least dependent on initial ordering of the input?

  1. Insertion Sort
  2. Quick Sort
  3. Merge Sort
  4. Selection Sort

Well if array is sorted, when we are doing 2 way merge always the left subarray will get exhausted and we have to simply fill in the right sub array. So, number of comparisons will be equal to length of left subarray everytime. In selection sort, if array is already sorted, number of comparisons will be the same as that of the worst case, however the index of minimum element will change only after 1 full pass.

In worst case, number of comparisons in 2 way merge will be (length of left subarray+length of right subarray-1). In selection sort, worst case minimum element’s index will keep on changing after every comparison.

Only 1 option can be correct. So, what’s the best answer?

Does input type=”file” selection support url ( upload from web ) ? -html

I wonder can I use the option of input type=”file” in html to upload from url ( web/ftp etc. ) ? Is there option to it? To more explain, I want to select zip file with url and uoload it to website.Which operating systems support it? How can do it on linux,mac and windows 10? I talking about the option on the link:

<input type="file">: How to Use This HTML Value

Genetic algorithm pressure using only selection

Suppose you have a population of N individuals with fitness 1, 2, . . . , N (i.e., all individuals have a unique fitness value). Suppose you repeatedly apply tournament selection without replacement with tournament size s = 2 to this population, without doing crossover, mutation, and replacement. In other words, you run a genetic algorithm with selection alone.

After a certain number of generations you will end up with a population consisting of N copies of the same individual. Can you give an estimate of the number of generations needed to achieve that?

Intuition behind min cut in a flow network? Whether it’s baseball elimination or project selection

I was wondering if someone can give me a general definition of a min-cut besides it being the max flow of a network.

For example, in the baseball elimination problem, if we wanted to find out if team z is eliminated, the min cut represents the team(s) that will beat team z out of the 1st place if the edges aren’t full saturated. If the edges are fully saturated, then min-cut is everything except t, and team z still has a chance.

For the project selection, the min cut contains the projects you should do to maximize your return.

How do people figure out that min-cut can be applied to these problems? What is it about min-cut that gives it such power?

Thank you!

Wide Selection Of Nine West Fashion Deals

nine west outlet arrived on the streets of Manhattan in 1978. The first to take shoe designer from the fashion runways to the masses, setting a new fashion standard for women’s shoes and creating a demand for accessible style. One of the world’s most recognized brands, Nine West defines timeless feminine style, translating key trends into, wearable and attainable collections of footwear, apparel and accessories.Nine West bags are not considered high-end but the company is well-known for high-quality shoes and handbags.This Nine West Bag is made of PVC and has a removable shoulder strap which helps in transforming side bag to sling bag. The inside is completely fixed with 1 zip take, 2 slip pockets, and a middle divider zip stash.
To evaluate a woman’s character, look no more distant than the tote she conveys to work. In the realm of extravagance satchels, colorful purses are one of the most noteworthy quality materials in the market. In addition to the fact that nine west bags usa are smooth and flawlessly outlined, yet it is additionally solid, going on for a long time to come.There are more assortments of Nine West Handbags available than any other time in recent memory.A fun and snazzy adornment, the Nine West You bag can be taken anyplace! It has a Fabric fixing with focus zip compartment, zip pocket and two slip pockets. This Nine West Black Bag additionally have Removable shoulder strap acclimates to 21″ of length.
This nine west crossbody bag brown from inside is completely fixed with 1 fundamental compartment and 2 slip pockets. The outside components 2 front zip pockets. It can be even utilized as a side sack furthermore as a sling pack.Nine west;s have the biggest determination of item for women, offering stretched out and elusive sizes, making shopping easy. Whether you’re searching for an exceptional event pump or new purse for the season, Nine West Bags has something for everybody.
nine west tote bags for sale has a triple section, one zipper compartment, and 2 snap compartments. The twofold handle is of 9 inches. Inside of this Nine West Blue Bag is completely fixed with one zipper pocket and 2 media pockets. The red shading is evergreen love of each lady, so this is best for re partners.As quality is a trademark of real Nine West handbags, the stitches will be perfect.
Take home sophisticated fashion when you shop nine west bags on sale. Find Nine West handbags and be ready with stylish accessories for any occasion. Explore classic Nine West crossbody purses, perfect for taking you from the boardroom to date night with all your important stuff in tow. Or, be ready for weddings, big meetings.Nine West apparel offers refined looks for work and play, keeping you ahead of trends whether you’re making a pitch or the after-school pick-up run.Nine West accessories are made to take you where you need to go.

Weighted Activity Selection Problem with allowing shifting starting time

I have some activities with weights, and I would like to select non overlapping activities by maximizing the total weight. This is known problem and solution exists.

In my case, I am allowed to shift the start time of activities in some extend while duration remains same. This will give me some flexibility and I might increase my utilization.

Example scenario is something like the following:

(start, end, profit) a1: 10 12 120 a2: 10 13 100 a3: 14 18 150 a4: 14 20 100 

Without shifting flexibility, I would choose (a1, a3) and thats it. On the other hand I might shift the intervals by 5 units (In real case even 1000x greater than original task duration) to the left/right. In that case I might come up this schedule and all tasks can be selected.

a1: 8 10 120 (shifted -2 to left) a2: 10 13 100 a3: 14 18 150 a4: 18 23 100 (shifted +4 to right) 

Are there any feasible solution to this problem?