Posts

closest element K | c++

 class Solution { public:     vector<int> findClosestElements(vector<int>& arr, int k, int x) {         vector<int> arrOut;      vector <int> :: iterator iterPrev, iterNext;      iterPrev = find(arr.begin(), arr.end(), x);      if (*iterPrev == x)      {           arrOut.push_back(*iterPrev);           iterNext = iterPrev;           iterNext++;           iterPrev--;           for(k; k>1; k--){                if(iterNext > arr.end() || iterPrev < arr.begin()){                     arrOut.push_back(*iterPrev);                     iterPrev--;                } ...

JavaScript Snippet

  < script >      var   listElement   =   document . getElementsByClassName ( "first" );      var   statusVal   =   document . getElementById ( "bookStatus" );      var   colorBg   =   document . getElementById ( "buyBtn" );      var   buy   =   document . getElementById ( "firstCell" );      var   available   =   document . getElementById ( "bookAvailable" );      colorBg . addEventListener ( "click" , ()  =>  {        // console.log("Success! addEventListener is working")        // colorBg.innerHTML = "Success! addEventListener is working";        available . classList . add ( "sample" );        st...

dean PA

 7827529294

google search in | heroku

  Google Search (search-engine-in.herokuapp.com)

Fourier series AM

  Laplace And Fourier Transform objective questions (mcq) and answers - MechanicalTutorial 6. For the given periodic function    ≤ ≤ ≤ ≤ = 4 for 2 6 2 for 0 2 ( ) t t t f t with a period T = 6 as shown in Problem 5. The complex form of the Fourier series can be expressed as ∑ ∞ =−∞ = k ikw t k f t C e 0 ~ ( ) . The complex coefficient 1 ~ C can be expressed as (A) 0.4560 + 0.3734i (B) 0.4560 − 0.3734i (C) − 0.4560 + 0.3734i (D) 0.3734 − 0.4560i Solution The correct answer is (C). 1. In Fourier transform  f ( p ) = ∫ ∞ − ∞ e ( i p x ) F ( x ) d x , e ( i p x )  is said to be Kernel function. a) True b) False View Answer Answer: a Explanation: In any transform, apart from function given, the other function is said to be Kernel function. So, here in Fourier transform, e (ipx)  is said to be the Kernel function. 2. Fourier Transform of  e − | x | i s   2 1 + p 2 . Then what is the fourier transform of  e − 2 | x | ? a)  4 ( 4 + p 2 ) b)  2 ( 4...