Programming assignments for the course Fine Techniques using C language.
Code developed, debugged and tested on UBUNTU 18.04
make
./a.out
Find out all the solutions to A-B-C jug problem.
You are given 3 jugs of capacities A litres, B litres, and C litres.
The initial state/initial volumes of water in the jugs is X, Y, and Z.
Your goal is to get to a final state of P, Q, R litres.
There are no markings on the jugs (you can’t just measure off litres directly).
You may pour from a jug to any other jug (you have to transfer from one jug to another until either one jug becomes empty or the other full) . You cannot waste water. The total amount of water in the entire system must be the same as initial.
Implement a binary search tree on a harddisk.
Your tree should support the following operations (mentioned in the header file)
insert
delete based on the key
traversal - inorder : space separated values followed by \n
traversal - pre-order : space separated values followed by \n
Fix the flaw in malloc, by implementing your own malloc with best-fit allocation policy.
Implement Stepanov's Binary counter to find the second biggest in an array of integers.
The number of elements may be an exact power of 2 or may not be.
The algorithm should have at most n + logn - 2 comparisons.(However when n is odd the number of comparisons can be little more)
It may use extra space proportional to (logn) ^ 2.