Blogs Hub

by AskGif | Jan 03, 2019 | Category :coding

What is a Heap?

What is a Heap?

A heap is a tree with some special properties. The basic requirement of a heap is that the value of a node must be > (or <) than the values of its children. This is called heap property. A heap also has the additional property that all leaves should be at h or h – 1 le

read more...

by AskGif | Jan 03, 2019 | Category :coding

What is a Priority Queue?

What is a Priority Queue?

In computer science, a priority queue is an abstract data type which is like a regular queue or stack data structure, but where additionally each element has a "priority" associated with it. In a priority queue, an element with high priority is served before an element with low priority. In some

read more...

by AskGif | Oct 26, 2018 | Category :coding

Xamarin.forms shared project gives error while creation

Xamarin.forms shared project gives error while creation

Whenever I try to create a new xamarin.forms project it is giving error. The Error Details is as below, Xamarin.Forms.1.3.1.6296: Could not install package 'Xamarin.Forms 1.3.1.6296'. You are trying to install this package into a project that targets 'Xamarin.iOS,Version=v1.0', but the pa

read more...

by AskGif | Oct 25, 2018 | Category :coding

How can I get the total size of a particular folder in C#?

How can I get the total size of a particular folder in C#?

When I'm creating one application where I'm giving certain memory space to users and I want to calculate the total space he used in his folder and to show him/her the total space utilized and total remaining space that can be utilized. How can I calculate the size of the entire folder including a

read more...

by AskGif | Oct 25, 2018 | Category :coding

How to Convert given bytes in KB, MB, GB etc?

मैं केबी, एमबी, जीबी आदि में उपलब्ध बाइट्स में उपलब्ध बाइट्स कैसे परिवर्तित कर सकता हूं?

How to calculate total bytes available in particular folder and I want to convert the total bytes available to total bytes available in KB, MB, GB etc? if you are calculating total bytes then you can use the following function to find out the respective total bytes in KB, MB, GB, TB etc.<

read more...

by AskGif | Oct 18, 2018 | Category :coding

How to get WYSIHTML5 textarea content cleared?

How to get WYSIHTML5 textarea content cleared?

I have got a text area having id ="myTextArea", I'm able to fetch the content of text area but I'm not able to clear the content once the user successfully submits the data. I'm using a wysihtml5 plugin as my text editor. my code is as follows. <pre class="language-markup"><code>&lt;textarea

read more...

by AskGif | Sep 01, 2018 | Category :coding

How to find the longest border of a string?

How to find the longest border of a string?

The border of a string is a substring which is both a proper prefix and proper suffix of the string &mdash; "proper" meaning that the whole string does not count as a substring. The longest border of x is "ab". The longest border of y is "abab" (the prefix and suffix can overlap). More de

read more...

by AskGif | Aug 16, 2018 | Category :coding

Search an element in binary tree without recursion.

Search an element in binary tree without recursion.

We can use level order traversal for solving this problem. The only change required in level order traversal is, instead of printing the date we just need to check whether the root data is equal to the element we want to search. source:&nbsp;Data Structures and Algorithms Made Easy in Jav

read more...

by AskGif | Aug 16, 2018 | Category :coding

Find maximum element in binary tree without recursion.

Find maximum element in binary tree without recursion.

We could have used either PreOrder, InOrder or PostOrder traversal to find the maximum in a Tree but as it is mentioned that we need to find the maximum without using Recursion. Using Level Order Traversal we can find the Maximum element. We just need to observe the elements data while de

read more...

by AskGif | Aug 14, 2018 | Category :coding

How to implement Level Order Traversal in Binary Tree?

How to implement Level Order Traversal in Binary Tree?

Trees can also be traversed in level-order, where we visit every node on a level before going to a lower level. This search is referred to as a breadth-first search (BFS), as the search tree is broadened as much as possible on each depth before going to the next depth. Java implementation

read more...

by AskGif | Aug 09, 2018 | Category :coding

How to implement PostOrder Traversal in Binary Tree?

How to implement PostOrder Traversal in Binary Tree?

PostOrder Traversal is different from InOrder Traversal and PreOrder Traversal. In this Traversal approach we first traverse through left and then right and at the end, we traverse to the node data. In PostOrder traversal, the root is visited after both subtrees. PostOrder traversal is de

read more...

by AskGif | Aug 09, 2018 | Category :coding

How to implement InOrder Traversal in Binary Tree?

How to implement InOrder Traversal in Binary Tree?

The Technique for traversal in an Inorder is slightly different from what we were doing in PreOrder Traversal. Here we go through left node, then data and then the right node. In an InOrder traversal, the root is visited between the subtrees. InOrder traversal is defined as follows:

read more...