Everyone might be aware on – How big the computer was, when it was introduced in early 1960s. People always say that, it was a room-sized machine which produced enormous amount of heat. Portability wasn’t possible with that room-sized machine, and of course it was introduced in the era where we didn’t have proper transportation.And now, we find a lot of changes with the size of the computing devices. Computing devices had reduced from the room to palm. Portability of computing machine has become easier than the transportation of human beings. Continuous research on the nanotechnology and semi-conductors are the ... Read More
Are you working as a system admin, then you should know these tools to manage disk space. This article explains about how to check Linux Disk Partitions and Usage in Linux.FdiskFdisk is a text based utility. By utilizing fdisk, you can create a brand new partition, delete the present partition, or exchange existing partition.To get the more information about fdisk, use the following command –$ fdiskThe sample out should be like this –Usage: fdisk [options] change partition table fdisk [options] -l [] list partition table(s) Display or manipulate a disk partition table. Options: -b, --sector-size ... Read More
Problem statementGiven N number of students and an array which represent the mark obtained by students. School has dicided to give them teddy as a price. Hoever, school wants to save money, so they to minimize the total number of teddies to be distrubuted by imposing following constrain −All students must get atleast one teddyIf two students are sitting next to each other then student with the higher marks must get moreIf two students have same marks then they are allowed to get different number of teddiesExampleLet us suppose there are 3 students and marks obtained are represented in array ... Read More
Mini-PCs have been around for more than two years in India, but still, they are not very much accepted in any part of the country. Although there are a lot more numbers in laptops, but this simply does not make the mini-PC’s powerful. One has to understand, how to use it in the right way, especially people who want a PC but are planning for a low budget one should definitely go for it.The best part is that, those little stick PCs are also called Mini-PCs, I am sure all the gamers might be acquainted with this. For example, if ... Read More
Problem statementGiven an array of n elements. The task is to create n/2 pairs in such a way that sum of squares of n/2 pairs is minimal.ExampleIf given array is −arr[] = {5, 10, 7, 4} then minimum sum of squares is 340 if we create pairs as (4, 10) and ( 5, 7)Algorithm1. Sort the array 2. Take two variables which point to start and end index of an array 3. Calulate sum as follows: sum = arr[start] + arr[end]; sum = sum * sum; 4. Repeate this procedure till start < end and increment minSum as ... Read More
Problem statementER diagram is pictorial representation of shows various tables and relations amongst them. ER diagram we can reduce the number of database.One to one cardinalityLet us consider below diagram with one to one cardinality −Above ER diagram represents 3 entities −Employee entity has 2 attributes namely emp_name. emp_id is the primary keyCompany entity has 2 attributes namely cmp_name. cmp_id is the primary keyPrimary key of Work entity can be emp_id or cmp_idWe cannot combine 3 tables into single one can either merge Work into Employee or Company. minimum 2 tables are required in one to one cardinality scenario.One to ... Read More
DescriptionAplha-Beta pruning is a optimization technique used in minimax algorithm. The idea benind this algorithm is cut off the branches of game tree which need not to be evaluated as better move exists already.This algorithm introduces two new fields −Alpha − This is best value(maximum) that maximizer player can guaratee at current level or its above levelBeta − This is the best value(minimum) that minimizer player can guaratee at the current level or its above level.ExampleIf game tree is −arr [] = {13, 8, 24, -5, 23, 15, -14, -20}then optimal value will be 13 if maximizer plays firstAlgorithm1. Start ... Read More
We have a set of elements. And a product K. The task is to check whether there exist two numbers in the linked list, whose product is same as K. If there are two numbers, then print them, if there are more than two numbers, then print any of them. Suppose the linked list is like this {2, 4, 8, 12, 15}, and k value is 16. then it will return (2, 8)We will solve this using the hashing technique. Take one hash table, and mark all elements as 0. Now iteratively mark all elements as 1 in hash table, ... Read More
It has been 10 years since the cloud computing revolution has begun in the information and technology sector. It has completely transformed the dimension of the sector, in terms of quality of service delivery and cost of service delivery. During the initial phase of the cloud revolution, it had faced security issues and performance issues. Continuous research on these issues had made the cloud to overcome and brought trust among the clients on the service providers. We are now in the second phase of cloud revolution. As many have started migrating towards the cloud, the demand for providing quality service ... Read More
We have one matrix of order N x M. And a product K. The task is to check whether a pair with the given product is present in the matrix or not.Suppose a matrix is like below −12345678910111213141516Now if the K is 42, then there is a pair like (6, 7)To solve this problem, we will use hashing. We will create hash table by taking all elements of the matrix. We will start traversing the matrix, while traversing, check whether the current element of the matrix is divisible by the given product, and when the product K is divided by ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP