Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7947627
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T01:29:14+00:00 2026-06-04T01:29:14+00:00

My friend and I have found this problem and we cannot figure out how

  • 0

My friend and I have found this problem and we cannot figure out how to solve it. Its not trivial and standard substitution method does not really work(or we cannot apply it correctly) This should be quicksort with pivots at rank problem.

Here is the recurrence:

T(n) = T(n^(1/2)) + T(n-n^(1/2)) + n

Any help would be much appreciated. Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T01:29:16+00:00Added an answer on June 4, 2026 at 1:29 am

    First take it easy:

    T(n) = T(n-n^(1/2)) + n, number of iteration is n^(1/2), in each iteration you’ll have n-ksqrt(n) time complexity, so total time complexity is: ∑n-ksqrt(n) for 0<=k<=sqrt(n), which is n^(3/2).

    Now solve your own problem:

    T(n) = T(n^(1/2))+T(n-n^(1/2)) + n
    

    again calculate number of steps till arriving to zero or 1: first part `T(n^(1/2)) takes O(log log n) time, and second part takes O(sqrt(n)) times to arriving to zero or 1 (See my answer to related question), So second part dominates first part, Also in each iteration time complexity of second part causes to sqrt(n) extra item, which doesn’t effect to the first part time complexity (n-sqrt(n)), so your total runtime is n*sqrt(n).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

UPDATE: I have realized the problem below is not possible to answer in its
I have this table CREATE TABLE [dbo].[friend_blocked_list]( [subdomain] [varchar](50) NOT NULL, [un] [nvarchar](50) NOT
I have found that DeploymentItem [TestClass(), DeploymentItem(@TestData\)] is not copying my test data files
hopefully someone can help me with this odd problem. I have a database which
I have this problem of my app crashing (only when press a certain UIButton)
So I have a problem. Or rather my friend has a problem, since I
this is more theoretical question. I have written simple chat with my friend. We
lets get straight to my problem, the code I have written here does not
I'm writing a web application (PHP) for my friend and have decided to use
I have a friend and he recently started to learn Cinema 4D. He asked

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.