Heap data structure is widely use in software languages like C, C++, Python, Java etc. There are different type of heaps like Binary Heap, Fibonacci Heap, Binomial Heap and so on. Out of these, Binary Heap is more popular and others are variations of it. Following are the properties of Binary Heap.
- Binary tree property: It’s a complete tree i.e All levels are completely filled except last levels which has all keys as left as possible.
- Binary Heap is either a Max heap or Min Heap.
Problem Statement: Write a program to print consecutive occurrences of each character in a given string.
Test case 1:
Input : affffssdaaag
Test case 2:
Test case 3:
Output: a3 Read the rest of this entry »
Angular 2 being one of the most advanced front-end framework is lead in UI application development framework. Angular 2 is component driven framework, we are supposed to create components to develop the application. In our previous article Angular 2 Hello world example, we discussed how to create Angular 2 application using angular CLI. Here in this article, we will be discussing about steps to create a component in Angular 2 application. Read the rest of this entry »