Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
online

Amir Shokri amirshnll

:octocat:
online
View GitHub Profile
@amirshnll
amirshnll / bsfive.cs
Created Oct 23, 2020
Binary Search with 5 Mid
View bsfive.cs
int bsfive(int arr[], int x, int low, int high)
{
if(low<=high)
{
int middle[5];
middle[1]=(low+high)/6;
middle[2]=middle[1]*2;
middle[3]=middle[1]*3;
middle[4]=middle[1]*4;
middle[5]=middle[1]*5;
@amirshnll
amirshnll / bsfour.cs
Created Oct 23, 2020
Binary Search with 4 Mid
View bsfour.cs
int bsfour(int arr[], int x, int low, int high)
{
if(low<=high)
{
int middle[5];
middle[1]=(low+high)/5;
middle[2]=middle[1]*2;
middle[3]=middle[1]*3;
middle[4]=middle[1]*4;
View gist:72aa10796915a867b2886bdc5ed19c32
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
View gist:cc7c366128462a5a8e2e02758e54a76e
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WpfApplication1.myClass
{
public class queue
{
View gist:11e9921fa081c52228f9b5e67a7eca72
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WpfApplication3
{
public class Sort
{
@amirshnll
amirshnll / searchlinkedlist.cpp
Created Oct 22, 2020
single linked list search
View searchlinkedlist.cpp
// ConsoleApplication1.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "iostream"
#include "stdlib.h"
using namespace std;
@amirshnll
amirshnll / double.cpp
Created Oct 22, 2020
double linked list
View double.cpp
#include "stdafx.h"
#include "iostream"
using namespace std;
struct node
{
int data;
struct node *next;
struct node *last;
@amirshnll
amirshnll / single.cpp
Created Oct 22, 2020
single linked list
View single.cpp
// ConsoleApplication1.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "iostream"
#include "stdlib.h"
using namespace std;
@amirshnll
amirshnll / Main.java
Created Oct 22, 2020
Sum number Digits in java
View Main.java
import java.util.Scanner;
public class Main {
static Scanner scanner = new Scanner(System.in);
public static void main(String[] args) {
int num;
int sum = 0;
View Main.java
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
// First String To run in programm
String firstString = "1";
String lastString = "1";
You can’t perform that action at this time.