Git Product home page Git Product logo

ntr_lab_test's Introduction

NTR_Lab_Test

1.  Write a listbox-style binary search for an ordered array of integers.  Listbox-style means that you should return the index of the first item greater than or equal to the item being searched for; if all items are less, you should return the index of the last item.  You are guaranteed that there is at least one item in the array.

Перевод: Написать listbox-style бинарный поиск для упорядоченного массива целых чисел. Listbox-style значит что вы должны вернуть индекс первого элемента, который больше или равен значению, которое ищем. Если все элеменыт меньше, то вернуть индекс последнего элемента. Вам гарантируют что массив заполнен хотя бы одним значением. 

2.  Suppose you have an array of integers, both positive and negative, in no particular order.  Find the largest possible sum of any continuous subarray.  For example, if you have all positive numbers, the largest sum would be the sum of the whole array; if you have all negative numbers, the largest sum is 0 (the null subarray)

Перевод: Предположим, что у вас есть массив целых чисел, как положительных, так и отрицательных, в определенном порядке. Найдите максимально возможную сумму любого непрерывного подмассива. Для примера, если вы имеете все положительные числа наибольшая сумма будет сумма всего массива; если вы имеете все отрицательные числа наибольшая сумма ноль (нулевой подмассив).

ntr_lab_test's People

Contributors

enigmaraven avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.