Difference Between WHERE and HAVING

Nitin Sharma
Updated on 09-Jun-2020 08:09:22

401 Views

Both Where and Having are the two keywords used in SQL query to filter and summarize the data that is retrieved from database based on given condition.On the basis of features of both keywords we can distinguish between Where and Having as follows −Sr. No.KeyWhereHaving1DefinitionWHERE clause in SQL query specifies search conditions for the rows returned by the it and limits rows to a specific row-set. In case if user wants to get the particular records based on some specific classification or condition then using ‘where’ clause is useful.The WHERE clause is used to specify the required condition (on aggregate ... Read More

Differences Between Classical and Quantum Cryptography

Nitin Sharma
Updated on 09-Jun-2020 08:01:28

878 Views

As we know that Cryptography comprises of two processes which are namely as encryption and decryption performed at sender and receiver end respectively. Basically Cryptography is practiced or implemented for doing secure communication between sender and receiver in the public environment in such a manner that other than these two parties no one could get or understand the message that is delivered.On the basis of type of encryption and decryption of the message we can distinguish between Classical and Quantum Cryptography as follows −Sr. No.KeyClassical CryptographyQuantum Cryptography1BasisIn Classical Cryptography encryption and decryption is done on the basis of mathematical computation.On ... Read More

Difference Between HTML and ASP

Nitin Sharma
Updated on 09-Jun-2020 07:56:00

2K+ Views

Both HTML and ASP are the web development languages and are widely used in developing web server pages and applications.On the basis of nature of both of the languages we can distinguish between HTML and ASP as follows −Sr. No.KeyHTMLASP1DefinitionHTML is a client-side language which mainly use for developing user interface.HTML stands for Hypertext MarkUp Language in which "Hypertext" refers to the hyperLinks that an HTML page may contain and "MarkUp language" refers to the way tags are used to define the page layout and elements within the page.On other hand ASP is a server-side language developed by Microsoft i.e., ... Read More

Difference Between Hashtable and Dictionary in C#

Nitin Sharma
Updated on 09-Jun-2020 07:51:55

6K+ Views

Both HashTable and Dictionary are the type of data structure which are used to store data. Both of these data structures hold the stored data in key value pair.On the basis of difference between key features of these we can distinguish between HashTable and Dictionary as follows −Sr. No.KeyHashTableDictionary1DefinitionHashTable is the non-generic type of collection which is used to store data in key/value pair and is defined in System.Collections name space.On other hand Dictionary is a generic type collection defined under System.Collection.Generics name space which also store data in the form of key/value pairs.2DataTypeIn HashTable same or different data type ... Read More

Integer to English Words in Python Programming

Arnab Chakraborty
Updated on 09-Jun-2020 07:37:06

2K+ Views

Suppose we have a number. The number can be anything in between 0 to 231 – 1. We have to convert the number into words. So if the number is like 512, then the result will be Five hundred twelve.To solve this, we will follow these steps −Define some lists like less_than_20, this will hold all words from one to nineteenAnother array like tens to hold tens, twenty, thirty and so on up to ninetyAnother array for thousands, to hold thousand, million and billionDefine one function called helper(), this will take nif n is 0, then return blank stringotherwise when ... Read More

Binary Tree Postorder Traversal in Python Programming

Arnab Chakraborty
Updated on 09-Jun-2020 07:35:29

244 Views

Suppose we have a binary tree. We have to find the post order traversal of this tree using iterative approach. So if the tree is like −Then the output will be: [9, 15, 7, 10, -10]To solve this, we will follow these steps −if root is null, then return empty arraycreate an array retstack := define a stack with pair [root, 0]while stack is not empty −node := top of stack, then delete element from stack.if second value of node pair is 0, thencurrent := first value of node pairinsert a pair (current, 1) into stackif right of current is ... Read More

Distinct Subsequences in C++ Programming

Arnab Chakraborty
Updated on 09-Jun-2020 07:30:43

325 Views

Suppose we have strings S and T. We have to count number of distinct sequences of S which is equal to T.We know that a subsequence of a string is a new string which is formed from the original string by removing some (can be none) of the characters without disturbing the relative positions of the remaining characters. (Like, "ACE" is a subsequence of "ABCDE" while "AEC" is not).If the input strings are “baalllloonnn” and “balloon”, then there will be 36 different ways to select.To solve this, we will follow these steps −n := size of s, m := size ... Read More

Find Kth Smallest Sum of a Matrix with Sorted Rows in C++

Arnab Chakraborty
Updated on 09-Jun-2020 07:27:51

327 Views

Suppose we have one m * n matrix called mat, and an integer k, mat has its rows sorted in nondecreasing order. We can choose exactly one element from each row to form an array. We have to find the Kth smallest array sum among all possible arrays.So, if the input is like mat = [[1, 3, 11], [2, 4, 6]]1311246and k = 5, then the output will be 7, as when we choose one element from each row the first k smallest sums are [1, 2], [1, 4], [3, 2], [3, 4], [1, 6]. here the 5th sum is ... Read More

Number of Ways to Wear Different Hats to Each Other in C++

Arnab Chakraborty
Updated on 09-Jun-2020 07:24:09

206 Views

Suppose there are n people and 40 different types of hats those are labeled from 1 to 40. Now a 2D list is given called hats, where hats[i] is a list of all hats preferred by the i-th person. We have to find the number of ways that the n people wear different hats to each other. The answer may come very large, so return the answer modulo 10^9 + 7.So, if the input is like [[4, 6, 2], [4, 6]], then the output will be 4, as there are 4 different ways to choose, these are [4, 6], [6, ... Read More

Constrained Subsequence Sum in C++

Arnab Chakraborty
Updated on 09-Jun-2020 07:22:55

178 Views

Suppose we have an array called nums and an integer k, we have to find the maximum sum of a non-empty subsequence of that array such that for every two consecutive numbers in the subsequence, nums[i] and nums[j], where i < j, the condition j - i k and first element of dq is same as dp[i - k - 1], thendelete front element from dqdp[i] := maximum of dp[i] and (if dq is empty, then dp[i] + 0, otherwise first element of dp + dq[i])while (not dq is empty and last element of dq < dp[i]), do −delete ... Read More

Advertisements