This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Deleting a node from Binary search tree */ | |
#include<iostream> | |
using namespace std; | |
struct Node { | |
int data; | |
struct Node *left; | |
struct Node *right; | |
}; | |
//Function to find minimum in a tree. | |
Node* FindMin(Node* root) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class minHeap { | |
public int size; | |
public int [] mH; | |
public int position; | |
public minHeap(int size){ | |
this.size=size; | |
mH = new int [size+1]; | |
position = 0; | |
} | |
public void createHeap(int [] arrA){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//The following code example demonstrates the algorithm | |
public void insert(Comparable x) | |
{ | |
if(size == heap.length - 1) doubleSize(); | |
//Insert a new item to the end of the array | |
int pos = ++size; | |
//Percolate up |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. build a heap 1, 2, 4, 5, 3, 6 | |
2. turn this heap into a sorted list | |
deleteMin | |
1, 2, 4, 5, 3, 6 swap 1 and 6 | |
6, 2, 4, 5, 3, 1 restore heap | |
2, 6, 4, 5, 3, 1 | |
2, 3, 4, 5, 6, 1 | |
deleteMin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { Text, View } from 'react-native'; | |
const AlbumList = () => ( | |
<View> | |
<Text> AlbumList </Text> | |
</View> | |
); | |
export default AlbumList; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import { Text, View } from 'react-native'; | |
class AlbumList extends Component { | |
render() { | |
return ( | |
<View> | |
<Text> AlbumList!!! </Text> | |
</View> | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import { Text, View } from 'react-native'; | |
class App extends Component { | |
render() { | |
return ( | |
<View> | |
<Text>An App!</Text> | |
</View> | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { AppRegistry } from 'react-native'; | |
import App from './src/app'; | |
AppRegistry.registerComponent('LoginApp', () => App); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit } from '@angular/core'; | |
import { AngularFireAuth } from 'angularfire2'; | |
import { Router } from '@angular/router'; | |
@Component({ | |
selector: 'app-root', | |
templateUrl: './app.component.html', | |
styleUrls: ['./app.component.css'] | |
}) | |
export class AppComponent implements OnInit { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit } from '@angular/core'; | |
import { FirebaseService } from '../../services/firebase.service'; | |
@Component({ | |
selector: 'app-listings', | |
templateUrl: './listings.component.html', | |
styleUrls: ['./listings.component.css'] | |
}) | |
export class ListingsComponent implements OnInit { |
OlderNewer