Kaleem_Raza_Syed's blog

By Kaleem_Raza_Syed, history, 3 days ago, In English

Hello! Codeforces , This is an new algorithm of sorting by combining two idea's(Merge sort and square root decomposition).

Idea : Lets say n is the size of the array. Lets define some integer m, and divide our array chunks of size m. We know the number of chunks will be n/m . So lets sort all these small chunks and than using the idea of merge sort merge all of the sorted n/m chunks.

Now here is a point while merging our solutions we don't have to merge them all at once. Why is that? A simple analysis is that for every position I am spending O(n/m) time so total O(n^2 / m). But can we some how do this better to have low comparisons. And the Answer is YES.

But How? Just take the first two of the chunks and merge them. Then take the next two and so on ... . Then with these merged chunks repeat the operation until we have only one chunk which of size n. Now how does this improves. Now every time my number of chunks are dividing by 2 and the size of each one of the chunks is getting bigger by a factor of 2.

Now lets see how many time the size of the chunk that contains the number i increase. So as our growth is exponential this gives us the time of (lg (n/m)). So the total for n elements it's time of O(n lg(n/m)). Now this is Huge better.

Now we wanted to see what is the total runtime.

The Recursive formula for this is

T(n)

Now what is the value of m can we give to this. Lets use the idea of square root decomposition ans say m = √n.

What will be the runtime : O(n lg n)

How this is solve see this.

Hope you like this algorithm.

We can also choose m = n/2 , but than this is merge sort(But world wanted something different).

Also the credit of computing the runtime goes to secretno_botaem.

Full text and comments »

 
 
 
 
  • Vote: I like it
  • +17
  • Vote: I do not like it

By Kaleem_Raza_Syed, history, 3 days ago, In English

Hello! Codeforces. Today I had created a recursion relation but I am unable to solve this to find the time complexity of the algorithm.

Recursion Relation

Please help me to solve this.

Full text and comments »

 
 
 
 
  • Vote: I like it
  • +3
  • Vote: I do not like it

By Kaleem_Raza_Syed, history, 4 weeks ago, In English

Hello Codeforces, its time to get some motivation. In the Hello 2023 contest many top coders like tourist and Benq have the same logic for the problem B as others at first. It means they approach the problem in a same way as we. Now the point is if their approach and our approach are being getting same than it means our rating are also going to be near to them. So be happy in the NEW YEAR 2023 and became Legendary Grandmaster.

YEAHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH!

Full text and comments »

 
 
 
 
  • Vote: I like it
  • +16
  • Vote: I do not like it

By Kaleem_Raza_Syed, history, 2 months ago, In English

Hello Codeforces, Its human nature that, for having a higher rank in their field, they cheat because of their greediness. We actually miss judge our purpose to join the Codeforces. Many students, and programmers join the Codeforces in order to make themselves better in their programming and problem solving skills. But as for the nature of our minds, we says how many peoples I left behind in ratings and standings. Let me explain it by an example:

"Let you have a Computer exam in which you got 45 out of 50 which first makes you happy but what if I tell you all the others students gets 50. You will be upset. On the other hand, if you got 25 out of 50 , In actual you will be sad but what if all the students get less than twenty marks, You will be extremely happy. But in actual you have a negative delta in you performance which is not good."

Why I am talking about it : I had read many blogs related to the cheating and leaks of solutions, on the Youtube and some other website. But I have the question that, What did you get from it? Higher rating, but in actual you are cheating not from others but from yourself. Your cheating is just making you temporarily happy but when you went to the practical life and someone ask you to code something what will you do then? Think about it. You will be unable to do it.

Then tell me what you get from higher rating.

The thing which matters is, " Did you improve? ".

Full text and comments »

 
 
 
 
  • Vote: I like it
  • +6
  • Vote: I do not like it

By Kaleem_Raza_Syed, history, 4 months ago, In English

Hello Codeforces!

Yesterday, I was thinking about that why the codeforces doesn't allow us to see that who makes us a friend. I was really curious about to see the people's who made me as their friend. I request to the MikeMirzayanov to have such an update in the codeforces.(Thanks in advance if it happens.)

Also gives your suggestions about it.

Full text and comments »

 
 
 
 
  • Vote: I like it
  • +27
  • Vote: I do not like it

By Kaleem_Raza_Syed, history, 4 months ago, In English

Hello Codeforces programmers, this blog is specially for the Div.4 participants.This blog contains all the past Div.4 contests. Hope this will be help for you to get ++ rating in the coming Codeforces Div.4 contests.

Codeforces Div.4 round 1 : https://codeforces.com/contest/1352

Codeforces Div.4 round 2 : https://codeforces.com/contest/1669

Codeforces Div.4 round 3 : https://codeforces.com/contest/1676

Codeforces Div.4 round 4 : https://codeforces.com/contest/1692

Codeforces Div.4 round 5 : https://codeforces.com/contest/1703

Codeforces Div.4 round 6 : https://codeforces.com/contest/1722

Codeforces Div.4 round 7 : https://codeforces.com/contest/1742

Codeforces Div.4 round 8 : https://codeforces.com/contest/1760

Hope this will gonna help you for the coming Codeforces round.

Full text and comments »

 
 
 
 
  • Vote: I like it
  • 0
  • Vote: I do not like it

By Kaleem_Raza_Syed, history, 4 months ago, In English

Hello Codeforces coders, this will contains the links of all past Codeforces Global round. Hope that it will be help for every one in search of the global rounds.I will also try to add more links to it as more rounds are done.

Codeforces global round 1 : https://codeforces.com/contest/1110

Codeforces global round 2 : https://codeforces.com/contest/1119

Codeforces global round 3 : https://codeforces.com/contest/1148

Codeforces global round 4 : https://codeforces.com/contest/1178

Codeforces global round 5 : https://codeforces.com/contest/1237

Codeforces global round 6 : https://codeforces.com/contest/1266

Codeforces global round 7 : https://codeforces.com/contest/1326

Codeforces global round 8 : https://codeforces.com/contest/1368

Codeforces global round 9 : https://codeforces.com/contest/1375

Codeforces global round 10 : https://codeforces.com/contest/1392

Codeforces global round 11 : https://codeforces.com/contest/1427

Codeforces global round 12 : https://codeforces.com/contest/1450

Codeforces global round 13 : https://codeforces.com/contest/1491

Codeforces global round 14 : https://codeforces.com/contest/1515

Codeforces global round 15 : https://codeforces.com/contest/1552

Codeforces global round 16 : https://codeforces.com/contest/1566

Codeforces global round 17 : https://codeforces.com/contest/1610

Codeforces global round 18 : https://codeforces.com/contest/1615

Codeforces global round 19 : https://codeforces.com/contest/1637

Codeforces global round 20 : https://codeforces.com/contest/1672

Codeforces global round 21 : https://codeforces.com/contest/1696

Codeforces global round 22 : https://codeforces.com/contest/1738

Codeforces global round 23 : https://codeforces.com/contest/1746

Codeforces global round 24 : https://codeforces.com/contest/1764

Full text and comments »

 
 
 
 
  • Vote: I like it
  • +12
  • Vote: I do not like it