CommonLounge is a community of learners who learn together. Get started with the featured resources above, ask questions and discuss related stuff with everyone.
Segment Treesby Wiki
Motivation: Given an array of N numbers, you need to support two operations. Operation 1: find-min(i, j) = return the minimum value in array[i ... j]. Operation 2: update(i, v) = update the value at array[i] to v. Solve the problem for N <= 10^6, number of operations <= 10^6.
To solve the above problem, both the operations need to run in O(log N) time, but using an naive array gives O(N) run-time for operation 1 (and O(1) run-time for operation 2). So how do you solve the problem? Read on. :)
Video tutorial: This is a superb tutorial, giving the motivation, walking through example, and going step-by-step through the pseudocode.
Read more…(295 words)
[VOTERS] Voters Listby Keshav Dhandhania
Binary search: Video tutorial, Python code and extensionsby Wiki
In its simplest form, binary search is a method for quickly finding a specific target value in a sorted array. It begins by comparing the target value to the middle element of the array. Because the array is sorted, the comparison allows us to determine one-half of the array in which the target cannot lie. The search continues on the remaining half. By doing this repeatedly, we will eventually be left with a search space consisting of a single element, the target value.
Read more…(803 words)
Summer Programming Workshop 2018by Onkar Koli
HI friends!!.. Codechef is arranging the coding workshop for beginners and also for those who make grasp on DSA..if anyone planning to join please reply!!! I mentioned link below:-!O:-)👇
Read more…(29 words)
Indian Computing Olympiad Syllabusby Keshav Dhandhania
Note: There is no official syllabus for ZCO vs INOI vs IOITC. Syllabus for ZCO, INOI has been determined by looking at all the concepts covered in all ZCO, INOI problems since last 5 years. All the topics covered by ZCO, INOI are also in the Basic topics section of ICO online study material. Syllabus for IOITC is same as syllabus for IOI, since the training camp is training you for IOI. There is a higher focus on the topics mentioned in the Advanced topics specifically covered in ICO online study material. :)
The below tutorials are the best tutorials on the internet for each topic. If you find better tutorials for a particular topic, please share them with everyone.