Skip to content

Instantly share code, notes, and snippets.

View Sisekelo's full-sized avatar

Sisekelo Dlamini Sisekelo

View GitHub Profile
'use strict';
// Your Google Cloud Platform project ID
const projectId = 'quickstart-1550429036021';
const functions = require('firebase-functions');
const {
WebhookClient
} = require('dialogflow-fulfillment');
const {
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <netdb.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <arpa/inet.h>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>University List Swaziland</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="handlebars-v4.0.11.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="style.css">
<!DOCTYPE html>
<html>
<head>
<title>Graph JS</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.2/Chart.js"></script>
</head>
<body>
<div class="container">
import java.util.*;
class Solution {
public static long countInversions(int[] a){ //expects an array of ints
int n = a.length; //n = length of array
// Base Case
if(n <= 1) {
return 0;
import java.util.Scanner;
public class Solution {
private static int[] array; //empty int array
private static void bubbleSort() {
int n = array.length; // n is length of the
// number of swaps for all array iterations
int totalSwaps = 0;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package stack;
import java.util.Arrays;
/**
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package Queue;
import java.util.Arrays;
/**
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package Queue;
/**
*
* @author Sisekelo
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package stack;
import java.util.Arrays;
/**