How do you find the missing number in a given integer array of 1 to 10?
How do you find the duplicate number on a given integer array?
using UnityEngine; | |
using System.Collections; | |
using System.IO; | |
using UnityEngine.UI; | |
public class ScreenshotNow : MonoBehaviour | |
{ | |
public RectTransform rectT; // Assign the UI element which you wanna capture | |
public Image img; | |
int width; // width of the object to capture | |
int height; // height of the object to capture |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
//using UnityStandardAssets._2D; | |
namespace UnityStandardAssets._2D | |
{ | |
public class FollowPlayer : MonoBehaviour | |
{ | |
public GameObject Player; | |
float speed; |
/*============================================================================== | |
Copyright (c) 2017 PTC Inc. All Rights Reserved. | |
Copyright (c) 2010-2014 Qualcomm Connected Experiences, Inc. | |
All Rights Reserved. | |
Confidential and Proprietary - Protected under copyright and other laws. | |
==============================================================================*/ | |
using UnityEngine; | |
using Vuforia; |
# IMPORTS | |
import tensorflow as tf | |
# freeze_graph "screenshots" the graph | |
from tensorflow.python.tools import freeze_graph | |
# optimize_for_inference lib optimizes this frozen graph | |
from tensorflow.python.tools import optimize_for_inference_lib | |
# os and os.path are used to create the output file where we save our frozen graphs | |
import os |
using UnityEngine; | |
public class Enemy : MonoBehaviour | |
{ | |
public float health; // keep the health of the enemey | |
[HideInInspector] | |
public Vector2 direction; // direction where the enemy is now facing. | |
public GameObject bullet; // Bullet object what the enemy is gonna shoot. |
Problem Statement: On a positive integer, you can perform any one of the following 3 steps. | |
1.) Subtract 1 from it. ( n = n - 1 ) , | |
2.) If its divisible by 2, divide by 2. ( if n % 2 == 0 , then n = n / 2 ) , | |
3.) If its divisible by 3, divide by 3. ( if n % 3 == 0 , then n = n / 3 ). | |
Now the question is, given a positive integer n, find the minimum number of steps that takes n to 1 | |
eg: | |
1.)For n = 1 , output: 0 | |
2.) For n = 4 , output: 2 ( 4 /2 = 2 /2 = 1 ) | |
3.) For n = 7 , output: 3 ( 7 -1 = 6 /3 = 2 /2 = 1 ) |
Write a method | |
public static int max(int[][] a) | |
that returns the maximum value in the 2d parameter array a. |
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=944 | |
https://www.spoj.com/problems/MIXTURES/ | |
https://leetcode.com/problems/burst-balloons/ |
Write a C program to find maximum between two numbers. | |
Write a C program to find maximum between three numbers. | |
Write a C program to check whether a number is negative, positive or zero. | |
Write a C program to check whether a number is divisible by 5 and 11 or not. | |
Write a C program to input week number and print week day. |